title: What's the full specification for implementing a custom scikit-learn estimator?
body: <p>I'm rolling my own predictor and want to use it like I would use any of the scikit routines (e.g. RandomForestRegressor). I have a class containing <code>fit</code> and <code>predict</code> methods that seem to work fine. However, when I try to use some of the scikit methods, such as cross validation, I get errors like:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Python27\lib\site-packages\sklearn\cross_validation.py", line 1152, in cross_val_
  score
      for train, test in cv)
    File "C:\Python27\lib\site-packages\sklearn\externals\joblib\parallel.py", line 516, in __
  call__
      for function, args, kwargs in iterable:
    File "C:\Python27\lib\site-packages\sklearn\cross_validation.py", line 1152, in &lt;genexpr&gt;
      for train, test in cv)
    File "C:\Python27\lib\site-packages\sklearn\base.py", line 43, in clone
      % (repr(estimator), type(estimator)))
  TypeError: Cannot clone object '&lt;__main__.Custom instance at 0x033A6990&gt;' (type &lt;type 'inst
  ance'&gt;): it does not seem to be a scikit-learn estimator a it does not implement a 'get_para
  ms' methods.
  </code></pre>
  
  <p>I see that it wants me to implement some methods (presumably <code>get_params</code> as well as maybe <code>set_params</code> and <code>score</code>) but I'm not sure what the right specification for making these methods is. Is there some information available on this topic? Thanks.</p>