> I've been trying to understand how to use sklearn for this as there is
> no need for me to rewrite the basic CV functions. I'd like to be able
> to use my own custom estimator (so I guess I just need a subclass of
> BaseEstimator with a `fit` method with (X,y) signature?), as well as my
> own modification of the score.

Be aware that scikit-learn assume a few things about estimators. One of
them being that the __init__ should not do anything else than store the
parameters that it is given. 

> I'd be happy to understand the code for an estimator whose fit returns
> `np.zeros(X.shape[1])`

Another assumption is that "fit" always returns self.

The API that defines a scikit-learn object is detailed here:
http://scikit-learn.org/stable/developers/contributing.html#apis-of-scikit-learn-objects
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn

Reply via email to