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










2












$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.










share|improve this question











$endgroup$
















    2












    $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.










    share|improve this question











    $endgroup$














      2












      2








      2


      1



      $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.










      share|improve this question











      $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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 4 at 6:46







      Jibin Mathew

















      asked Feb 22 at 7:53









      Jibin MathewJibin Mathew

      1345




      1345




















          2 Answers
          2






          active

          oldest

          votes


















          0












          $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






          share|improve this answer









          $endgroup$




















            0












            $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.






            share|improve this answer









            $endgroup$












            • $begingroup$
              The question doesn't even focus on what you answered for!
              $endgroup$
              – Jibin Mathew
              Mar 4 at 6:48











            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
            );



            );













            draft saved

            draft discarded


















            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









            0












            $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






            share|improve this answer









            $endgroup$

















              0












              $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






              share|improve this answer









              $endgroup$















                0












                0








                0





                $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






                share|improve this answer









                $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







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 22 at 21:03









                FrancoSwissFrancoSwiss

                10115




                10115





















                    0












                    $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.






                    share|improve this answer









                    $endgroup$












                    • $begingroup$
                      The question doesn't even focus on what you answered for!
                      $endgroup$
                      – Jibin Mathew
                      Mar 4 at 6:48















                    0












                    $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.






                    share|improve this answer









                    $endgroup$












                    • $begingroup$
                      The question doesn't even focus on what you answered for!
                      $endgroup$
                      – Jibin Mathew
                      Mar 4 at 6:48













                    0












                    0








                    0





                    $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.






                    share|improve this answer









                    $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.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    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
















                    • $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

















                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Adding axes to figuresAdding axes labels to LaTeX figuresLaTeX equivalent of ConTeXt buffersRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?adding axes to shapesAlign axes across subfiguresAdding figures with a certain orderLine up nested tikz enviroments or how to get rid of themAdding axes labels to LaTeX figures

                    Tähtien Talli Jäsenet | Lähteet | NavigointivalikkoSuomen Hippos – Tähtien Talli

                    Do these cracks on my tires look bad? The Next CEO of Stack OverflowDry rot tire should I replace?Having to replace tiresFishtailed so easily? Bad tires? ABS?Filling the tires with something other than air, to avoid puncture hassles?Used Michelin tires safe to install?Do these tyre cracks necessitate replacement?Rumbling noise: tires or mechanicalIs it possible to fix noisy feathered tires?Are bad winter tires still better than summer tires in winter?Torque converter failure - Related to replacing only 2 tires?Why use snow tires on all 4 wheels on 2-wheel-drive cars?