>>>Ok - then that's the problem - for regression problems you have to use >>>RandomForestRegressor instead of RandomForestClassifier.
>>>best, >>>Peter All , I just changed my code by clf = RandomForestRegressor(n_estimators=5) it works properly and it takes 15 Seconds to run !!!!! Thanks again to all !!!! TWO supplementary questions: 1) using PANDA, do I need all the time to write value to converse : fit(feature.values, label.values.ravel()) 2) How can I extract the rule of all the nodes of my tree/random forest , I expected something that: ( NODE 1: tree 5 : if and and and then ) Didier Vila, PhD | Risk | CapQuest Group Ltd | Fleet 27 | Rye Close | Fleet | Hampshire | GU51 2QQ | Fax: 0871 574 2992 | Email: dv...@capquestco.com -----Original Message----- From: Peter Prettenhofer [mailto:peter.prettenho...@gmail.com] Sent: 24 October 2012 17:03 To: scikit-learn-general@lists.sourceforge.net Subject: Re: [Scikit-learn-general] Panda / Tree and Random Forest 2012/10/24 Didier Vila <dv...@capquestco.com>: > Peter, > > Thanks for the email. > > I just started to use Panda this morning. > > Feature are integer ( binary or 0-1-2-3) or real . > > Note that my target variable is continuous between 0 and 1. Ok - then that's the problem - for regression problems you have to use RandomForestRegressor instead of RandomForestClassifier. best, Peter > > I just run your code below and I still have the same issue on that. > > clf.fit(feature.values, label.values.ravel()) > > Regards > > Didier > > Ps: the initial codes worked for 100 samples. > > Didier Vila, PhD | Risk | CapQuest Group Ltd | Fleet 27 | Rye Close | Fleet | > Hampshire | GU51 2QQ | Fax: 0871 574 2992 | Email: dv...@capquestco.com > > > -----Original Message----- > From: Peter Prettenhofer [mailto:peter.prettenho...@gmail.com] > Sent: 24 October 2012 16:36 > To: scikit-learn-general@lists.sourceforge.net > Subject: Re: [Scikit-learn-general] Panda / Tree and Random Forest > > Didier, > > what type is ``feature`` (simply print ``type(feature``)? Considering > your first email I suspect its a pandas.DataFrame; scikit-learn > estimators require array-like inputs - so please do > ``clf.fit(features.values, labels.values.ravel())`` instead of > ``clf.fit(features, values)``. > > 150000 is quite a lot; but if you just want to fit 5 trees it should > run in under 15 seconds (I tested using random data and binary > classification). > > best, > Peter > > 2012/10/24 Didier Vila <dv...@capquestco.com>: >> Thanks, I will have a look. >> >> Didier Vila, PhD | Risk | CapQuest Group Ltd | Fleet 27 | Rye Close | Fleet >> | Hampshire | GU51 2QQ | Fax: 0871 574 2992 | Email: dv...@capquestco.com >> >> -----Original Message----- >> From: Andreas Mueller [mailto:amuel...@ais.uni-bonn.de] >> Sent: 24 October 2012 15:44 >> To: scikit-learn-general@lists.sourceforge.net >> Subject: Re: [Scikit-learn-general] Panda / Tree and Random Forest >> >> As an addition, maybe it would be good for you to have a look into the >> tutorial: >> http://scikit-learn.org/dev/tutorial/basic/tutorial.html >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> Scikit-learn-general mailing list >> Scikit-learn-general@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general >> This e-mail is intended solely for the addressee, is strictly confidential >> and may also be legally privileged. If you are not the addressee please do >> not read, print, re-transmit, store or act in reliance on it or any >> attachments. Instead, please email it back to the sender and then >> immediately permanently delete it. E-mail communications cannot be >> guaranteed to be secure or error free, as information could be intercepted, >> corrupted, amended, lost, destroyed, arrive late or incomplete, or contain >> viruses. We do not accept liability for any such matters or their >> consequences. Anyone who communicates with us by e-mail is taken to accept >> the risks in doing so. Opinions, conclusions and other information in this >> e-mail and any attachments are solely those of the author and do not >> represent those of CapQuest Group Limited or any of its subsidiaries unless >> otherwise stated. CapQuest Group Limited (registered number 4936030), >> CapQuest Debt Recovery Limited (registered number 3772278), CapQuest >> Investments Limited (registered number 5245825), CapQuest Asset Management >> Limited (registered number 5245829) and CapQuest Mortgage Servicing Limited >> (registered number 05821008) are all limited companies registered in England >> and Wales with their registered offices at Fleet 27, Rye Close, Fleet, >> Hampshire, GU51 2QQ. Each company is a separate and independent legal >> entity. None of the companies have any liability for each other's acts or >> omissions. This communication is from the company named in the sender's >> details above. >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> Scikit-learn-general mailing list >> Scikit-learn-general@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general > > > > -- > Peter Prettenhofer > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Scikit-learn-general mailing list > Scikit-learn-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/scikit-learn-general > This e-mail is intended solely for the addressee, is strictly confidential > and may also be legally privileged. If you are not the addressee please do > not read, print, re-transmit, store or act in reliance on it or any > attachments. Instead, please email it back to the sender and then immediately > permanently delete it. E-mail communications cannot be guaranteed to be > secure or error free, as information could be intercepted, corrupted, > amended, lost, destroyed, arrive late or incomplete, or contain viruses. We > do not accept liability for any such matters or their consequences. Anyone > who communicates with us by e-mail is taken to accept the risks in doing so. > Opinions, conclusions and other information in this e-mail and any > attachments are solely those of the author and do not represent those of > CapQuest Group Limited or any of its subsidiaries unless otherwise stated. > CapQuest Group Limited (registered number 4936030), CapQuest Debt Recovery > Limited (registered number 3772278), CapQuest Investments Limited (registered > number 5245825), CapQuest Asset Management Limited (registered number > 5245829) and CapQuest Mortgage Servicing Limited (registered number 05821008) > are all limited companies registered in England and Wales with their > registered offices at Fleet 27, Rye Close, Fleet, Hampshire, GU51 2QQ. Each > company is a separate and independent legal entity. None of the companies > have any liability for each other's acts or omissions. This communication is > from the company named in the sender's details above. > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Scikit-learn-general mailing list > Scikit-learn-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Peter Prettenhofer ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general This e-mail is intended solely for the addressee, is strictly confidential and may also be legally privileged. If you are not the addressee please do not read, print, re-transmit, store or act in reliance on it or any attachments. Instead, please email it back to the sender and then immediately permanently delete it. E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept liability for any such matters or their consequences. Anyone who communicates with us by e-mail is taken to accept the risks in doing so. Opinions, conclusions and other information in this e-mail and any attachments are solely those of the author and do not represent those of CapQuest Group Limited or any of its subsidiaries unless otherwise stated. CapQuest Group Limited (registered number 4936030), CapQuest Debt Recovery Limited (registered number 3772278), CapQuest Investments Limited (registered number 5245825), CapQuest Asset Management Limited (registered number 5245829) and CapQuest Mortgage Servicing Limited (registered number 05821008) are all limited companies registered in England and Wales with their registered offices at Fleet 27, Rye Close, Fleet, Hampshire, GU51 2QQ. Each company is a separate and independent legal entity. None of the companies have any liability for each other's acts or omissions. This communication is from the company named in the sender's details above. ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general