FNU Chirag
FNU Chirag

Reputation: 11

I am trying to replicate a decision tree from SPSS in python using DecisionTreeClassifier

I am trying to replicate a decision tree from SPSS in python using DecisionTreeClassifier. I am unable to do the following.

  1. Unable to use a feature to do the first force split.
  2. If I use the same variables I do not get a similar model fit. Can We fine tune it without changing the variables or the parameters given already in the model being replicated. 3.Can I score new data on this tree and assign nodes to each row in the new data?
  3. Are there other libraries that I can use that are more flexible?

Any help in this would be really helpful.

I use this bit of code to give same parameters and run the model:

    criterion='gini',  # CART method
    max_depth=5, 
    min_samples_split=100, 
    min_samples_leaf=50
)
clf = clf.fit(X_train, y_train)

Model fit is not matching with this model.

Upvotes: 0

Views: 47

Answers (0)

Related Questions