diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 163b640..d32702c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [master] + branches: [master, ci] pull_request: branches: [master] workflow_dispatch: @@ -12,8 +12,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - python: [3.9, "3.10"] + os: [ubuntu-latest] + python: ["3.10"] steps: - uses: actions/checkout@v2 @@ -24,10 +24,10 @@ jobs: - name: Install dependencies run: | pip install -q --upgrade pip + pip install -q scikit-learn pip install -q --upgrade codecov coverage black flake8 codacy-coverage - name: Build and install run: | - cd /home/runner/work/FImdlp/FImdlp make install - name: Lint run: | @@ -35,7 +35,7 @@ jobs: flake8 --count --per-file-ignores="__init__.py:F401" src - name: Tests run: | - coverage run -m unittest discover -v - s src + coverage run -m unittest discover -v -s src coverage xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 diff --git a/Ejemplo.xlsx b/Ejemplo.xlsx deleted file mode 100644 index 355968b..0000000 Binary files a/Ejemplo.xlsx and /dev/null differ diff --git a/feature0.txt b/feature0.txt deleted file mode 100644 index fbc8eb6..0000000 --- a/feature0.txt +++ /dev/null @@ -1,152 +0,0 @@ -+++++++++++++++++++++++ -( 0, 13) -> (4.3, 0) -( 1, 8) -> (4.4, 0) -( 2, 38) -> (4.4, 0) -( 3, 42) -> (4.4, 0) -( 4, 41) -> (4.5, 0) -( 5, 3) -> (4.6, 0) -( 6, 6) -> (4.6, 0) -( 7, 22) -> (4.6, 0) -( 8, 47) -> (4.6, 0) -( 9, 2) -> (4.7, 0) -( 10, 29) -> (4.7, 0) -( 11, 11) -> (4.8, 0) -( 12, 12) -> (4.8, 0) -( 13, 24) -> (4.8, 0) -( 14, 30) -> (4.8, 0) -( 15, 45) -> (4.8, 0) -( 16, 1) -> (4.9, 0) -( 17, 9) -> (4.9, 0) -( 18, 34) -> (4.9, 0) -( 19, 37) -> (4.9, 0) -( 20, 57) -> (4.9, 1) -( 21, 106) -> (4.9, 2) -( 22, 4) -> (5.0, 0) -( 23, 7) -> (5.0, 0) -( 24, 25) -> (5.0, 0) -( 25, 26) -> (5.0, 0) -( 26, 35) -> (5.0, 0) -( 27, 40) -> (5.0, 0) -( 28, 43) -> (5.0, 0) -( 29, 49) -> (5.0, 0) -( 30, 60) -> (5.0, 1) -( 31, 93) -> (5.0, 1) -( 32, 0) -> (5.1, 0) -( 33, 17) -> (5.1, 0) -( 34, 19) -> (5.1, 0) -( 35, 21) -> (5.1, 0) -( 36, 23) -> (5.1, 0) -( 37, 39) -> (5.1, 0) -( 38, 44) -> (5.1, 0) -( 39, 46) -> (5.1, 0) -( 40, 98) -> (5.1, 1) -( 41, 27) -> (5.2, 0) -( 42, 28) -> (5.2, 0) -( 43, 32) -> (5.2, 0) -( 44, 59) -> (5.2, 1) -( 45, 48) -> (5.3, 0) -( 46, 5) -> (5.4, 0) -( 47, 10) -> (5.4, 0) -( 48, 16) -> (5.4, 0) -( 49, 20) -> (5.4, 0) -( 50, 31) -> (5.4, 0) -( 51, 84) -> (5.4, 1) -( 52, 33) -> (5.5, 0) -( 53, 36) -> (5.5, 0) -( 54, 53) -> (5.5, 1) -( 55, 80) -> (5.5, 1) -( 56, 81) -> (5.5, 1) -( 57, 89) -> (5.5, 1) -( 58, 90) -> (5.5, 1) -( 59, 64) -> (5.6, 1) -( 60, 66) -> (5.6, 1) -( 61, 69) -> (5.6, 1) -( 62, 88) -> (5.6, 1) -( 63, 94) -> (5.6, 1) -( 64, 121) -> (5.6, 2) -( 65, 15) -> (5.7, 0) -( 66, 18) -> (5.7, 0) -( 67, 55) -> (5.7, 1) -( 68, 79) -> (5.7, 1) -( 69, 95) -> (5.7, 1) -( 70, 96) -> (5.7, 1) -( 71, 99) -> (5.7, 1) -( 72, 113) -> (5.7, 2) -( 73, 14) -> (5.8, 0) -( 74, 67) -> (5.8, 1) -( 75, 82) -> (5.8, 1) -( 76, 92) -> (5.8, 1) -( 77, 101) -> (5.8, 2) -( 78, 114) -> (5.8, 2) -( 79, 142) -> (5.8, 2) -( 80, 61) -> (5.9, 1) -( 81, 70) -> (5.9, 1) -( 82, 149) -> (5.9, 2) -( 83, 62) -> (6.0, 1) -( 84, 78) -> (6.0, 1) -( 85, 83) -> (6.0, 1) -( 86, 85) -> (6.0, 1) -( 87, 119) -> (6.0, 2) -( 88, 138) -> (6.0, 2) -( 89, 63) -> (6.1, 1) -( 90, 71) -> (6.1, 1) -( 91, 73) -> (6.1, 1) -( 92, 91) -> (6.1, 1) -( 93, 127) -> (6.1, 2) -( 94, 134) -> (6.1, 2) -( 95, 68) -> (6.2, 1) -( 96, 97) -> (6.2, 1) -( 97, 126) -> (6.2, 2) -( 98, 148) -> (6.2, 2) -( 99, 56) -> (6.3, 1) -(100, 72) -> (6.3, 1) -(101, 87) -> (6.3, 1) -(102, 100) -> (6.3, 2) -(103, 103) -> (6.3, 2) -(104, 123) -> (6.3, 2) -(105, 133) -> (6.3, 2) -(106, 136) -> (6.3, 2) -(107, 146) -> (6.3, 2) -(108, 51) -> (6.4, 1) -(109, 74) -> (6.4, 1) -(110, 111) -> (6.4, 2) -(111, 115) -> (6.4, 2) -(112, 128) -> (6.4, 2) -(113, 132) -> (6.4, 2) -(114, 137) -> (6.4, 2) -(115, 54) -> (6.5, 1) -(116, 104) -> (6.5, 2) -(117, 110) -> (6.5, 2) -(118, 116) -> (6.5, 2) -(119, 147) -> (6.5, 2) -(120, 58) -> (6.6, 1) -(121, 75) -> (6.6, 1) -(122, 65) -> (6.7, 1) -(123, 77) -> (6.7, 1) -(124, 86) -> (6.7, 1) -(125, 108) -> (6.7, 2) -(126, 124) -> (6.7, 2) -(127, 140) -> (6.7, 2) -(128, 144) -> (6.7, 2) -(129, 145) -> (6.7, 2) -(130, 76) -> (6.8, 1) -(131, 112) -> (6.8, 2) -(132, 143) -> (6.8, 2) -(133, 52) -> (6.9, 1) -(134, 120) -> (6.9, 2) -(135, 139) -> (6.9, 2) -(136, 141) -> (6.9, 2) -(137, 50) -> (7.0, 1) -(138, 102) -> (7.1, 2) -(139, 109) -> (7.2, 2) -(140, 125) -> (7.2, 2) -(141, 129) -> (7.2, 2) -(142, 107) -> (7.3, 2) -(143, 130) -> (7.4, 2) -(144, 105) -> (7.6, 2) -(145, 117) -> (7.7, 2) -(146, 118) -> (7.7, 2) -(147, 122) -> (7.7, 2) -(148, 135) -> (7.7, 2) -(149, 131) -> (7.9, 2) -+++++++++++++++++++++++ \ No newline at end of file diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 84a8742..5a67e6e 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -3,4 +3,4 @@ project(main) set(CMAKE_CXX_STANDARD 14) -add_executable(sample sample.cpp ArffFiles.cpp ../src/fimdlp/cppmdlp/Metrics.cpp ../src/fimdlp/cppmdlp/CPPFImdlp.cpp) +add_executable(sample sample.cpp ArffFiles.cpp ../src/cppmdlp/Metrics.cpp ../src/cppmdlp/CPPFImdlp.cpp) diff --git a/samples/sample.cpp b/samples/sample.cpp index d838bb9..c0c357c 100644 --- a/samples/sample.cpp +++ b/samples/sample.cpp @@ -50,5 +50,9 @@ int main(int argc, char** argv) cout << item << endl; } } + mdlp::indices_t indices = test.sortIndices(X[0]); + for (auto item : indices) { + cout << setw(3) << item << " " << X[0][item] << " " << y[item] << endl; + } return 0; } diff --git a/test1.xlsx b/test1.xlsx deleted file mode 100644 index 2e6bcb2..0000000 Binary files a/test1.xlsx and /dev/null differ