If you're running a random forest with default parameters (max_depth=None,
min_samples_split=2,
min_samples_leaf=1, min_weight_fraction_leaf=0, max_leaf_nodes=None), the
size of the tree will tend towards the size of the dataset. Change some of
these parameters to reduce overfitting and model size.

On 10 April 2016 at 10:13, Piotr Płoński <pplonsk...@gmail.com> wrote:

> Hi All,
>
> I am saving RandomForestClassifier model from sklearn library with code
> below
>
> with open('/tmp/rf.model', 'wb') as f: cPickle.dump(RF_model, f)
>
> It takes a lot of space on my hard drive. There are only 50 trees in the
> model, however it takes over 50 MB on disk (analyzed dataset is ~ 20MB,
> with 21 features). Does anybody have idea why? I observe similar behavior
> for ExtraTreesClassifier.
>
> Best,
>
> Piotr
>
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications
> Manager
> Applications Manager provides deep performance insights into multiple
> tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
> gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to