Re: [Scikit-learn-general] Shape of classes_ varies?
Thanks Gilles! On Tue, Dec 4, 2012 at 11:37 PM, Gilles Louppe g.lou...@gmail.com wrote: Doug, You will be happy to hear that this is now freshly fixed in master. Attributes are now flat in case of single output problems (as you expected) and nested for multi-output problems (as before). Best, Gilles On 30 November 2012 17:31, Gael Varoquaux gael.varoqu...@normalesup.org wrote: I guess transforming it would be more in line with other classifiers. The design decision could be You should only have to know about multi-output if you want to use it. I agree with this philosophy. -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Re: [Scikit-learn-general] Shape of classes_ varies?
I guess transforming it would be more in line with other classifiers. The design decision could be You should only have to know about multi-output if you want to use it. I agree with this philosophy. -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Re: [Scikit-learn-general] Shape of classes_ varies?
I forgot to include the line where I fit clf1. from sklearn.tree import DecisionTreeClassifier clf1 = DecisionTreeClassifier() clf1.fit([[1],[2],[3]], [1,2,3]) clf1.classes_ from sklearn.linear_model import SGDClassifier clf2 = SGDClassifier() clf2.fit([[1],[2],[3]], [1,2,3]) clf2.classes_ On Thu, Nov 29, 2012 at 9:35 AM, Doug Coleman doug.cole...@gmail.comwrote: Decision trees' classes are wrapped in another array for some reason. I was under the impression that I could just get ``clf.classes_`` from any old classifier and it would be a nice list, but I guess I'm mistaken. It makes it hard to write utilities...is this an oversight or a bug, or by design? I haven't checked other classifiers. from sklearn.tree import DecisionTreeClassifier clf1 = DecisionTreeClassifier() In [104]: clf1.classes_ Out[104]: [array([1, 2, 3])] from sklearn.linear_model import SGDClassifier clf2 = SGDClassifier() clf2.fit([[1],[2],[3]], [1,2,3]) In [100]: clf2.classes_ Out[100]: array([1, 2, 3]) Thanks, Doug -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Re: [Scikit-learn-general] Shape of classes_ varies?
I assume this is because they support multiple outputs; lets keep @gilles posted. 2012/11/29 Doug Coleman doug.cole...@gmail.com: I forgot to include the line where I fit clf1. -- Peter Prettenhofer -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Re: [Scikit-learn-general] Shape of classes_ varies?
the classes_ attribute is not present in all classifiers and not consistent, as you noticed. this is a known issue (see the issue tracker) and it would be great to address this. I am not sure about the decision trees in particular. Doug Coleman doug.cole...@gmail.com schrieb: Decision trees' classes are wrapped in another array for some reason. I was under the impression that I could just get ``clf.classes_`` from any old classifier and it would be a nice list, but I guess I'm mistaken. It makes it hard to write utilities...is this an oversight or a bug, or by design? I haven't checked other classifiers. from sklearn.tree import DecisionTreeClassifier clf1 = DecisionTreeClassifier() In [104]: clf1.classes_ Out[104]: [array([1, 2, 3])] from sklearn.linear_model import SGDClassifier clf2 = SGDClassifier() clf2.fit([[1],[2],[3]], [1,2,3]) In [100]: clf2.classes_ Out[100]: array([1, 2, 3]) Thanks, Doug -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.-- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Re: [Scikit-learn-general] Shape of classes_ varies?
Hi, Yes, since decision trees handle multi-output problems, classes_[i] is an array containing the classes for the i-th output. Hence classes_[0] is the array you are looking for when `y` is 1D. I guess we could transform classes_ directly into that array if the decision tree is trained on a 1D-output, actually just like we already do at the prediction time. What do you think? Gilles On 29 November 2012 18:48, amuel...@ais.uni-bonn.de wrote: the classes_ attribute is not present in all classifiers and not consistent, as you noticed. this is a known issue (see the issue tracker) and it would be great to address this. I am not sure about the decision trees in particular. Doug Coleman doug.cole...@gmail.com schrieb: Decision trees' classes are wrapped in another array for some reason. I was under the impression that I could just get ``clf.classes_`` from any old classifier and it would be a nice list, but I guess I'm mistaken. It makes it hard to write utilities...is this an oversight or a bug, or by design? I haven't checked other classifiers. from sklearn.tree import DecisionTreeClassifier clf1 = DecisionTreeClassifier() In [104]: clf1.classes_ Out[104]: [array([1, 2, 3])] from sklearn.linear_model import SGDClassifier clf2 = SGDClassifier() clf2.fit([[1],[2],[3]], [1,2,3]) In [100]: clf2.classes_ Out[100]: array([1, 2, 3]) Thanks, Doug Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.dy -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Re: [Scikit-learn-general] Shape of classes_ varies?
Going off of my unit tests in my branch for classes= in init: Single output: clf = tree.DecisionTreeClassifier(classes=[1,2,3,4]) clf.fit([[10]], [0]) In [13]: clf.classes_ Out[13]: [array([0, 1, 2, 3, 4])] Multi-output: clf = tree.DecisionTreeClassifier(classes=[[-1,1],[0,1,2,3,4]]) y_hat = clf.fit(X_multi, y_multi).predict(T) In [9]: clf.classes_ Out[9]: [array([-1, 1]), array([0, 1, 2, 3, 4])] So it's as you say and I understand why. Maybe we could have a method ``supports_multi_output`` that returns a boolean so we know what shape the classes_ are given some arbitrary clf? Or just introspect it? Doug On Thu, Nov 29, 2012 at 9:57 AM, Gilles Louppe g.lou...@gmail.com wrote: Hi, Yes, since decision trees handle multi-output problems, classes_[i] is an array containing the classes for the i-th output. Hence classes_[0] is the array you are looking for when `y` is 1D. I guess we could transform classes_ directly into that array if the decision tree is trained on a 1D-output, actually just like we already do at the prediction time. What do you think? Gilles On 29 November 2012 18:48, amuel...@ais.uni-bonn.de wrote: the classes_ attribute is not present in all classifiers and not consistent, as you noticed. this is a known issue (see the issue tracker) and it would be great to address this. I am not sure about the decision trees in particular. Doug Coleman doug.cole...@gmail.com schrieb: Decision trees' classes are wrapped in another array for some reason. I was under the impression that I could just get ``clf.classes_`` from any old classifier and it would be a nice list, but I guess I'm mistaken. It makes it hard to write utilities...is this an oversight or a bug, or by design? I haven't checked other classifiers. from sklearn.tree import DecisionTreeClassifier clf1 = DecisionTreeClassifier() In [104]: clf1.classes_ Out[104]: [array([1, 2, 3])] from sklearn.linear_model import SGDClassifier clf2 = SGDClassifier() clf2.fit([[1],[2],[3]], [1,2,3]) In [100]: clf2.classes_ Out[100]: array([1, 2, 3]) Thanks, Doug Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.dy -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Re: [Scikit-learn-general] Shape of classes_ varies?
I guess transforming it would be more in line with other classifiers. The design decision could be You should only have to know about multi-output if you want to use it. On Thu, Nov 29, 2012 at 10:07 AM, Doug Coleman doug.cole...@gmail.comwrote: Going off of my unit tests in my branch for classes= in init: Single output: clf = tree.DecisionTreeClassifier(classes=[1,2,3,4]) clf.fit([[10]], [0]) In [13]: clf.classes_ Out[13]: [array([0, 1, 2, 3, 4])] Multi-output: clf = tree.DecisionTreeClassifier(classes=[[-1,1],[0,1,2,3,4]]) y_hat = clf.fit(X_multi, y_multi).predict(T) In [9]: clf.classes_ Out[9]: [array([-1, 1]), array([0, 1, 2, 3, 4])] So it's as you say and I understand why. Maybe we could have a method ``supports_multi_output`` that returns a boolean so we know what shape the classes_ are given some arbitrary clf? Or just introspect it? Doug On Thu, Nov 29, 2012 at 9:57 AM, Gilles Louppe g.lou...@gmail.com wrote: Hi, Yes, since decision trees handle multi-output problems, classes_[i] is an array containing the classes for the i-th output. Hence classes_[0] is the array you are looking for when `y` is 1D. I guess we could transform classes_ directly into that array if the decision tree is trained on a 1D-output, actually just like we already do at the prediction time. What do you think? Gilles On 29 November 2012 18:48, amuel...@ais.uni-bonn.de wrote: the classes_ attribute is not present in all classifiers and not consistent, as you noticed. this is a known issue (see the issue tracker) and it would be great to address this. I am not sure about the decision trees in particular. Doug Coleman doug.cole...@gmail.com schrieb: Decision trees' classes are wrapped in another array for some reason. I was under the impression that I could just get ``clf.classes_`` from any old classifier and it would be a nice list, but I guess I'm mistaken. It makes it hard to write utilities...is this an oversight or a bug, or by design? I haven't checked other classifiers. from sklearn.tree import DecisionTreeClassifier clf1 = DecisionTreeClassifier() In [104]: clf1.classes_ Out[104]: [array([1, 2, 3])] from sklearn.linear_model import SGDClassifier clf2 = SGDClassifier() clf2.fit([[1],[2],[3]], [1,2,3]) In [100]: clf2.classes_ Out[100]: array([1, 2, 3]) Thanks, Doug Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.dy -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Re: [Scikit-learn-general] Shape of classes_ varies?
+1 Doug Coleman doug.cole...@gmail.com schrieb: I guess transforming it would be more in line with other classifiers. The design decision could be You should only have to know about multi-output if you want to use it. On Thu, Nov 29, 2012 at 10:07 AM, Doug Coleman doug.cole...@gmail.comwrote: Going off of my unit tests in my branch for classes= in init: Single output: clf = tree.DecisionTreeClassifier(classes=[1,2,3,4]) clf.fit([[10]], [0]) In [13]: clf.classes_ Out[13]: [array([0, 1, 2, 3, 4])] Multi-output: clf = tree.DecisionTreeClassifier(classes=[[-1,1],[0,1,2,3,4]]) y_hat = clf.fit(X_multi, y_multi).predict(T) In [9]: clf.classes_ Out[9]: [array([-1, 1]), array([0, 1, 2, 3, 4])] So it's as you say and I understand why. Maybe we could have a method ``supports_multi_output`` that returns a boolean so we know what shape the classes_ are given some arbitrary clf? Or just introspect it? Doug On Thu, Nov 29, 2012 at 9:57 AM, Gilles Louppe g.lou...@gmail.com wrote: Hi, Yes, since decision trees handle multi-output problems, classes_[i] is an array containing the classes for the i-th output. Hence classes_[0] is the array you are looking for when `y` is 1D. I guess we could transform classes_ directly into that array if the decision tree is trained on a 1D-output, actually just like we already do at the prediction time. What do you think? Gilles On 29 November 2012 18:48, amuel...@ais.uni-bonn.de wrote: the classes_ attribute is not present in all classifiers and not consistent, as you noticed. this is a known issue (see the issue tracker) and it would be great to address this. I am not sure about the decision trees in particular. Doug Coleman doug.cole...@gmail.com schrieb: Decision trees' classes are wrapped in another array for some reason. I was under the impression that I could just get ``clf.classes_`` from any old classifier and it would be a nice list, but I guess I'm mistaken. It makes it hard to write utilities...is this an oversight or a bug, or by design? I haven't checked other classifiers. from sklearn.tree import DecisionTreeClassifier clf1 = DecisionTreeClassifier() In [104]: clf1.classes_ Out[104]: [array([1, 2, 3])] from sklearn.linear_model import SGDClassifier clf2 = SGDClassifier() clf2.fit([[1],[2],[3]], [1,2,3]) In [100]: clf2.classes_ Out[100]: array([1, 2, 3]) Thanks, Doug Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.dy -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Re: [Scikit-learn-general] Shape of classes_ varies?
Okay then, I'll put together a PR to do that, in the days to come. On Thursday, 29 November 2012, amuel...@ais.uni-bonn.de wrote: +1 Doug Coleman doug.cole...@gmail.com schrieb: I guess transforming it would be more in line with other classifiers. The design decision could be You should only have to know about multi-output if you want to use it. On Thu, Nov 29, 2012 at 10:07 AM, Doug Coleman doug.cole...@gmail.com wrote: Going off of my unit tests in my branch for classes= in init: Single output: clf = tree.DecisionTreeClassifier(classes=[1,2,3,4]) clf.fit([[10]], [0]) In [13]: clf.classes_ Out[13]: [array([0, 1, 2, 3, 4])] Multi-output: clf = tree.DecisionTreeClassifier(classes=[[-1,1],[0,1,2,3,4]]) y_hat = clf.fit(X_multi, y_multi).predict(T) In [9]: clf.classes_ Out[9]: [array([-1, 1]), array([0, 1, 2, 3, 4])] So it's as you say and I understand why. Maybe we could have a method ``supports_multi_output`` that returns a boolean so we know what shape the classes_ are given some arbitrary clf? Or just introspect it? Doug On Thu, Nov 29, 2012 at 9:57 AM, Gilles Louppe g.lou...@gmail.com wrote: Hi, Yes, since decision trees handle multi-output problems, classes_[i] is an array containing the classes for the i-th output. Hence classes_[0] is the array you are looking for when `y` is 1D. I guess we could transform classes_ directly into that array if the decision tree is trained on a 1D-output, actually just like we already do at the prediction time. What do you think? Gilles On 29 November 2012 18:48, amuel...@ais.uni-bonn.de wrote: the classes_ attribute is not present in all classifiers and not consistent, as you noticed. this is a known issue (see the issue tracker) and it would be great to address this. I am not sure about the decision trees in particular. Doug Coleman doug.cole...@gmail.com schrieb: Decision trees' classes are wrapped in another array for some reason. I was under the impression that I could just get ``clf.classes_`` from any old classifier and it would be a nice list, but I guess I'm mistaken. It makes it hard to write utilities...is this an oversight or a bug, or by design? I haven't checked other classifiers. from sklearn.tree import DecisionTreeClassifier clf1 = DecisionTreeClassifier() In [104]: clf1.classes_ Out[104]: [array([1, 2, 3])] from sklearn.linear_model import SGDClassifier clf2 = SGDClassifier() clf2.fit([[1],[2],[3]], [1,2,3]) In [100]: clf2.classes_ Out[100]: array([1, 2, 3]) Thanks, Doug Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.ne -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Re: [Scikit-learn-general] Shape of classes_ varies?
2012/11/29 Gilles Louppe g.lou...@gmail.com: Yes, since decision trees handle multi-output problems, classes_[i] is an array containing the classes for the i-th output. Hence classes_[0] is the array you are looking for when `y` is 1D. Excuse me, but I'm not sure I follow this. What does i loop over? -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Re: [Scikit-learn-general] Shape of classes_ varies?
`i` is the output index, corresponding to the i-th column of y. On 29 November 2012 22:00, Lars Buitinck l.j.buiti...@uva.nl wrote: 2012/11/29 Gilles Louppe g.lou...@gmail.com: Yes, since decision trees handle multi-output problems, classes_[i] is an array containing the classes for the i-th output. Hence classes_[0] is the array you are looking for when `y` is 1D. Excuse me, but I'm not sure I follow this. What does i loop over? -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Re: [Scikit-learn-general] Shape of classes_ varies?
In the multi-output case, you have sets of labels for each of the outputs. Say you are predicting pairs and the first element can be [-1, 1] while and the second can be [1,2,3,4]. The classes in this case are [[-1,1], [1,2,3,4]] For the single output case, predicting a label in [1,2,3,4] would look like [[1,2,3,4]] and no second array since there is only one output. We are proposing to flatten this case to match up with other non-multi-class classifiers--it would now be just [1,2,3,4]. Doug On Thu, Nov 29, 2012 at 1:00 PM, Lars Buitinck l.j.buiti...@uva.nl wrote: 2012/11/29 Gilles Louppe g.lou...@gmail.com: Yes, since decision trees handle multi-output problems, classes_[i] is an array containing the classes for the i-th output. Hence classes_[0] is the array you are looking for when `y` is 1D. Excuse me, but I'm not sure I follow this. What does i loop over? -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net___ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general