mirror of
https://github.com/rmontanana/mdlp.git
synced 2025-08-16 07:55:58 +00:00
Compare commits
6 Commits
8a1b68376d
...
211
Author | SHA1 | Date | |
---|---|---|---|
c86c7f9ef0
|
|||
828e6a28c0
|
|||
8f2a0015d9
|
|||
8945a3f16e
|
|||
80b7d6e6f7
|
|||
b1d550f211
|
35
.github/workflows/build.yml
vendored
35
.github/workflows/build.yml
vendored
@@ -19,26 +19,29 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Install sonar-scanner and build-wrapper
|
- name: Install sonar-scanner and build-wrapper
|
||||||
uses: SonarSource/sonarcloud-github-c-cpp@v2
|
uses: SonarSource/sonarcloud-github-c-cpp@v2
|
||||||
|
- name: Install Python and Conan
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install python3 python3-pip
|
||||||
|
pip3 install conan
|
||||||
- name: Install lcov & gcovr
|
- name: Install lcov & gcovr
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y install lcov
|
sudo apt-get -y install lcov
|
||||||
sudo apt-get -y install gcovr
|
sudo apt-get -y install gcovr
|
||||||
- name: Install Libtorch
|
- name: Setup Conan profileson
|
||||||
run: |
|
run: |
|
||||||
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.3.1%2Bcpu.zip
|
conan profile detect --force
|
||||||
unzip libtorch-cxx11-abi-shared-with-deps-2.3.1+cpu.zip
|
conan remote add cimmeria https://conan.rmontanana.es/artifactory/api/conan/Cimmeria
|
||||||
|
- name: Install dependencies with Conan
|
||||||
|
run: |
|
||||||
|
conan install . --build=missing -of build_debug -s build_type=Debug -o enable_testing=True
|
||||||
|
- name: Configure with CMake
|
||||||
|
run: |
|
||||||
|
cmake -S . -B build_debug -DCMAKE_TOOLCHAIN_FILE=build_debug/build/Debug/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTING=ON
|
||||||
- name: Tests & build-wrapper
|
- name: Tests & build-wrapper
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -Wno-dev -DCMAKE_PREFIX_PATH=$(pwd)/libtorch -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTING=ON
|
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build_debug --config Debug -j 4
|
||||||
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/ --config Debug
|
cp -r tests/datasets build_debug/tests/datasets
|
||||||
cmake --build build -j 4
|
cd build_debug/tests
|
||||||
cd build
|
ctest --output-on-failure -j 4
|
||||||
ctest -C Debug --output-on-failure -j 4
|
|
||||||
gcovr -f ../src/CPPFImdlp.cpp -f ../src/Metrics.cpp -f ../src/BinDisc.cpp -f ../src/Discretizer.cpp --txt --sonarqube=coverage.xml
|
|
||||||
- name: Run sonar-scanner
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
||||||
run: |
|
|
||||||
sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}" \
|
|
||||||
--define sonar.coverageReportPaths=build/coverage.xml
|
|
@@ -7,9 +7,11 @@ This directory contains the Conan package configuration for the fimdlp library.
|
|||||||
The package manages the following dependencies:
|
The package manages the following dependencies:
|
||||||
|
|
||||||
### Build Requirements
|
### Build Requirements
|
||||||
|
|
||||||
- **libtorch/2.4.1** - PyTorch C++ library for tensor operations
|
- **libtorch/2.4.1** - PyTorch C++ library for tensor operations
|
||||||
|
|
||||||
### Test Requirements (when testing enabled)
|
### Test Requirements (when testing enabled)
|
||||||
|
|
||||||
- **catch2/3.8.1** - Modern C++ testing framework
|
- **catch2/3.8.1** - Modern C++ testing framework
|
||||||
- **arff-files** - ARFF file format support (included locally in tests/lib/Files/)
|
- **arff-files** - ARFF file format support (included locally in tests/lib/Files/)
|
||||||
|
|
||||||
@@ -67,7 +69,7 @@ conan create . -o shared=True --profile:build=default --profile:host=default
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Add Cimmeria remote
|
# Add Cimmeria remote
|
||||||
conan remote add cimmeria <cimmeria-server-url>
|
conan remote add cimmeria https://conan.rmontanana.es/artifactory/api/conan/Cimmeria
|
||||||
|
|
||||||
# Login to Cimmeria
|
# Login to Cimmeria
|
||||||
conan remote login cimmeria <username>
|
conan remote login cimmeria <username>
|
||||||
@@ -150,4 +152,4 @@ conan create . -o enable_testing=True
|
|||||||
|
|
||||||
- C++17 compatible compiler
|
- C++17 compatible compiler
|
||||||
- CMake 3.20 or later
|
- CMake 3.20 or later
|
||||||
- Conan 2.0 or later
|
- Conan 2.0 or later
|
||||||
|
2
Makefile
2
Makefile
@@ -20,7 +20,7 @@ debug: ## Build Debug version of the library
|
|||||||
@$(call build_target,"Debug","$(f_debug)", "ENABLE_TESTING=ON", "-o enable_testing=True")
|
@$(call build_target,"Debug","$(f_debug)", "ENABLE_TESTING=ON", "-o enable_testing=True")
|
||||||
|
|
||||||
release: ## Build Release version of the library
|
release: ## Build Release version of the library
|
||||||
@$(call build_target,"Release","$(f_release)", "ENABLE_TESTING=OFF", "")
|
@$(call build_target,"Release","$(f_release)", "ENABLE_TESTING=OFF", "-o enable_testing=False")
|
||||||
|
|
||||||
install: ## Install the library
|
install: ## Install the library
|
||||||
@echo ">>> Installing the project..."
|
@echo ">>> Installing the project..."
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
[](https://sonarcloud.io/summary/new_code?id=rmontanana_mdlp)
|
[](https://sonarcloud.io/summary/new_code?id=rmontanana_mdlp)
|
||||||
[](html/index.html)
|
[](html/index.html)
|
||||||
[](https://deepwiki.com/rmontanana/mdlp)
|
[](https://deepwiki.com/rmontanana/mdlp)
|
||||||
[](https://doi.org/10.5281/zenodo.14245443)
|
[](https://doi.org/10.5281/zenodo.16025501)
|
||||||
|
|
||||||
# <img src="logo.png" alt="logo" width="50"/> mdlp
|
# <img src="logo.png" alt="logo" width="50"/> mdlp
|
||||||
|
|
||||||
@@ -18,9 +18,7 @@ Other features:
|
|||||||
|
|
||||||
- Intervals with the same value of the variable are not taken into account for cutpoints.
|
- Intervals with the same value of the variable are not taken into account for cutpoints.
|
||||||
- Intervals have to have more than two examples to be evaluated (mdlp).
|
- Intervals have to have more than two examples to be evaluated (mdlp).
|
||||||
|
|
||||||
- The algorithm returns the cut points for the variable.
|
- The algorithm returns the cut points for the variable.
|
||||||
|
|
||||||
- The transform method uses the cut points returning its index in the following way:
|
- The transform method uses the cut points returning its index in the following way:
|
||||||
|
|
||||||
cut[i - 1] <= x < cut[i]
|
cut[i - 1] <= x < cut[i]
|
||||||
|
Reference in New Issue
Block a user