oddt.scoring.models package

Submodules

oddt.scoring.models.classifiers module

oddt.scoring.models.classifiers.randomforest

alias of sklearn.ensemble.forest.RandomForestClassifier

class oddt.scoring.models.classifiers.svm(*args, **kwargs)[source]

Bases: oddt.scoring.models.classifiers.OddtClassifier

Methods

fit(descs, target_values, **kwargs)
get_params([deep])
predict(descs)
predict_log_proba(descs)
predict_proba(descs)
score(descs, target_values) Returns the mean accuracy on the given test data and labels.
set_params(**kwargs)
fit(descs, target_values, **kwargs)
get_params(deep=True)
predict(descs)
predict_log_proba(descs)
predict_proba(descs)
score(descs, target_values)

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

In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted.

Parameters:

X : array-like, shape = (n_samples, n_features)

Test samples.

y : array-like, shape = (n_samples) or (n_samples, n_outputs)

True labels for X.

sample_weight : array-like, shape = [n_samples], optional

Sample weights.

Returns:

score : float

Mean accuracy of self.predict(X) wrt. y.

set_params(**kwargs)
class oddt.scoring.models.classifiers.neuralnetwork(*args, **kwargs)[source]

Bases: oddt.scoring.models.classifiers.OddtClassifier

Methods

fit(descs, target_values, **kwargs)
get_params([deep])
predict(descs)
predict_log_proba(descs)
predict_proba(descs)
score(descs, target_values) Returns the mean accuracy on the given test data and labels.
set_params(**kwargs)
fit(descs, target_values, **kwargs)
get_params(deep=True)
predict(descs)
predict_log_proba(descs)
predict_proba(descs)
score(descs, target_values)

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

In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted.

Parameters:

X : array-like, shape = (n_samples, n_features)

Test samples.

y : array-like, shape = (n_samples) or (n_samples, n_outputs)

True labels for X.

sample_weight : array-like, shape = [n_samples], optional

Sample weights.

Returns:

score : float

Mean accuracy of self.predict(X) wrt. y.

set_params(**kwargs)

oddt.scoring.models.regressors module

Collection of regressors models

oddt.scoring.models.regressors.randomforest

alias of sklearn.ensemble.forest.RandomForestRegressor

class oddt.scoring.models.regressors.svm(*args, **kwargs)[source]

Bases: oddt.scoring.models.regressors.OddtRegressor

Methods

fit(descs, target_values, **kwargs)
get_params([deep])
predict(descs)
score(descs, target_values) Returns the coefficient of determination R^2 of the prediction.
set_params(**kwargs)
fit(descs, target_values, **kwargs)
get_params(deep=True)
predict(descs)
score(descs, target_values)

Returns the coefficient of determination R^2 of the prediction.

The coefficient R^2 is defined as (1 - u/v), where u is the residual sum of squares ((y_true - y_pred) ** 2).sum() and v is the total sum of squares ((y_true - y_true.mean()) ** 2).sum(). The best possible score is 1.0 and it can be negative (because the model can be arbitrarily worse). A constant model that always predicts the expected value of y, disregarding the input features, would get a R^2 score of 0.0.

Parameters:

X : array-like, shape = (n_samples, n_features)

Test samples.

y : array-like, shape = (n_samples) or (n_samples, n_outputs)

True values for X.

sample_weight : array-like, shape = [n_samples], optional

Sample weights.

Returns:

score : float

R^2 of self.predict(X) wrt. y.

set_params(**kwargs)
oddt.scoring.models.regressors.pls

alias of sklearn.cross_decomposition.pls_.PLSRegression

class oddt.scoring.models.regressors.neuralnetwork(*args, **kwargs)[source]

Bases: oddt.scoring.models.regressors.OddtRegressor

Methods

fit(descs, target_values, **kwargs)
get_params([deep])
predict(descs)
score(descs, target_values) Returns the coefficient of determination R^2 of the prediction.
set_params(**kwargs)
fit(descs, target_values, **kwargs)
get_params(deep=True)
predict(descs)
score(descs, target_values)

Returns the coefficient of determination R^2 of the prediction.

The coefficient R^2 is defined as (1 - u/v), where u is the residual sum of squares ((y_true - y_pred) ** 2).sum() and v is the total sum of squares ((y_true - y_true.mean()) ** 2).sum(). The best possible score is 1.0 and it can be negative (because the model can be arbitrarily worse). A constant model that always predicts the expected value of y, disregarding the input features, would get a R^2 score of 0.0.

Parameters:

X : array-like, shape = (n_samples, n_features)

Test samples.

y : array-like, shape = (n_samples) or (n_samples, n_outputs)

True values for X.

sample_weight : array-like, shape = [n_samples], optional

Sample weights.

Returns:

score : float

R^2 of self.predict(X) wrt. y.

set_params(**kwargs)
oddt.scoring.models.regressors.mlr

alias of sklearn.linear_model.base.LinearRegression

Module contents