Dealing with a dataset with a mix of continuous and categorical variables 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 ResultsDetermine highly correlated segmentsHow to visualize (make plot) of regression output against categorical input variable?Imputation of missing values and dealing with categorical valuesPreparing, Scaling and Selecting from a combination of numerical and categorical featuresWhat approach for creating a multi-classification model based on all categorical features (1 with 5,000 levels)?Catboost Categorical Features Handling Options (CTR settings)?How to combine categorical and continuous input features for neural network trainingExplaination of the anomalies detectedHow to do multivariate survival analysis on dataset having only categorical variables
What is a fractional matching?
Did MS DOS itself ever use blinking text?
Is there a kind of relay only consumes power when switching?
What causes the direction of lightning flashes?
Should I use a zero-interest credit card for a large one-time purchase?
Using audio cues to encourage good posture
Are there mentions in Hinduism about instruments which allows one to know others thoughts and influence them? And is it sinful?
How to compare two different files line by line in unix?
Selecting user stories during sprint planning
Is CEO the "profession" with the most psychopaths?
Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?
How to tell that you are a giant?
Fundamental Solution of the Pell Equation
Do I really need to have a message in a novel to appeal to readers?
The logistics of corpse disposal
Crossing US/Canada Border for less than 24 hours
How do I find out the mythology and history of my Fortress?
Most bit efficient text communication method?
Drawing without replacement: why the order of draw is irrelevant?
The more you know, the more you don't know
How would a mousetrap for use in space work?
If windows 7 doesn't support WSL, then what does Linux subsystem option mean?
An adverb for when you're not exaggerating
How to write this math term? with cases it isn't working
Dealing with a dataset with a mix of continuous and categorical variables
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 ResultsDetermine highly correlated segmentsHow to visualize (make plot) of regression output against categorical input variable?Imputation of missing values and dealing with categorical valuesPreparing, Scaling and Selecting from a combination of numerical and categorical featuresWhat approach for creating a multi-classification model based on all categorical features (1 with 5,000 levels)?Catboost Categorical Features Handling Options (CTR settings)?How to combine categorical and continuous input features for neural network trainingExplaination of the anomalies detectedHow to do multivariate survival analysis on dataset having only categorical variables
$begingroup$
How do the choice of machine learning algorithm and preprocessing change when some of the independent variables are categorical while others are continuous? Can such data be directly applied to the algorithm with categorical data converted using one-hot encoding?
For example, 2 columns are: Age and Race, Age being continuous and Race is categorical.
Update: Ideal buckets for a continuous variable is not known.
machine-learning data-cleaning categorical-data
$endgroup$
add a comment |
$begingroup$
How do the choice of machine learning algorithm and preprocessing change when some of the independent variables are categorical while others are continuous? Can such data be directly applied to the algorithm with categorical data converted using one-hot encoding?
For example, 2 columns are: Age and Race, Age being continuous and Race is categorical.
Update: Ideal buckets for a continuous variable is not known.
machine-learning data-cleaning categorical-data
$endgroup$
add a comment |
$begingroup$
How do the choice of machine learning algorithm and preprocessing change when some of the independent variables are categorical while others are continuous? Can such data be directly applied to the algorithm with categorical data converted using one-hot encoding?
For example, 2 columns are: Age and Race, Age being continuous and Race is categorical.
Update: Ideal buckets for a continuous variable is not known.
machine-learning data-cleaning categorical-data
$endgroup$
How do the choice of machine learning algorithm and preprocessing change when some of the independent variables are categorical while others are continuous? Can such data be directly applied to the algorithm with categorical data converted using one-hot encoding?
For example, 2 columns are: Age and Race, Age being continuous and Race is categorical.
Update: Ideal buckets for a continuous variable is not known.
machine-learning data-cleaning categorical-data
machine-learning data-cleaning categorical-data
edited Mar 4 at 6:46
Jibin Mathew
asked Feb 22 at 7:53
Jibin MathewJibin Mathew
1345
1345
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
To clarify, you mean mixed variables in one column? e.g. ABC123
If yes, you create two additional columns: one with categorical and one with numerical values. Afterward, you can encode them (one hot encoding not always necessary).
Detailed explanation in Chapter 11 "Feature Engineering Mixed Variables":
https://www.udemy.com/feature-engineering-for-machine-learning/learn/v4/content
$endgroup$
add a comment |
$begingroup$
One approach would be to "split" the continuous variable in buckets. Say, for age - 0-18yrs, 18-65yrs; 65+ yrs.
Then, you could assign the input age to a bucket and threat it as a categorical variable.
$endgroup$
$begingroup$
The question doesn't even focus on what you answered for!
$endgroup$
– Jibin Mathew
Mar 4 at 6:48
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%2f46002%2fdealing-with-a-dataset-with-a-mix-of-continuous-and-categorical-variables%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$
To clarify, you mean mixed variables in one column? e.g. ABC123
If yes, you create two additional columns: one with categorical and one with numerical values. Afterward, you can encode them (one hot encoding not always necessary).
Detailed explanation in Chapter 11 "Feature Engineering Mixed Variables":
https://www.udemy.com/feature-engineering-for-machine-learning/learn/v4/content
$endgroup$
add a comment |
$begingroup$
To clarify, you mean mixed variables in one column? e.g. ABC123
If yes, you create two additional columns: one with categorical and one with numerical values. Afterward, you can encode them (one hot encoding not always necessary).
Detailed explanation in Chapter 11 "Feature Engineering Mixed Variables":
https://www.udemy.com/feature-engineering-for-machine-learning/learn/v4/content
$endgroup$
add a comment |
$begingroup$
To clarify, you mean mixed variables in one column? e.g. ABC123
If yes, you create two additional columns: one with categorical and one with numerical values. Afterward, you can encode them (one hot encoding not always necessary).
Detailed explanation in Chapter 11 "Feature Engineering Mixed Variables":
https://www.udemy.com/feature-engineering-for-machine-learning/learn/v4/content
$endgroup$
To clarify, you mean mixed variables in one column? e.g. ABC123
If yes, you create two additional columns: one with categorical and one with numerical values. Afterward, you can encode them (one hot encoding not always necessary).
Detailed explanation in Chapter 11 "Feature Engineering Mixed Variables":
https://www.udemy.com/feature-engineering-for-machine-learning/learn/v4/content
answered Feb 22 at 21:03
FrancoSwissFrancoSwiss
10115
10115
add a comment |
add a comment |
$begingroup$
One approach would be to "split" the continuous variable in buckets. Say, for age - 0-18yrs, 18-65yrs; 65+ yrs.
Then, you could assign the input age to a bucket and threat it as a categorical variable.
$endgroup$
$begingroup$
The question doesn't even focus on what you answered for!
$endgroup$
– Jibin Mathew
Mar 4 at 6:48
add a comment |
$begingroup$
One approach would be to "split" the continuous variable in buckets. Say, for age - 0-18yrs, 18-65yrs; 65+ yrs.
Then, you could assign the input age to a bucket and threat it as a categorical variable.
$endgroup$
$begingroup$
The question doesn't even focus on what you answered for!
$endgroup$
– Jibin Mathew
Mar 4 at 6:48
add a comment |
$begingroup$
One approach would be to "split" the continuous variable in buckets. Say, for age - 0-18yrs, 18-65yrs; 65+ yrs.
Then, you could assign the input age to a bucket and threat it as a categorical variable.
$endgroup$
One approach would be to "split" the continuous variable in buckets. Say, for age - 0-18yrs, 18-65yrs; 65+ yrs.
Then, you could assign the input age to a bucket and threat it as a categorical variable.
answered Feb 28 at 20:40
stan0stan0
1012
1012
$begingroup$
The question doesn't even focus on what you answered for!
$endgroup$
– Jibin Mathew
Mar 4 at 6:48
add a comment |
$begingroup$
The question doesn't even focus on what you answered for!
$endgroup$
– Jibin Mathew
Mar 4 at 6:48
$begingroup$
The question doesn't even focus on what you answered for!
$endgroup$
– Jibin Mathew
Mar 4 at 6:48
$begingroup$
The question doesn't even focus on what you answered for!
$endgroup$
– Jibin Mathew
Mar 4 at 6:48
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%2f46002%2fdealing-with-a-dataset-with-a-mix-of-continuous-and-categorical-variables%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