mirror of
https://github.com/Doctorado-ML/FImdlp.git
synced 2025-08-17 16:35:52 +00:00
Refactor project structure
This commit is contained in:
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
|||||||
[submodule "fimdlp/cppmdlp"]
|
[submodule "fimdlp/cppmdlp"]
|
||||||
path = fimdlp/cppmdlp
|
path = src/cppfimdlp
|
||||||
url = https://github.com/rmontanana/mdlp
|
url = https://github.com/rmontanana/mdlp
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
include fimdlp/cppmdlp/CPPFImdlp.h
|
|
5
Makefile
5
Makefile
@@ -26,10 +26,9 @@ build: ## Build package
|
|||||||
make clean
|
make clean
|
||||||
python -m build --wheel
|
python -m build --wheel
|
||||||
|
|
||||||
buildext: ## Build extension
|
install: ## Build extension
|
||||||
make clean
|
make clean
|
||||||
python setup.py build_ext
|
pip install -e .
|
||||||
echo "Build extension success"
|
|
||||||
|
|
||||||
audit: ## Audit pip
|
audit: ## Audit pip
|
||||||
pip-audit
|
pip-audit
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include "../src/fimdlp/cppmdlp/CPPFImdlp.h"
|
#include "../src/cppmdlp/CPPFImdlp.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
ArffFiles file;
|
ArffFiles file;
|
||||||
vector<string> lines;
|
vector<string> lines;
|
||||||
string path = "../../src/fimdlp/cppmdlp/tests/datasets/";
|
string path = "../../src/cppmdlp/tests/datasets/";
|
||||||
map<string, bool > datasets = {
|
map<string, bool > datasets = {
|
||||||
{"mfeat-factors", true},
|
{"mfeat-factors", true},
|
||||||
{"iris", true},
|
{"iris", true},
|
||||||
|
@@ -20,7 +20,7 @@ ap.add_argument("dataset", type=str, choices=datasets.keys())
|
|||||||
args = ap.parse_args()
|
args = ap.parse_args()
|
||||||
relative = "" if os.path.isdir("src") else ".."
|
relative = "" if os.path.isdir("src") else ".."
|
||||||
file_name = os.path.join(
|
file_name = os.path.join(
|
||||||
relative, "src", "fimdlp", "cppmdlp", "tests", "datasets", args.dataset
|
relative, "src", "cppmdlp", "tests", "datasets", args.dataset
|
||||||
)
|
)
|
||||||
data = arff.loadarff(file_name + ".arff")
|
data = arff.loadarff(file_name + ".arff")
|
||||||
df = pd.DataFrame(data[0])
|
df = pd.DataFrame(data[0])
|
||||||
|
4
setup.py
4
setup.py
@@ -12,8 +12,8 @@ setup(
|
|||||||
name="fimdlp.cppfimdlp",
|
name="fimdlp.cppfimdlp",
|
||||||
sources=[
|
sources=[
|
||||||
"src/fimdlp/cfimdlp.pyx",
|
"src/fimdlp/cfimdlp.pyx",
|
||||||
"src/fimdlp/cppmdlp/CPPFImdlp.cpp",
|
"src/cppmdlp/CPPFImdlp.cpp",
|
||||||
"src/fimdlp/cppmdlp/Metrics.cpp",
|
"src/cppmdlp/Metrics.cpp",
|
||||||
],
|
],
|
||||||
language="c++",
|
language="c++",
|
||||||
include_dirs=["fimdlp"],
|
include_dirs=["fimdlp"],
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
from libcpp.vector cimport vector
|
from libcpp.vector cimport vector
|
||||||
from libcpp cimport bool
|
from libcpp cimport bool
|
||||||
|
|
||||||
cdef extern from "cppmdlp/CPPFImdlp.h" namespace "mdlp":
|
cdef extern from "../cppmdlp/CPPFImdlp.h" namespace "mdlp":
|
||||||
ctypedef float precision_t
|
ctypedef float precision_t
|
||||||
cdef cppclass CPPFImdlp:
|
cdef cppclass CPPFImdlp:
|
||||||
CPPFImdlp(bool) except +
|
CPPFImdlp(bool) except +
|
||||||
|
Reference in New Issue
Block a user