skmultilearn.base.base module¶
-
class
skmultilearn.base.base.MLClassifierBase[source]¶ Bases:
sklearn.base.BaseEstimator,sklearn.base.ClassifierMixinBase class providing API and common functions for all multi-label classifiers.
Implements base functionality for ML classifiers, especially the get/set params for scikit-learn compatibility.
-
fit(X, y)[source]¶ Abstract method to fit classifier with training data
It must return a fitted instance of
self.Parameters: - X (numpy.ndarray or scipy.sparse) – input features, can be a dense or sparse matrix of size
(n_samples, n_features) - y (numpy.ndaarray or scipy.sparse {0,1}) – binary indicator matrix with label assignments.
Returns: fitted instance of self
Return type: Raises: NotImplementedError– this is just an abstract method- X (numpy.ndarray or scipy.sparse) – input features, can be a dense or sparse matrix of size
-
get_params(deep=True)[source]¶ Get parameters to sub-objects
Introspection of classifier for search models like cross-validation and grid search.
Parameters: deep (bool) – if Trueall params will be introspected also and appended to the output dictionary.Returns: out – dictionary of all parameters and their values. If deep=Truethe dictionary also holds the parameters of the parameters.Return type: dict
-
predict(X)[source]¶ Abstract method to predict labels
Parameters: X (numpy.ndarray or scipy.sparse.csc_matrix) – input features of shape (n_samples, n_features)Returns: binary indicator matrix with label assignments with shape (n_samples, n_labels)Return type: scipy.sparse of int Raises: NotImplementedError– this is just an abstract method
-