0
$\begingroup$

Suppose, i have some models created and fitted in scikit-learn.

model_rc = RidgeClassifier(class_weight='auto')
model_rc.fit(x_train, y_train)

model_dt = DecisionTreeClassifier()
model_dt.fit(x_train, y_train)

...

How can i get linear coefficients for RidgeClassifier or tree for DecisionTree.

In other words, I'm looking for R summary analogue in scikit-learn.

Thanks in advance!

$\endgroup$

1 Answer 1

0
$\begingroup$

I am not sure if there is a summary analog in sklearn, but you can get coefficients of ridge via model_rc.coef_ and model_rc.intercept_, and you can seemingly get the tree via model_dt.tree_.

I have never tried to do anything with trees, so I don't know what you can do with that tree object. There is also a possibility to get its visual representation, check out this post.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.