Update algorithm type to compute cut points

This commit is contained in:
2022-12-15 12:12:44 +01:00
parent 1d95311a7d
commit fe32ed4b2a
5 changed files with 10 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ int main(int argc, char** argv)
} }
cout << y[i] << endl; cout << y[i] << endl;
} }
mdlp::CPPFImdlp test = mdlp::CPPFImdlp(false); mdlp::CPPFImdlp test = mdlp::CPPFImdlp(0);
for (auto i = 0; i < attributes.size(); i++) { for (auto i = 0; i < attributes.size(); i++) {
cout << "Cut points for " << get<0>(attributes[i]) << endl; cout << "Cut points for " << get<0>(attributes[i]) << endl;
cout << "--------------------------" << setprecision(3) << endl; cout << "--------------------------" << setprecision(3) << endl;

View File

@@ -1 +1 @@
__version__ = "0.9.1" __version__ = "0.9.2"

View File

@@ -6,7 +6,7 @@ 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(int) except +
CPPFImdlp& fit(vector[precision_t]&, vector[int]&) CPPFImdlp& fit(vector[precision_t]&, vector[int]&)
vector[precision_t] getCutPoints() vector[precision_t] getCutPoints()

View File

@@ -7,7 +7,7 @@ from joblib import Parallel, delayed
class FImdlp(TransformerMixin, BaseEstimator): class FImdlp(TransformerMixin, BaseEstimator):
def __init__(self, n_jobs=-1, proposal=False): def __init__(self, n_jobs=-1, proposal=0):
self.n_jobs = n_jobs self.n_jobs = n_jobs
self.proposal = proposal self.proposal = proposal
@@ -19,6 +19,11 @@ class FImdlp(TransformerMixin, BaseEstimator):
The number of jobs to run in parallel. :meth:`fit` and The number of jobs to run in parallel. :meth:`fit` and
:meth:`transform`, are parallelized over the features. ``-1`` means :meth:`transform`, are parallelized over the features. ``-1`` means
using all cores available. using all cores available.
proposal : int, default=0
The type of algorithm to use computing the cut points.
0 - Normal implementation
1 - JA Proposal
2 - Original proposal
Attributes Attributes
---------- ----------