diff --git a/multiview_platform/mono_multi_view_classifiers/monoview/monoview_utils.py b/multiview_platform/mono_multi_view_classifiers/monoview/monoview_utils.py index 4ba9f364e48d1f582b22140122a8ab09b80be8d0..e5b0b265e8fff64e63b8366546a6392f2a9ccb09 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview/monoview_utils.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview/monoview_utils.py @@ -18,12 +18,35 @@ __status__ = "Prototype" # Production, Development, Prototype # __date__ = 2016 - 03 - 25 def change_label_to_minus(y): + """ + Change the label 0 to minus one + + Parameters + ---------- + y : + + Returns + ------- + label y with -1 instead of 0 + + """ minus_y = np.copy(y) minus_y[np.where(y == 0)] = -1 return minus_y def change_label_to_zero(y): + """ + Change the label -1 to 0 + + Parameters + ---------- + y + + Returns + ------- + + """ zeroed_y = np.copy(y) zeroed_y[np.where(y == -1)] = 0 return zeroed_y diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/adaboost.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/adaboost.py index c52e0bfd831960642fefce6358c95ecfc3db3a80..2b3d6423b56e60d7727609af9e42963fe5250b67 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/adaboost.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/adaboost.py @@ -17,12 +17,44 @@ classifier_class_name = "Adaboost" class Adaboost(AdaBoostClassifier, BaseMonoviewClassifier): """ - This class implement a Classifier with adaboost algorithm. + This class implement a Classifier with adaboost algorithm inherit from sklearn + AdaBoostClassifier + + Parameters + ---------- + + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. + + n_estimators : int number of estimators + + base_estimator : + + kwargs : others arguments + + + Attributes + ---------- + param_name : + + classed_params : + + distribs : + + weird_strings : + + plotted_metric : selection of metric to plot + + plotted_metric_name : name of the metric to plot + + step_predictions : """ def __init__(self, random_state=None, n_estimators=50, base_estimator=None, **kwargs): + super(Adaboost, self).__init__( random_state=random_state, n_estimators=n_estimators, @@ -39,6 +71,23 @@ class Adaboost(AdaBoostClassifier, BaseMonoviewClassifier): self.step_predictions = None def fit(self, X, y, sample_weight=None): + """ + Fit adaboost model + + Parameters + ---------- + X : {array-like, sparse matrix}, shape (n_samples, n_features) + + y : { array-like, shape (n_samples,) + Target values class labels in classification + + sample_weight : + + Returns + ------- + self : object + Returns self. + """ begin = time.time() super(Adaboost, self).fit(X, y, sample_weight=sample_weight) end = time.time() @@ -51,10 +100,31 @@ class Adaboost(AdaBoostClassifier, BaseMonoviewClassifier): return self def canProbas(self): - """Used to know if the classifier can return label probabilities""" + """ + Used to know if the classifier can return label probabilities + + Returns + ------- + True + """ return True def predict(self, X): + """ + + Parameters + ---------- + X : {array-like, sparse matrix}, shape (n_samples, n_features) + Training vectors, where n_samples is the number of samples + and n_features is the number of features. + For kernel="precomputed", the expected shape of X is + (n_samples, n_samples). + + Returns + ------- + predictions : ndarray of shape (n_samples, ) + The estimated labels. + """ begin = time.time() pred = super(Adaboost, self).predict(X) end = time.time() diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/adaboost_graalpy.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/adaboost_graalpy.py index 6052032a987bae844c5c854ac935a84e5d569099..f298906be826e769406d30fe75bf0e48cfd74a13 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/adaboost_graalpy.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/adaboost_graalpy.py @@ -15,6 +15,26 @@ classifier_class_name = "AdaboostGraalpy" class AdaBoostGP(BaseEstimator, ClassifierMixin, BaseBoost): """Scikit-Learn compatible AdaBoost classifier. Original code by Pascal Germain, adapted by Jean-Francis Roy. + + Parameters + ---------- + + n_iterations : int, optional + The number of iterations of the algorithm. Defaults to 200. + + iterations_to_collect_as_hyperparameters : list + Iteration numbers to collect while learning, that will be converted as hyperparameter values at evaluation time. + Defaults to None. + classifiers_generator : Transformer, optional + A transformer to convert input samples in voters' outputs. Default: Decision stumps transformer, with 10 stumps + per attributes. + callback_function : function, optional + A function to call at each iteration that is supplied learning information. Defaults to None. + + n_stumps : int ( default : 10) + + self_complemented : boolean (default : True + Attributes ---------- n_iterations : int, optional @@ -34,6 +54,7 @@ class AdaBoostGP(BaseEstimator, ClassifierMixin, BaseBoost): iterations_to_collect_as_hyperparameters=True, classifiers_generator=None, callback_function=None, n_stumps=10, self_complemented=True): + self.n_iterations = n_iterations self.n_stumps = n_stumps self.iterations_to_collect_as_hyperparameters = iterations_to_collect_as_hyperparameters @@ -158,9 +179,37 @@ class AdaBoostGP(BaseEstimator, ClassifierMixin, BaseBoost): class AdaboostGraalpy(AdaBoostGP, BaseMonoviewClassifier): + """AdaboostGraalpy + + Parameters + ---------- + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. + + n_iterations : in number of iterations (default : 200) + + n_stumps : int (default 1) + + kwargs : others arguments + + Attributes + ---------- + param_names : + + distribs : + + weird_strings : + + n_stumps : + + nbCores : + + """ def __init__(self, random_state=None, n_iterations=200, n_stumps=1, **kwargs): + super(AdaboostGraalpy, self).__init__( n_iterations=n_iterations, n_stumps=n_stumps @@ -177,10 +226,28 @@ class AdaboostGraalpy(AdaBoostGP, BaseMonoviewClassifier): self.nbCores = kwargs["nbCores"] def canProbas(self): - """Used to know if the classifier can return label probabilities""" + """ + Used to know if the classifier can return label probabilities + + Returns + ------- + True in any case + """ return True def getInterpret(self, directory, y_test): + """ + + Parameters + ---------- + directory : + + y_test : + + Returns + ------- + retur string of interpret + """ np.savetxt(directory + "train_metrics.csv", self.losses, delimiter=',') np.savetxt(directory + "y_test_step.csv", self.test_preds, delimiter=',') diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/adaboost_pregen.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/adaboost_pregen.py index 511a5320da3e857974c946412a9c39c2458eb4ac..b29495352ce8a69edeff51d0f30e68b7db835288 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/adaboost_pregen.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/adaboost_pregen.py @@ -19,7 +19,55 @@ classifier_class_name = "AdaboostPregen" class AdaboostPregen(AdaBoostClassifier, BaseMonoviewClassifier, PregenClassifier): + """ + Parameters + ---------- + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. + + n_estimators : int number of estimators (default : 50) + + base_estimator : + + n_stumps : int (default : 1) + + estimators_generator : str, (default : "Stumps") + + max_depth : int (default : 1) + + self_complemeted : bool, (default : True) + + kwargs : others arguments + + + Attributes + ---------- + + param_names : list of parameters names + + classed_params : list of parameters names + + distribs : + + weird_strings : + + plotted_metric + + plotted_metric_name : str name of plotted metric + + step_predictions : + + estimators_generator : + + max_depth : + + n_stumps : + + self_complemented : + + """ def __init__(self, random_state=None, n_estimators=50, base_estimator=None, n_stumps=1, estimators_generator="Stumps", max_depth=1, self_complemeted=True, @@ -48,6 +96,21 @@ class AdaboostPregen(AdaBoostClassifier, BaseMonoviewClassifier, self.self_complemented = self_complemeted def fit(self, X, y, sample_weight=None): + """ + Fit the AdaboostPregen + + Parameters + ---------- + X : {array-like, sparse matrix}, shape (n_samples, n_features) + For kernel="precomputed", the expected shape of X is + (n_samples_test, n_samples_train). + y : { array-like, shape (n_samples,) + Target values class labels in classification + + sample_weight : + + + """ begin = time.time() pregen_X, pregen_y = self.pregen_voters(X, y) super(AdaboostPregen, self).fit(pregen_X, pregen_y, @@ -68,10 +131,29 @@ class AdaboostPregen(AdaBoostClassifier, BaseMonoviewClassifier, range(self.estimator_errors_.shape[0])]) def canProbas(self): - """Used to know if the classifier can return label probabilities""" + """ + Used to know if the classifier can return label probabilities + + Returns + ------- + True + """ return True def predict(self, X): + """ + + Parameters + ---------- + + X : {array-like, sparse matrix}, shape (n_samples, n_features) + For kernel="precomputed", the expected shape of X is + (n_samples_test, n_samples_train). + + Returns + ------- + + """ begin = time.time() pregen_X, _ = self.pregen_voters(X) pred = super(AdaboostPregen, self).predict(pregen_X) diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/cb_boost.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/cb_boost.py index b86aee42187bcc172740c3fa8bc227f779dd7bab..6955a79e97c9dc73f024227b36e2a5f897adad58 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/cb_boost.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/cb_boost.py @@ -5,9 +5,34 @@ from ..monoview.monoview_utils import BaseMonoviewClassifier, CustomRandint classifier_class_name = "CBBoost" class CBBoost(CBBoostClassifier, BaseMonoviewClassifier): + """ + Parameters + ---------- + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. + + n_max_iterations : + + n_stumps : + + kwargs : others arguments + + Attributes + ---------- + param_names : names of parameter used for hyper parameter search + + distribs : + + classed_params : + + weird_strings : + + """ def __init__(self, random_state=None, n_max_iterations=500, n_stumps=1, **kwargs): + super(CBBoost, self).__init__(n_max_iterations=n_max_iterations, random_state=random_state, self_complemented=True, @@ -25,13 +50,39 @@ class CBBoost(CBBoostClassifier, BaseMonoviewClassifier): self.weird_strings = {} def canProbas(self): - """Used to know if the classifier can return label probabilities""" + """ + Used to know if the classifier can return label probabilities + + Returns + ------- + True + """ return True def getInterpret(self, directory, y_test): + """ + return interpretation string + + Parameters + ---------- + + directory : + + y_test : + + Returns + ------- + + """ return self.getInterpretCBBoost(directory, y_test) def get_name_for_fusion(self): + """ + + Returns + ------- + string name of fusion + """ return "CBB" diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/cg_desc.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/cg_desc.py index e5ef93cd1645db0b8d8422112a7d4b6b22353f2e..85e8cdca5ad2d37ba16a48fd2d04f1b32e97f0b0 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/cg_desc.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/cg_desc.py @@ -5,10 +5,23 @@ from ..monoview.monoview_utils import BaseMonoviewClassifier, CustomRandint classifier_class_name = "CGDesc" class CGDesc(ColumnGenerationClassifierQar, BaseMonoviewClassifier): + """ + Parameters + ---------- + random_state + n_max_iterations + n_stumps + estimators_generator + twice_the_same + max_depth + kwargs + + """ def __init__(self, random_state=None, n_max_iterations=500, n_stumps=1, estimators_generator="Stumps", twice_the_same=True, max_depth=1, **kwargs): + super(CGDesc, self).__init__(n_max_iterations=n_max_iterations, random_state=random_state, self_complemented=True, diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/knn.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/knn.py index 5a08934db457d2e3edec08805501f0876594723c..e95be5ac9b45442ad4880f437ae04a12d96ed6d5 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/knn.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/knn.py @@ -11,9 +11,22 @@ classifier_class_name = "KNN" class KNN(KNeighborsClassifier, BaseMonoviewClassifier): + """ + Implement extention of KNeighborsClassifier of sklearn + for the usage of the multiview_platform. + Parameters + ---------- + random_state + n_neighbors + weights + algorithm + p + kwargs + """ def __init__(self, random_state=None, n_neighbors=5, weights='uniform', algorithm='auto', p=2, **kwargs): + super(KNN, self).__init__( n_neighbors=n_neighbors, weights=weights, diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/lasso.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/lasso.py index 30af6f5b1839a68ab13bfe7dab37bda9eb3db1d3..0e8b3c41e7d2404eecc52b393b0ce74a0de0e329 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/lasso.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/lasso.py @@ -12,9 +12,42 @@ __status__ = "Prototype" # Production, Development, Prototype classifier_class_name = "Lasso" class Lasso(LassoSK, BaseMonoviewClassifier): + """ + Parameters + ---------- + random_state : + + alpha : float, optional + Constant that multiplies the L1 term. Defaults to 1.0. + ``alpha = 0`` is equivalent to an ordinary least square, solved + by the :class:`LinearRegression` object. For numerical + reasons, using ``alpha = 0`` is with the Lasso object is + not advised + and you should prefer the LinearRegression object. (default( : 10) + + max_iter : int The maximum number of iterations (default : 10) + + warm_start : bool, optional + When set to True, reuse the solution of the previous call to fit as + initialization, otherwise, just erase the previous solution. + + kwargs : others arguments + + Attributes + ---------- + param_name : + + classed_params : + + distribs : + + weird_strings : + + """ def __init__(self, random_state=None, alpha=1.0, max_iter=10, warm_start=False, **kwargs): + super(Lasso, self).__init__( alpha=alpha, max_iter=max_iter, @@ -40,12 +73,31 @@ class Lasso(LassoSK, BaseMonoviewClassifier): return signed def canProbas(self): - """Used to know if the classifier can return label probabilities""" + """ + Used to know if the classifier can return label probabilities + + Returns + ------- + False + """ return False def getInterpret(self, directory, y_test): - interpretString = "" - return interpretString + """ + return the interpreted string + + Parameters + ---------- + directory : + + y_test : + + Returns + ------- + interpreted string, str interpret_string + """ + interpret_string = "" + return interpret_string # def formatCmdArgs(args): diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq.py index 21345552b14dc0c2493e3d92d88a152b46de5a80..6956a8553ec0899bf1dbe69524f5bada8796d44a 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq.py @@ -444,6 +444,13 @@ class DecisionStumpVoter(Voter): direction : int (-1 or 1) Used to reverse classification decision + + Attributes + ---------- + + attribute_index : + threshold : + direction : """ def __init__(self, attribute_index, threshold, direction=1): @@ -508,6 +515,19 @@ class StumpsVotersGenerator(VotersGenerator): def generate(self, X, y=None, self_complemented=False, only_complements=False): + """ + + Parameters + ---------- + X + y + self_complemented + only_complements + + Returns + ------- + + """ voters = [] if len(X) != 0: for i in range(len(X[0])): diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy.py index 90e196aba1fe9b8fb6aa0fbd131ad6f713fd4bd6..ddae76cb8b7400d56fc5335138b917dedad2f431 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy.py @@ -9,14 +9,22 @@ classifier_class_name = "MinCQGraalpy" class MinCQGraalpy(RegularizedBinaryMinCqClassifier, BaseMonoviewClassifier): """ + MinCQGraalpy extend of ``RegularizedBinaryMinCqClassifier `` Parameters ---------- - random_state - mu - self_complemented - n_stumps_per_attribute - kwargs + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. + + mu : float, (default: 0.01) + + self_complemented : bool (default : True) + + n_stumps_per_attribute : (default: =1 + + kwargs : others arguments + Attributes ---------- @@ -30,7 +38,7 @@ class MinCQGraalpy(RegularizedBinaryMinCqClassifier, BaseMonoviewClassifier): weird_strings - nbCores + nbCores : number of cores """ def __init__(self, random_state=None, mu=0.01, self_complemented=True, diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy_tree.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy_tree.py index bc2a228cd46bdb2b73a53a3152caaaf034af2402..3e0f370a6ebe906278d980ecfb0e3b075381a305 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy_tree.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/min_cq_graalpy_tree.py @@ -12,13 +12,35 @@ class MinCQGraalpyTree(RegularizedBinaryMinCqClassifier, Parameters ---------- - random_state - mu - self_complemented - n_stumps_per_attribute - max_depth - kwargs + random_state : + mu : (default : 0.01) + + self_complemented : ( default : True) + + n_stumps_per_attribute : int ( default : 1) + max_depth : + + kwargs : others parameters + + + Attributes + ---------- + param_name : + + distribs : + + classed_params : + + n_stumps_per_attribute : int + + weird_strings : + + max_depth : + + random_state : + + nbCores : """ def __init__(self, random_state=None, mu=0.01, self_complemented=True, n_stumps_per_attribute=1, max_depth=2, **kwargs): @@ -44,10 +66,28 @@ class MinCQGraalpyTree(RegularizedBinaryMinCqClassifier, self.nbCores = kwargs["nbCores"] def canProbas(self): - """Used to know if the classifier can return label probabilities""" + """ + Used to know if the classifier can return label probabilities + + Returns + ------- + True + """ return True def set_params(self, **params): + """ + set parameter in the input dictionary + + Parameters + ---------- + params : dict parameter to set + + Returns + ------- + self : object + Returns self. + """ self.mu = params["mu"] self.random_state = params["random_state"] self.n_stumps_per_attribute = params["n_stumps_per_attribute"] @@ -55,11 +95,35 @@ class MinCQGraalpyTree(RegularizedBinaryMinCqClassifier, return self def get_params(self, deep=True): + """ + get parameter + + Parameters + ---------- + deep : (boolean (default : True) not used + + Returns + ------- + dictionary of parameter as key and its values + """ return {"random_state": self.random_state, "mu": self.mu, "n_stumps_per_attribute": self.n_stumps_per_attribute, "max_depth": self.max_depth} def getInterpret(self, directory, y_test): + """ + + Parameters + ---------- + directory : + + y_test : + + + Returns + ------- + string for interpretation interpret_string + """ interpret_string = "Cbound on train :" + str(self.train_cbound) np.savetxt(directory + "times.csv", np.array([self.train_time, 0])) # interpret_string += "Train C_bound value : "+str(self.cbound_train) diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/random_forest.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/random_forest.py index 8b2caef15dd827e0c30ec3984512d72f6a154c65..95c16e923136a2f984547fc453a2a03515de71e0 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/random_forest.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/random_forest.py @@ -14,25 +14,28 @@ class RandomForest(RandomForestClassifier, BaseMonoviewClassifier): Parameters ---------- - random_state + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. - n_estimators + n_estimators : int (default : 10) number of estimators - max_depth : int maximum of depth (default : 10) + max_depth : int , optional (default : None) maximum of depth criterion : criteria (default : 'gini') - kwargs + kwargs : others arguments + Attributes ---------- - param_names + param_names : - distribs + distribs : - classed_params + classed_params : - weird_strings + weird_strings : """ def __init__(self, random_state=None, n_estimators=10, diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/scm_pregen.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/scm_pregen.py index 57026c02e2ba84d4a16deac4a6f8554e02f636fc..363577077cc0a6a22ad577dfa8c0eb891597c160 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/scm_pregen.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/scm_pregen.py @@ -18,7 +18,10 @@ class SCMPregen(BaseMonoviewClassifier, PregenClassifier, scm): Parameters ---------- - random_state + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. + model_type max_rules p @@ -72,7 +75,7 @@ class SCMPregen(BaseMonoviewClassifier, PregenClassifier, scm): Returns ------- - parame + parameters dictionary """ params = super(SCMPregen, self).get_params(deep) params["estimators_generator"] = self.estimators_generator @@ -90,6 +93,7 @@ class SCMPregen(BaseMonoviewClassifier, PregenClassifier, scm): X {array-like, sparse matrix}, shape (n_samples, n_features) For kernel="precomputed", the expected shape of X is (n_samples_test, n_samples_train). + y : { array-like, shape (n_samples,) Target values class labels in classification diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/sgd.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/sgd.py index f8a10d6fa5df4f5b39d4c7681fb9bc72303be47a..2418b13f781ee907e7e9f87d616669bf8ecb3f6b 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/sgd.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/sgd.py @@ -13,11 +13,28 @@ class SGD(SGDClassifier, BaseMonoviewClassifier): Parameters ---------- - random_state - loss - penalty - alpha - kwargs + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. + + loss : str , (default = "hinge") + penalty : str, (default = "l2") + + alpha : float, (default = 0.0001) + + kwargs : other arguments + + + Attributes + ---------- + param_names : + + distribs : + + classed_params : + + weird_strings : + """ def __init__(self, random_state=None, loss='hinge', penalty='l2', alpha=0.0001, **kwargs): diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_linear.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_linear.py index e26e5796256450cff500f416469900c1d08c1d46..e727fed132ef0a3e5e81e54862627c5991461ff2 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_linear.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_linear.py @@ -13,9 +13,15 @@ class SVMLinear(SVCClassifier, BaseMonoviewClassifier): Parameters ---------- - random_state - C - kwargs + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. + + + C : float, optional (default=1.0) + Penalty parameter C of the error term. + + kwargs : others arguments """ def __init__(self, random_state=None, C=1.0, **kwargs): diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_poly.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_poly.py index 3d389802abb7fe0ba56a384c3e27074aef8db4c2..a745092f23cc583624f9b0aa6d84b7bb903ed545 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_poly.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_poly.py @@ -14,13 +14,19 @@ class SVMPoly(SVCClassifier, BaseMonoviewClassifier): Parameters ---------- - random_state + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. - C - degree + C : float, optional (default=1.0) + Penalty parameter C of the error term. + + + degree : + + kwargs : others arguments - kwargs Attributes ---------- diff --git a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_rbf.py b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_rbf.py index 16727901006e0e451b18c82c8f7008f56916701b..b341845377179cdfb17574ba2e4ec8589541bad5 100644 --- a/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_rbf.py +++ b/multiview_platform/mono_multi_view_classifiers/monoview_classifiers/svm_rbf.py @@ -14,9 +14,13 @@ class SVMRBF(SVCClassifier, BaseMonoviewClassifier): Parameters ---------- - random_state - C - kwargs + random_state : int seed, RandomState instance, or None (default=None) + The seed of the pseudo random number generator to use when + shuffling the data. + + C : + + kwargs : others arguments Attributes ----------