chemicalchecker.tool.targetmate.nonconformist.base.BaseModelAdapter

class BaseModelAdapter(model, fit_params=None)[source]

Bases: BaseEstimator

Methods

fit

Fits the model.

get_params

Get parameters for this estimator.

predict

Returns the prediction made by the underlying model.

set_params

Set the parameters of this estimator.

fit(x, y)[source]

Fits the model.

Parameters

xnumpy array of shape [n_samples, n_features]

Inputs of examples for fitting the model.

ynumpy array of shape [n_samples]

Outputs of examples for fitting the model.

Returns

None

get_params(deep=True)

Get parameters for this estimator.

Parameters

deepbool, default=True

If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns

paramsdict

Parameter names mapped to their values.

predict(x)[source]

Returns the prediction made by the underlying model.

Parameters

xnumpy array of shape [n_samples, n_features]

Inputs of test examples.

Returns

ynumpy array of shape [n_samples]

Predicted outputs of test examples.

set_params(**params)

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.

Parameters

**paramsdict

Estimator parameters.

Returns

selfestimator instance

Estimator instance.