[program-l] Re: Python: How do I evaluate if my decision tree is overfitting

  • From: Dzhovani Chemishanov <dzhovani.chemishanov@xxxxxxxxx>
  • To: program-l@xxxxxxxxxxxxx
  • Date: Mon, 3 Jan 2022 10:03:49 +0000

Hi,
Show new data to your model. If the results are significantly worse
than those on the training data, you are overfitting. Especially if it
is giving you false negatives. Underfitting is if you have too many
false positives.

The way to find the most significant features is to drop some of them
and see how much it will alter your results. The more the absence of a
feature affects the results, the more significant it is. If you see no
change, then the feature is insignificant.
HTH,
Dzhovani

On 1/2/22, pranav@xxxxxxxxxxxxxxxxx <pranav@xxxxxxxxxxxxxxxxx> wrote:

Hi all,

I have built a decision tree in python using the sklearn library. How do I
evaluate if  it is overfitting or underfitting?

I also need to do some feature engineering in terms of determining which
features are contributing most to my model. I am thinking about using the
shap values but if I print them, I get numbers which I am not sure how to
interpret.

Pranav

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: