Skip to content
Snippets Groups Projects
Commit 395c1dcd authored by Baptiste Bauvin's avatar Baptiste Bauvin
Browse files

Merged

parents 85f372eb 258ada8c
No related branches found
No related tags found
No related merge requests found
Showing
with 50 additions and 3 deletions
......@@ -6,6 +6,10 @@ from ..monoview.monoview_utils import BaseMonoviewClassifier
from ..utils.hyper_parameter_search import CustomRandint, CustomUniform
classifier_class_name = "MinCQGraalpy"
<<<<<<< HEAD
=======
proto=True
>>>>>>> 258ada8c7e5025f984b03343596557abe8d3f5a4
class MinCQGraalpy(RegularizedBinaryMinCqClassifier, BaseMonoviewClassifier):
"""
......
......@@ -17,6 +17,10 @@ __author__ = "Baptiste Bauvin"
__status__ = "Prototype" # Production, Development, Prototype
classifier_class_name = "PGradientBoosting"
<<<<<<< HEAD
=======
proto=True
>>>>>>> 258ada8c7e5025f984b03343596557abe8d3f5a4
class CustomDecisionTreeGB(DecisionTreeClassifier):
......@@ -59,11 +63,19 @@ class PGradientBoosting(GradientBoostingClassifier, BaseMonoviewClassifier, Base
def pregen_voters(self, X, y=None, generator="Stumps"):
if y is not None:
neg_y = change_label_to_minus(y)
<<<<<<< HEAD
if generator is "Stumps":
self.estimators_generator = StumpsClassifiersGenerator(
n_stumps_per_attribute=self.n_stumps,
self_complemented=self.self_complemented)
elif generator is "Trees":
=======
if generator == "Stumps":
self.estimators_generator = StumpsClassifiersGenerator(
n_stumps_per_attribute=self.n_stumps,
self_complemented=self.self_complemented)
elif generator == "Trees":
>>>>>>> 258ada8c7e5025f984b03343596557abe8d3f5a4
self.estimators_generator = TreeClassifiersGenerator(
n_trees=self.n_stumps, max_depth=self.max_depth_pregen)
self.estimators_generator.fit(X, neg_y)
......
......@@ -17,6 +17,10 @@ __status__ = "Prototype" # Production, Development, Prototype
classifier_class_name = "RandomForestPregen"
<<<<<<< HEAD
=======
proto=True
>>>>>>> 258ada8c7e5025f984b03343596557abe8d3f5a4
class RandomForestPregen(RandomForestClassifier, BaseMonoviewClassifier,
PregenClassifier):
......
......@@ -9,6 +9,10 @@ from ..monoview.monoview_utils import BaseMonoviewClassifier
from ..utils.hyper_parameter_search import CustomUniform, CustomRandint
classifier_class_name = 'DecisionStumpSCMNew'
<<<<<<< HEAD
=======
proto=True
>>>>>>> 258ada8c7e5025f984b03343596557abe8d3f5a4
class DecisionStumpSCMNew(BaseMonoviewClassifier):
"""
......
......@@ -12,6 +12,10 @@ __author__ = "Baptiste Bauvin"
__status__ = "Prototype" # Production, Development, Prototype
classifier_class_name = "SCMPregen"
<<<<<<< HEAD
=======
proto=True
>>>>>>> 258ada8c7e5025f984b03343596557abe8d3f5a4
class SCMPregen(BaseMonoviewClassifier, PregenClassifier, scm):
"""
......
from .additions.SelOptCB import SelfOptCBBoostClassifier
classifier_class_name = "SelfOptCBBoostBaseStump"
<<<<<<< HEAD
=======
proto=True
>>>>>>> 258ada8c7e5025f984b03343596557abe8d3f5a4
class SelfOptCBBoostBaseStump(SelfOptCBBoostClassifier):
def __init__(self, n_max_iterations=10, random_state=42, twice_the_same=True,
......
from .additions.SelOptCB import SelfOptCBBoostClassifier
classifier_class_name = "SelfOptCBBoostBaseStump"
<<<<<<< HEAD
=======
proto=True
>>>>>>> 258ada8c7e5025f984b03343596557abe8d3f5a4
class SelfOptCBBoostBaseStump(SelfOptCBBoostClassifier):
def __init__(self, n_max_iterations=10, random_state=42, twice_the_same=True,
......
from .additions.SelOptCB import SelfOptCBBoostClassifier
classifier_class_name = "SelfOptCBBoostBaseStump"
<<<<<<< HEAD
=======
proto=True
>>>>>>> 258ada8c7e5025f984b03343596557abe8d3f5a4
class SelfOptCBBoostBaseStump(SelfOptCBBoostClassifier):
def __init__(self, n_max_iterations=10, random_state=42, twice_the_same=True,
......
......@@ -8,6 +8,7 @@ __author__ = "Baptiste Bauvin"
__status__ = "Prototype" # Production, Development, Prototype
classifier_class_name = "SGD"
proto=True
class SGD(SGDClassifier, BaseMonoviewClassifier):
......
......@@ -9,6 +9,10 @@ from ..utils.hyper_parameter_search import CustomRandint
from ..utils.dataset import get_samples_views_indices
classifier_class_name = "SPKM"
<<<<<<< HEAD
=======
proto=True
>>>>>>> 258ada8c7e5025f984b03343596557abe8d3f5a4
class SPKM(BaseMonoviewClassifier, SPKMlikeSklearn):
......
......@@ -8,7 +8,7 @@ __author__ = "Baptiste Bauvin"
__status__ = "Prototype" # Production, Development, Prototype
classifier_class_name = "SVMLinear"
proto=True
class SVMLinear(SVCClassifier, BaseMonoviewClassifier):
"""
......
......@@ -11,7 +11,7 @@ __author__ = "Baptiste Bauvin"
__status__ = "Prototype" # Production, Development, Prototype
classifier_class_name = "SVMPoly"
proto=True
class SVMPoly(SVCClassifier, BaseMonoviewClassifier):
"""
......
......@@ -140,7 +140,9 @@ def get_available_monoview_classifiers(need_probas=False):
available_classifiers = [module_name
for module_name in dir(monoview_classifiers)
if not (
module_name.startswith("__") or module_name == "additions")]
module_name.startswith("__") or
module_name == "additions" or
hasattr(getattr(monoview_classifiers, module_name), "proto"))]
if need_probas:
proba_classifiers = []
for module_name in available_classifiers:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment