module sklapi.sklearn_base_classifier
#
Short summary#
module mlinsights.sklapi.sklearn_base_classifier
Implements class SkBaseClassifier
.
Classes#
class |
truncated documentation |
---|---|
Defines a custom classifier. |
Methods#
method |
truncated documentation |
---|---|
constructor |
|
Returns probability estimates for the test data X. |
|
Returns the mean accuracy on the given test data and labels. |
Documentation#
Implements class SkBaseClassifier
.
- class mlinsights.sklapi.sklearn_base_classifier.SkBaseClassifier(**kwargs)#
Bases:
SkBaseLearner
Defines a custom classifier.
constructor
- __init__(**kwargs)#
constructor
- predict_proba(X)#
Returns probability estimates for the test data X.
- Parameters:
X – Training data, numpy array or sparse matrix of shape [n_samples,n_features]
- Returns:
array, shape = (n_samples,.), Returns predicted values.
- score(X, y=None, sample_weight=None)#
Returns the mean accuracy on the given test data and labels.
- Parameters:
X – Training data, numpy array or sparse matrix of shape [n_samples,n_features]
y – Target values, numpy array of shape [n_samples, n_targets] (optional)
sample_weight – Weight values, numpy array of shape [n_samples, n_targets] (optional)
- Returns:
score : float, Mean accuracy of self.predict(X) wrt. y.