Closed Alex-Fay closed 3 years ago
If you write PiecewiseEstimator(binner= DecisionTreeClassifier(), estimator=KMeans(), n_jobs=None, verbose=False)
, it should work. Without the bracket, binner= DecisionTreeClassifier
, binner is a class not an instance.
Greetings,
TLDR: help sophomore undergrad figure out how to run piecewise estimator
I am trying to run the piecewise estimator and used a sample dataset from sklearn. When I try to run:
obj = PiecewiseEstimator(binner= DecisionTreeClassifier, estimator=KMeans, n_jobs=None, verbose=False) PiecewiseEstimator.transform_bins(obj, diabetes_X)
I get the following error: binner is not a decision tree or a transform
I have the full code in google Colab here: https://colab.research.google.com/drive/1geF6s15QWKtkyg53cSWxBwX2Kjh_0JGD?usp=sharing
Ultimately, I am trying to figure out what steps I need to take to run the Piecewise Estimator. I figured I just needed to init an object of each class, but I am unsure if order matters.