Hello everyone,

I have a custom prediction class which in fact consists of a random forest
regressor+classifier. The class implements a fit() method, which in turn
calls the fit() methods of the classifier and regressor. Here is the code
for my class: http://paste.org/51862

When i use the class as such:

import HierarchicalRegressor as HR
hr=HR.HierarchicalRegressor()
hr.fit(X_train, Y_train)

I get an error message. Here is a clip from the error traceback:

/usr/local/bin/EPDpython/lib/python2.7/site-packages/scikit_learn-0.12_git-py2.7-linux-i686.egg/sklearn/tree/tree.pyc
in fit(self, X, y, sample_mask, X_argsorted)
    468             self.classes_ = np.unique(y)
    469             self.n_classes_ = self.classes_.shape[0]
--> 470             criterion =
CLASSIFICATION[self.criterion](self.n_classes_)
    471             y = np.searchsorted(self.classes_, y)
    472

KeyError: None

The full error traceback is here: http://paste.org/51864

X consists of values between 0 and 1.0. Y consists of values between 0.0
and 1.0 or -1.0.

Any pointers are much appreciated! Thank you:)

regards
shankar.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to