Hi Miquel,

These options are not available within
RandomForestClassifier/Regressor. By default len(X) are drawn with
replacement.

However, you can achieve what you look for using
BaggingClassifier(base_estimator=DecisionTreeClassifier(...),
max_samples=..., max_features=...), where max_samples and max_features
are the number of samples/features drawn to be build each base
estimator. If you want to draw samples (resp features) with
replacement, set bootstrap=True (resp bootstrap_features=True).

Best,
Gilles

On 16 December 2014 at 09:06, Miquel Camprodon
<miquel.campro...@kernel-analytics.com> wrote:
> Hi all,
>
> I am a newbie in the use of scikit-learn. Congratulations for the project!
>
> (1) I am using the ensemble methods RandomForestRegressor and
> RandomForestClassifier. I would like to adjust the number of subsamples each
> estimator will use. How can I achieve this? My background is in R, and in
> that language there is the sampsize parameter which allows to control it.
> If it is not possible, how are subsamples drawn for each estimator in
> scikit-learn?
>
> (2) How can I parametrize the number of features each estimator will use?
>
> (3) If the answer is that I should write my own ensemble, can you give me
> some hints about how to do it?
>
> Thanks a lot,
>
> Miquel
>
> Aviso legal: Este mensaje, incluidos sus ficheros adjuntos, contienen
> información confidencial, dirigida a un destinatario y con una finalidad
> específica protegida por la Ley. Le informamos que si Usted no es el
> destinatario del mismo, deberá eliminar éste mensaje, quedando estrictamente
> prohibida cualquier divulgación, copia o distribución de su contenido, así
> como desarrollar o ejecutar cualquier tipo de acción basada en su contenido.
> Si Usted es el destinatario, el uso de la información que ha recibido,
> deberá estar limitado a la finalidad específica por la cual se le ha
> enviado.
>
> Disclaimer: This message, including its attachments, contains confidential
> information addressed to a recipient for a specific purpose protected by
> law. Please note that if you are not the intended addressee of this message
> you must immediately delete the message and its attachments. Any disclosure,
> copying or distribution of the contents of this message is strictly
> forbidden. The execution of any action based on the contents of this message
> is strictly forbidden. If you are the intended recipient, the use of the
> information received shall be limited to the specific purpose for which it
> has been sent.
>
> Avís legal: Aquest missatge, inclosos els seus fitxers adjunts, conté
> informació confidencial, dirigida a un destinatari i amb una finalitat
> específica protegida per la Llei. L'informem que si Vostè no és el
> destinatari del mateix, haurà d’eliminar aquest correu, quedant estrictament
> prohibida qualsevol divulgació, còpia o distribució del seu contingut, així
> com desenvolupar o executar qualsevol tipus d’acció basada en el seu
> contingut. Si Vostè és el destinatari, l’ús de la informació que ha rebut
> haurà d’estar limitat a la finalitat específica per la qual se li ha enviat.
>
> ------------------------------------------------------------------------------
> 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=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>

------------------------------------------------------------------------------
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=164703151&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