module sklapi.sklearn_base_classifier

Inheritance diagram of mlinsights.sklapi.sklearn_base_classifier

Short summary

module mlinsights.sklapi.sklearn_base_classifier

Implements class SkBaseClassifier.

source on GitHub

Classes

class

truncated documentation

SkBaseClassifier

Defines a custom classifier.

Methods

method

truncated documentation

__init__

constructor

predict_proba

Returns probability estimates for the test data X.

score

Returns the mean accuracy on the given test data and labels.

Documentation

Implements class SkBaseClassifier.

source on GitHub

class mlinsights.sklapi.sklearn_base_classifier.SkBaseClassifier(**kwargs)[source]

Bases: mlinsights.sklapi.sklearn_base_learner.SkBaseLearner

Defines a custom classifier.

source on GitHub

constructor

source on GitHub

__init__(**kwargs)[source]

constructor

source on GitHub

predict_proba(X)[source]

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.

source on GitHub

score(X, y=None, sample_weight=None)[source]

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.

source on GitHub