tclf.TemplateEstimator¶
- class tclf.TemplateEstimator(demo_param='demo_param')[source]¶
A template estimator to be used as a reference implementation.
For more information regarding how to build your own estimator, read more in the User Guide.
- Parameters:
- demo_paramstr, default=’demo_param’
A parameter used for demonstation of how to pass and store paramters.
Examples
>>> from tclf import TemplateEstimator >>> import numpy as np >>> X = np.arange(100).reshape(100, 1) >>> y = np.zeros((100, )) >>> estimator = TemplateEstimator() >>> estimator.fit(X, y) TemplateEstimator()
- fit(X, y)[source]¶
A reference implementation of a fitting function.
- Parameters:
- X{array-like, sparse matrix}, shape (n_samples, n_features)
The training input samples.
- yarray-like, shape (n_samples,) or (n_samples, n_outputs)
The target values (class labels in classification, real numbers in regression).
- Returns:
- selfobject
Returns self.