Using Decision Trees to interpret good factor values
$begingroup$
Decision trees are often used in machine learning as classifiers/regression models (CART), or in ensemble methods (Random Forest) etc, where predictive accuracy, minimizing bias and variance are the priority, and having a complicated tree is not necessarily a bad thing.
My application is different. I have run a simulation ~5000 times with different parameter combinations (chosen from a Latin Hypercube), and I extract response variables (in the range [0,1] where 1 = good) from each simulation. I want to identify which parameter ranges lead to "good results" in the response variables in such a way as can be easily interpreted by a non-technical user. Pairwise correlation between factors and responses identifies relatedness and direction, but not significance and critical values.
So, I can create a decision tree for each response variable, from the parameters, which partitions the parameter space into the ranges which help predict the response. Identifying the "best leaf" (max average leaf value) I can extract the ranges and parameters along the path to the root and convert this to a simple explanation like:
"ResponseX attains average 0.999 when Factor1 >= 10, Factor6 <= 4 and Factor9 >= 3"
However what I find is that the decision trees produced (with scikit-learn) are often highly complex and sometimes make miniscule distinctions in response values (eg. splitting on 0.811 and 0.812). I want to identify the significant relationships only which should be a relatively small number.
So unlike in ML, I want to reduce complexity of the tree instead of maximizing predictive accuracy of a regression model.
How can I do this? How is it typically done?
I see parameters like max_depth and max_features and I found that setting min_impurity_decrease helped a bit, but I would like to know the convention way.
decision-trees simulation
$endgroup$
add a comment |
$begingroup$
Decision trees are often used in machine learning as classifiers/regression models (CART), or in ensemble methods (Random Forest) etc, where predictive accuracy, minimizing bias and variance are the priority, and having a complicated tree is not necessarily a bad thing.
My application is different. I have run a simulation ~5000 times with different parameter combinations (chosen from a Latin Hypercube), and I extract response variables (in the range [0,1] where 1 = good) from each simulation. I want to identify which parameter ranges lead to "good results" in the response variables in such a way as can be easily interpreted by a non-technical user. Pairwise correlation between factors and responses identifies relatedness and direction, but not significance and critical values.
So, I can create a decision tree for each response variable, from the parameters, which partitions the parameter space into the ranges which help predict the response. Identifying the "best leaf" (max average leaf value) I can extract the ranges and parameters along the path to the root and convert this to a simple explanation like:
"ResponseX attains average 0.999 when Factor1 >= 10, Factor6 <= 4 and Factor9 >= 3"
However what I find is that the decision trees produced (with scikit-learn) are often highly complex and sometimes make miniscule distinctions in response values (eg. splitting on 0.811 and 0.812). I want to identify the significant relationships only which should be a relatively small number.
So unlike in ML, I want to reduce complexity of the tree instead of maximizing predictive accuracy of a regression model.
How can I do this? How is it typically done?
I see parameters like max_depth and max_features and I found that setting min_impurity_decrease helped a bit, but I would like to know the convention way.
decision-trees simulation
$endgroup$
add a comment |
$begingroup$
Decision trees are often used in machine learning as classifiers/regression models (CART), or in ensemble methods (Random Forest) etc, where predictive accuracy, minimizing bias and variance are the priority, and having a complicated tree is not necessarily a bad thing.
My application is different. I have run a simulation ~5000 times with different parameter combinations (chosen from a Latin Hypercube), and I extract response variables (in the range [0,1] where 1 = good) from each simulation. I want to identify which parameter ranges lead to "good results" in the response variables in such a way as can be easily interpreted by a non-technical user. Pairwise correlation between factors and responses identifies relatedness and direction, but not significance and critical values.
So, I can create a decision tree for each response variable, from the parameters, which partitions the parameter space into the ranges which help predict the response. Identifying the "best leaf" (max average leaf value) I can extract the ranges and parameters along the path to the root and convert this to a simple explanation like:
"ResponseX attains average 0.999 when Factor1 >= 10, Factor6 <= 4 and Factor9 >= 3"
However what I find is that the decision trees produced (with scikit-learn) are often highly complex and sometimes make miniscule distinctions in response values (eg. splitting on 0.811 and 0.812). I want to identify the significant relationships only which should be a relatively small number.
So unlike in ML, I want to reduce complexity of the tree instead of maximizing predictive accuracy of a regression model.
How can I do this? How is it typically done?
I see parameters like max_depth and max_features and I found that setting min_impurity_decrease helped a bit, but I would like to know the convention way.
decision-trees simulation
$endgroup$
Decision trees are often used in machine learning as classifiers/regression models (CART), or in ensemble methods (Random Forest) etc, where predictive accuracy, minimizing bias and variance are the priority, and having a complicated tree is not necessarily a bad thing.
My application is different. I have run a simulation ~5000 times with different parameter combinations (chosen from a Latin Hypercube), and I extract response variables (in the range [0,1] where 1 = good) from each simulation. I want to identify which parameter ranges lead to "good results" in the response variables in such a way as can be easily interpreted by a non-technical user. Pairwise correlation between factors and responses identifies relatedness and direction, but not significance and critical values.
So, I can create a decision tree for each response variable, from the parameters, which partitions the parameter space into the ranges which help predict the response. Identifying the "best leaf" (max average leaf value) I can extract the ranges and parameters along the path to the root and convert this to a simple explanation like:
"ResponseX attains average 0.999 when Factor1 >= 10, Factor6 <= 4 and Factor9 >= 3"
However what I find is that the decision trees produced (with scikit-learn) are often highly complex and sometimes make miniscule distinctions in response values (eg. splitting on 0.811 and 0.812). I want to identify the significant relationships only which should be a relatively small number.
So unlike in ML, I want to reduce complexity of the tree instead of maximizing predictive accuracy of a regression model.
How can I do this? How is it typically done?
I see parameters like max_depth and max_features and I found that setting min_impurity_decrease helped a bit, but I would like to know the convention way.
decision-trees simulation
decision-trees simulation
asked 7 mins ago
Brendan HillBrendan Hill
606
606
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
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%2f45986%2fusing-decision-trees-to-interpret-good-factor-values%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f45986%2fusing-decision-trees-to-interpret-good-factor-values%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