Hi Dzhovani,
Many thanks. I have been trying the approach you outline with respect to
feature engineering. <smile
Pranav
-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx <program-l-bounce@xxxxxxxxxxxxx> On Behalf
Of Dzhovani Chemishanov
Sent: Monday, January 3, 2022 3:34 PM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: Python: How do I evaluate if my decision tree is
overfitting
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,** To leave the list, click on the immediately-following link:-
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