You need fit, predict, and set_params. But set_params you can get by inheriting sklearn.base.BaseEstimator
G On Mon, Feb 16, 2015 at 05:50:24AM +0000, Pagliari, Roberto wrote: > I'd like to implement my own regressor/classificator and possibly use it in a > pipeline. > do I need to implement all methods below or can some of them be missing? > ┌───────────────────────────────────┬─────────────────────────────────────────┐ > │decision_function(X) │Predict using the linear model > │ > ├───────────────────────────────────┼─────────────────────────────────────────┤ > │densify() │Convert coefficient matrix to dense > array│ > │ │format. > │ > ├───────────────────────────────────┼─────────────────────────────────────────┤ > │fit(X, y │Fit linear model with Stochastic > Gradient│ > │[, coef_init, intercept_init, ...])│Descent. > │ > ├───────────────────────────────────┼─────────────────────────────────────────┤ > │fit_transform(X[, y]) │Fit to data, then transform it. > │ > ├───────────────────────────────────┼─────────────────────────────────────────┤ > │get_params([deep]) │Get parameters for this estimator. > │ > ├───────────────────────────────────┼─────────────────────────────────────────┤ > │partial_fit(X, y[, sample_weight]) │Fit linear model with Stochastic > Gradient│ > │ │Descent. > │ > ├───────────────────────────────────┼─────────────────────────────────────────┤ > │predict(X) │Predict using the linear model > │ > ├───────────────────────────────────┼─────────────────────────────────────────┤ > │score(X, y[, sample_weight]) │Returns the coefficient of determination > │ > │ │R^2 of the prediction. > │ > ├───────────────────────────────────┼─────────────────────────────────────────┤ > │set_params(*args, **kwargs) │ > │ > ├───────────────────────────────────┼─────────────────────────────────────────┤ > │sparsify() │Convert coefficient matrix to sparse > │ > │ │format. > │ > ├───────────────────────────────────┼─────────────────────────────────────────┤ > │transform(X[, threshold]) │Reduce X to its most important features. > │ > └───────────────────────────────────┴─────────────────────────────────────────┘ > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk > _______________________________________________ > Scikit-learn-general mailing list > Scikit-learn-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Gael Varoquaux Researcher, INRIA Parietal Laboratoire de Neuro-Imagerie Assistee par Ordinateur NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France Phone: ++ 33-1-69-08-79-68 http://gael-varoquaux.info http://twitter.com/GaelVaroquaux ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general