SciKit-Learn Decision Tree Overfitting The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Moderator Election Q&A - Questionnaire 2019 Community Moderator Election Resultssklearn - overfitting problemWeka Decision Tree not working on real dataContrasting logistic regression vs decision tree performance in specific exampleOverfitting and cross-validationTensorflow regression predicting 1 for all inputsDecision tree not using all features from training datasetOverfitting problem in modelMachine learning - 'train_test_split' function in scikit-learn: should I repeat it several times?Not sure if over-fittingIs Overfitting always bad?
Huge performance difference of the command find with and without using %M option to show permissions
How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time
Accepted by European university, rejected by all American ones I applied to? Possible reasons?
Do I have Disadvantage attacking with an off-hand weapon?
ELI5: Why do they say that Israel would have been the fourth country to land a spacecraft on the Moon and why do they call it low cost?
Can withdrawing asylum be illegal?
Drawing vertical/oblique lines in Metrical tree (tikz-qtree, tipa)
What was the last x86 CPU that did not have the x87 floating-point unit built in?
Why can't wing-mounted spoilers be used to steepen approaches?
Loose spokes after only a few rides
Why did Peik Lin say, "I'm not an animal"?
How do I design a circuit to convert a 100 mV and 50 Hz sine wave to a square wave?
Did the new image of black hole confirm the general theory of relativity?
Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?
"is" operation returns false with ndarray.data attribute, even though two array objects have same id
Can the DM override racial traits?
Does Parliament hold absolute power in the UK?
Is 'stolen' appropriate word?
Keeping a retro style to sci-fi spaceships?
Why are PDP-7-style microprogrammed instructions out of vogue?
Sub-subscripts in strings cause different spacings than subscripts
Python - Fishing Simulator
Button changing its text & action. Good or terrible?
What do I do when my TA workload is more than expected?
SciKit-Learn Decision Tree Overfitting
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Moderator Election Q&A - Questionnaire
2019 Community Moderator Election Resultssklearn - overfitting problemWeka Decision Tree not working on real dataContrasting logistic regression vs decision tree performance in specific exampleOverfitting and cross-validationTensorflow regression predicting 1 for all inputsDecision tree not using all features from training datasetOverfitting problem in modelMachine learning - 'train_test_split' function in scikit-learn: should I repeat it several times?Not sure if over-fittingIs Overfitting always bad?
$begingroup$
I'm pursuing a computer science minor at my university, and one class I'm in is Machine Learning.
We have a project to utilize a few algorithms we have learned so far.
I've been using SciKit-Learn to perform these algorithms, but when it comes to decision trees I keep getting a feeling I am overfitting.
I'm using a dataset about weather, giving characteristics such as city, state, month, year, wind direction, wind speed, etc... where the target variable is the average temperature for the day. Now I know this is hard to classify, as it is pretty much a continuous variable space, but I've simplified it to the predicted being within a range of 5 to the actual.
Here is a link to the csv I'm using
The following is my code:
address2 = 'C:/.../weather.csv'
weather = pd.read_csv(address2)
cityCode= le.fit_transform(weather.iloc[:,2])
windDirection = le.fit_transform(weather.iloc[:,3])
month = le.fit_transform(weather.iloc[:,8])
precip = le.fit_transform(weather.iloc[:,9])
windSpeed = le.fit_transform(weather.iloc[:,10])
state = le.fit_transform(weather.iloc[:,11])
week = le.fit_transform(weather.iloc[:,12])
year = le.fit_transform(weather.iloc[:,13])
Xweather = list(zip(cityCode,windDirection,month,precip,windSpeed,state,week,year))
yweather= weather.iloc[:,0]
yweather_test = train_test_split(Xweather, y, test_size = 0.2, random_state=413)
cWeather = tree.DecisionTreeClassifier()
cWeather.fit(Xweather_train,yweather_train)
accu_train_weather=np.sum(abs(cWeather.predict(Xweather_train)-yweather_train)<=5)/float(yweather_train.size)*100
accu_test_weather=np.sum(abs(cWeather.predict(Xweather_test)-yweather_test)<=5)/float(yweather_test.size)*100
print("Classificaton accuracy on training set", accu_train_weather, "%")
print("Classificaton accuracy on test set", accu_test_weather, "%")
My training set constantly gets 100% training accuracy, but the test set is constantly 57% accurate, which leads me to believe the tree is overfitting to the training set.
I know I'm not doing any pruning, but even when I do, I can get the same test accuracy as unpruned at best.
By pruning I mean setting the tree classifier to have a maximum number of leaves, minimum samples per leaf, and maximum depth.
I'm not an advanced coder (as you can probably tell by my code), but any help would be great.
machine-learning python scikit-learn decision-trees overfitting
$endgroup$
bumped to the homepage by Community♦ 39 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
$begingroup$
I'm pursuing a computer science minor at my university, and one class I'm in is Machine Learning.
We have a project to utilize a few algorithms we have learned so far.
I've been using SciKit-Learn to perform these algorithms, but when it comes to decision trees I keep getting a feeling I am overfitting.
I'm using a dataset about weather, giving characteristics such as city, state, month, year, wind direction, wind speed, etc... where the target variable is the average temperature for the day. Now I know this is hard to classify, as it is pretty much a continuous variable space, but I've simplified it to the predicted being within a range of 5 to the actual.
Here is a link to the csv I'm using
The following is my code:
address2 = 'C:/.../weather.csv'
weather = pd.read_csv(address2)
cityCode= le.fit_transform(weather.iloc[:,2])
windDirection = le.fit_transform(weather.iloc[:,3])
month = le.fit_transform(weather.iloc[:,8])
precip = le.fit_transform(weather.iloc[:,9])
windSpeed = le.fit_transform(weather.iloc[:,10])
state = le.fit_transform(weather.iloc[:,11])
week = le.fit_transform(weather.iloc[:,12])
year = le.fit_transform(weather.iloc[:,13])
Xweather = list(zip(cityCode,windDirection,month,precip,windSpeed,state,week,year))
yweather= weather.iloc[:,0]
yweather_test = train_test_split(Xweather, y, test_size = 0.2, random_state=413)
cWeather = tree.DecisionTreeClassifier()
cWeather.fit(Xweather_train,yweather_train)
accu_train_weather=np.sum(abs(cWeather.predict(Xweather_train)-yweather_train)<=5)/float(yweather_train.size)*100
accu_test_weather=np.sum(abs(cWeather.predict(Xweather_test)-yweather_test)<=5)/float(yweather_test.size)*100
print("Classificaton accuracy on training set", accu_train_weather, "%")
print("Classificaton accuracy on test set", accu_test_weather, "%")
My training set constantly gets 100% training accuracy, but the test set is constantly 57% accurate, which leads me to believe the tree is overfitting to the training set.
I know I'm not doing any pruning, but even when I do, I can get the same test accuracy as unpruned at best.
By pruning I mean setting the tree classifier to have a maximum number of leaves, minimum samples per leaf, and maximum depth.
I'm not an advanced coder (as you can probably tell by my code), but any help would be great.
machine-learning python scikit-learn decision-trees overfitting
$endgroup$
bumped to the homepage by Community♦ 39 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
$begingroup$
I'm pursuing a computer science minor at my university, and one class I'm in is Machine Learning.
We have a project to utilize a few algorithms we have learned so far.
I've been using SciKit-Learn to perform these algorithms, but when it comes to decision trees I keep getting a feeling I am overfitting.
I'm using a dataset about weather, giving characteristics such as city, state, month, year, wind direction, wind speed, etc... where the target variable is the average temperature for the day. Now I know this is hard to classify, as it is pretty much a continuous variable space, but I've simplified it to the predicted being within a range of 5 to the actual.
Here is a link to the csv I'm using
The following is my code:
address2 = 'C:/.../weather.csv'
weather = pd.read_csv(address2)
cityCode= le.fit_transform(weather.iloc[:,2])
windDirection = le.fit_transform(weather.iloc[:,3])
month = le.fit_transform(weather.iloc[:,8])
precip = le.fit_transform(weather.iloc[:,9])
windSpeed = le.fit_transform(weather.iloc[:,10])
state = le.fit_transform(weather.iloc[:,11])
week = le.fit_transform(weather.iloc[:,12])
year = le.fit_transform(weather.iloc[:,13])
Xweather = list(zip(cityCode,windDirection,month,precip,windSpeed,state,week,year))
yweather= weather.iloc[:,0]
yweather_test = train_test_split(Xweather, y, test_size = 0.2, random_state=413)
cWeather = tree.DecisionTreeClassifier()
cWeather.fit(Xweather_train,yweather_train)
accu_train_weather=np.sum(abs(cWeather.predict(Xweather_train)-yweather_train)<=5)/float(yweather_train.size)*100
accu_test_weather=np.sum(abs(cWeather.predict(Xweather_test)-yweather_test)<=5)/float(yweather_test.size)*100
print("Classificaton accuracy on training set", accu_train_weather, "%")
print("Classificaton accuracy on test set", accu_test_weather, "%")
My training set constantly gets 100% training accuracy, but the test set is constantly 57% accurate, which leads me to believe the tree is overfitting to the training set.
I know I'm not doing any pruning, but even when I do, I can get the same test accuracy as unpruned at best.
By pruning I mean setting the tree classifier to have a maximum number of leaves, minimum samples per leaf, and maximum depth.
I'm not an advanced coder (as you can probably tell by my code), but any help would be great.
machine-learning python scikit-learn decision-trees overfitting
$endgroup$
I'm pursuing a computer science minor at my university, and one class I'm in is Machine Learning.
We have a project to utilize a few algorithms we have learned so far.
I've been using SciKit-Learn to perform these algorithms, but when it comes to decision trees I keep getting a feeling I am overfitting.
I'm using a dataset about weather, giving characteristics such as city, state, month, year, wind direction, wind speed, etc... where the target variable is the average temperature for the day. Now I know this is hard to classify, as it is pretty much a continuous variable space, but I've simplified it to the predicted being within a range of 5 to the actual.
Here is a link to the csv I'm using
The following is my code:
address2 = 'C:/.../weather.csv'
weather = pd.read_csv(address2)
cityCode= le.fit_transform(weather.iloc[:,2])
windDirection = le.fit_transform(weather.iloc[:,3])
month = le.fit_transform(weather.iloc[:,8])
precip = le.fit_transform(weather.iloc[:,9])
windSpeed = le.fit_transform(weather.iloc[:,10])
state = le.fit_transform(weather.iloc[:,11])
week = le.fit_transform(weather.iloc[:,12])
year = le.fit_transform(weather.iloc[:,13])
Xweather = list(zip(cityCode,windDirection,month,precip,windSpeed,state,week,year))
yweather= weather.iloc[:,0]
yweather_test = train_test_split(Xweather, y, test_size = 0.2, random_state=413)
cWeather = tree.DecisionTreeClassifier()
cWeather.fit(Xweather_train,yweather_train)
accu_train_weather=np.sum(abs(cWeather.predict(Xweather_train)-yweather_train)<=5)/float(yweather_train.size)*100
accu_test_weather=np.sum(abs(cWeather.predict(Xweather_test)-yweather_test)<=5)/float(yweather_test.size)*100
print("Classificaton accuracy on training set", accu_train_weather, "%")
print("Classificaton accuracy on test set", accu_test_weather, "%")
My training set constantly gets 100% training accuracy, but the test set is constantly 57% accurate, which leads me to believe the tree is overfitting to the training set.
I know I'm not doing any pruning, but even when I do, I can get the same test accuracy as unpruned at best.
By pruning I mean setting the tree classifier to have a maximum number of leaves, minimum samples per leaf, and maximum depth.
I'm not an advanced coder (as you can probably tell by my code), but any help would be great.
machine-learning python scikit-learn decision-trees overfitting
machine-learning python scikit-learn decision-trees overfitting
asked Feb 9 at 23:03
PaulfryyPaulfryy
61
61
bumped to the homepage by Community♦ 39 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 39 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
The vanilla decision tree algorithm is prone to overfitting. That's kind of why we have those ensembled tree algorithm. The classics include Random Forests, AdaBoost, and Gradient Boosted Trees. All of those are implemented in sklearn.
There are other more advanced variation/implementation outside sklearn, for example, lightGBM and xgboost etc.
If you must use the vanilla decision tree, trying to reduce the dimensionality of your inputs might help to reduce overfitting.
$endgroup$
$begingroup$
Thanks for the answer. So even though I implement a rudimentary version of pruning (by limiting the number of leaves, minimum samples per leaf, and max depth) I can still overfit?
$endgroup$
– Paulfryy
Feb 10 at 15:21
$begingroup$
think this way, what would happen if you use the simplest possible decision tree there can be, the one with a depth of 1 and 2 leave node? Is it going to overfit? Not very likely isn't it? But the performance is also going to be miserable. The more complex your tree is, the greater the ability it has to model complex problem, but this complexity also means more likely to overfit. Some algorithms are better than the others because they can give you more expressive power but also least likely to overfit at the same time.
$endgroup$
– Louis T
Feb 11 at 6:59
add a comment |
$begingroup$
Predicting average temperature is a regression task, not classification. You should be using DecisionTreeRegressor instead. Temperature is a continuous value and you are treating it as a category by using a classifier.
Tinkering with the hyperparameters (maximum number of leaves, minimum samples per leaf, and maximum depth, etc) is still important since decision trees always are prone to overfitting. If you struggle to find good parameters yourself then you can try some automated methods such as GridSearchCV or RandomizedSearchCV in sklearn.
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "557"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f45319%2fscikit-learn-decision-tree-overfitting%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The vanilla decision tree algorithm is prone to overfitting. That's kind of why we have those ensembled tree algorithm. The classics include Random Forests, AdaBoost, and Gradient Boosted Trees. All of those are implemented in sklearn.
There are other more advanced variation/implementation outside sklearn, for example, lightGBM and xgboost etc.
If you must use the vanilla decision tree, trying to reduce the dimensionality of your inputs might help to reduce overfitting.
$endgroup$
$begingroup$
Thanks for the answer. So even though I implement a rudimentary version of pruning (by limiting the number of leaves, minimum samples per leaf, and max depth) I can still overfit?
$endgroup$
– Paulfryy
Feb 10 at 15:21
$begingroup$
think this way, what would happen if you use the simplest possible decision tree there can be, the one with a depth of 1 and 2 leave node? Is it going to overfit? Not very likely isn't it? But the performance is also going to be miserable. The more complex your tree is, the greater the ability it has to model complex problem, but this complexity also means more likely to overfit. Some algorithms are better than the others because they can give you more expressive power but also least likely to overfit at the same time.
$endgroup$
– Louis T
Feb 11 at 6:59
add a comment |
$begingroup$
The vanilla decision tree algorithm is prone to overfitting. That's kind of why we have those ensembled tree algorithm. The classics include Random Forests, AdaBoost, and Gradient Boosted Trees. All of those are implemented in sklearn.
There are other more advanced variation/implementation outside sklearn, for example, lightGBM and xgboost etc.
If you must use the vanilla decision tree, trying to reduce the dimensionality of your inputs might help to reduce overfitting.
$endgroup$
$begingroup$
Thanks for the answer. So even though I implement a rudimentary version of pruning (by limiting the number of leaves, minimum samples per leaf, and max depth) I can still overfit?
$endgroup$
– Paulfryy
Feb 10 at 15:21
$begingroup$
think this way, what would happen if you use the simplest possible decision tree there can be, the one with a depth of 1 and 2 leave node? Is it going to overfit? Not very likely isn't it? But the performance is also going to be miserable. The more complex your tree is, the greater the ability it has to model complex problem, but this complexity also means more likely to overfit. Some algorithms are better than the others because they can give you more expressive power but also least likely to overfit at the same time.
$endgroup$
– Louis T
Feb 11 at 6:59
add a comment |
$begingroup$
The vanilla decision tree algorithm is prone to overfitting. That's kind of why we have those ensembled tree algorithm. The classics include Random Forests, AdaBoost, and Gradient Boosted Trees. All of those are implemented in sklearn.
There are other more advanced variation/implementation outside sklearn, for example, lightGBM and xgboost etc.
If you must use the vanilla decision tree, trying to reduce the dimensionality of your inputs might help to reduce overfitting.
$endgroup$
The vanilla decision tree algorithm is prone to overfitting. That's kind of why we have those ensembled tree algorithm. The classics include Random Forests, AdaBoost, and Gradient Boosted Trees. All of those are implemented in sklearn.
There are other more advanced variation/implementation outside sklearn, for example, lightGBM and xgboost etc.
If you must use the vanilla decision tree, trying to reduce the dimensionality of your inputs might help to reduce overfitting.
edited Feb 11 at 5:06
Davide Fiocco
2114
2114
answered Feb 10 at 1:50
Louis TLouis T
801320
801320
$begingroup$
Thanks for the answer. So even though I implement a rudimentary version of pruning (by limiting the number of leaves, minimum samples per leaf, and max depth) I can still overfit?
$endgroup$
– Paulfryy
Feb 10 at 15:21
$begingroup$
think this way, what would happen if you use the simplest possible decision tree there can be, the one with a depth of 1 and 2 leave node? Is it going to overfit? Not very likely isn't it? But the performance is also going to be miserable. The more complex your tree is, the greater the ability it has to model complex problem, but this complexity also means more likely to overfit. Some algorithms are better than the others because they can give you more expressive power but also least likely to overfit at the same time.
$endgroup$
– Louis T
Feb 11 at 6:59
add a comment |
$begingroup$
Thanks for the answer. So even though I implement a rudimentary version of pruning (by limiting the number of leaves, minimum samples per leaf, and max depth) I can still overfit?
$endgroup$
– Paulfryy
Feb 10 at 15:21
$begingroup$
think this way, what would happen if you use the simplest possible decision tree there can be, the one with a depth of 1 and 2 leave node? Is it going to overfit? Not very likely isn't it? But the performance is also going to be miserable. The more complex your tree is, the greater the ability it has to model complex problem, but this complexity also means more likely to overfit. Some algorithms are better than the others because they can give you more expressive power but also least likely to overfit at the same time.
$endgroup$
– Louis T
Feb 11 at 6:59
$begingroup$
Thanks for the answer. So even though I implement a rudimentary version of pruning (by limiting the number of leaves, minimum samples per leaf, and max depth) I can still overfit?
$endgroup$
– Paulfryy
Feb 10 at 15:21
$begingroup$
Thanks for the answer. So even though I implement a rudimentary version of pruning (by limiting the number of leaves, minimum samples per leaf, and max depth) I can still overfit?
$endgroup$
– Paulfryy
Feb 10 at 15:21
$begingroup$
think this way, what would happen if you use the simplest possible decision tree there can be, the one with a depth of 1 and 2 leave node? Is it going to overfit? Not very likely isn't it? But the performance is also going to be miserable. The more complex your tree is, the greater the ability it has to model complex problem, but this complexity also means more likely to overfit. Some algorithms are better than the others because they can give you more expressive power but also least likely to overfit at the same time.
$endgroup$
– Louis T
Feb 11 at 6:59
$begingroup$
think this way, what would happen if you use the simplest possible decision tree there can be, the one with a depth of 1 and 2 leave node? Is it going to overfit? Not very likely isn't it? But the performance is also going to be miserable. The more complex your tree is, the greater the ability it has to model complex problem, but this complexity also means more likely to overfit. Some algorithms are better than the others because they can give you more expressive power but also least likely to overfit at the same time.
$endgroup$
– Louis T
Feb 11 at 6:59
add a comment |
$begingroup$
Predicting average temperature is a regression task, not classification. You should be using DecisionTreeRegressor instead. Temperature is a continuous value and you are treating it as a category by using a classifier.
Tinkering with the hyperparameters (maximum number of leaves, minimum samples per leaf, and maximum depth, etc) is still important since decision trees always are prone to overfitting. If you struggle to find good parameters yourself then you can try some automated methods such as GridSearchCV or RandomizedSearchCV in sklearn.
$endgroup$
add a comment |
$begingroup$
Predicting average temperature is a regression task, not classification. You should be using DecisionTreeRegressor instead. Temperature is a continuous value and you are treating it as a category by using a classifier.
Tinkering with the hyperparameters (maximum number of leaves, minimum samples per leaf, and maximum depth, etc) is still important since decision trees always are prone to overfitting. If you struggle to find good parameters yourself then you can try some automated methods such as GridSearchCV or RandomizedSearchCV in sklearn.
$endgroup$
add a comment |
$begingroup$
Predicting average temperature is a regression task, not classification. You should be using DecisionTreeRegressor instead. Temperature is a continuous value and you are treating it as a category by using a classifier.
Tinkering with the hyperparameters (maximum number of leaves, minimum samples per leaf, and maximum depth, etc) is still important since decision trees always are prone to overfitting. If you struggle to find good parameters yourself then you can try some automated methods such as GridSearchCV or RandomizedSearchCV in sklearn.
$endgroup$
Predicting average temperature is a regression task, not classification. You should be using DecisionTreeRegressor instead. Temperature is a continuous value and you are treating it as a category by using a classifier.
Tinkering with the hyperparameters (maximum number of leaves, minimum samples per leaf, and maximum depth, etc) is still important since decision trees always are prone to overfitting. If you struggle to find good parameters yourself then you can try some automated methods such as GridSearchCV or RandomizedSearchCV in sklearn.
answered Mar 13 at 8:53
Simon LarssonSimon Larsson
800114
800114
add a comment |
add a comment |
Thanks for contributing an answer to Data Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f45319%2fscikit-learn-decision-tree-overfitting%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown