2013/9/17 Maheshakya Wijewardena <pmaheshak...@gmail.com>:
> this is the __init__ function.
>
>
> def __init__(self, base_estimator, n_estimators=10, max_samples=1.0,
> bootstrap=True, oob_score=False, n_jobs=1,
> random_state=None, verbose=0):
>         if base_estimator == None:
>             base_estimator = DecisionTreeRegressor
>
>         super(BaggingRegressor, self).__init__(base_estimator,
> n_estimators=n_estimators, max_samples=max_samples,
> bootstrap=bootstrap, oob_score=oob_score,
>              n_jobs=n_jobs, random_state=random_state, verbose=verbose)
>
>

As said earlier, if you want to follow the sklearn API, your should
make it possible to instantiate your estimator without passing any
parameters. In particular here base_estimator has no default value.
Have a look at the recently merged implementation of
BaggingClassifier/Regressor for a solution to this problem.

Have a look at the source code of the common tests to better
understand all the assumptions that are checked.

https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tests/test_common.py

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to