Date transformation for KNN to get distance [duplicate] The 2019 Stack Overflow Developer Survey Results Are InDate transformation for KNNHow to appropriately set weights for weighted KNNLearn and sample from a generative model with 2000 boolean featuresDistance measure for ternary featureWhen would one use Manhattan distance as opposite to Euclidean distance?Extract and normalize date from string for the proper text miningDistance measure calculation addresses for record linkingadvice on distance metric for knn w/image recognitionTime Series prediction for uneven data with some data providedMachine learning or NLP approach to convert string about month ,year into datesDate transformation for KNN

Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?

Is it possible for absolutely everyone to attain enlightenment?

What are the motivations for publishing new editions of an existing textbook, beyond new discoveries in a field?

How to check whether the reindex working or not in Magento?

How to deal with speedster characters?

Ubuntu Server install with full GUI

Why doesn't mkfifo with a mode of 1755 grant read permissions and sticky bit to the user?

If a sorcerer casts the Banishment spell on a PC while in Avernus, does the PC return to their home plane?

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

Why are there uneven bright areas in this photo of black hole?

Are spiders unable to hurt humans, especially very small spiders?

Time travel alters history but people keep saying nothing's changed

If I can cast sorceries at instant speed, can I use sorcery-speed activated abilities at instant speed?

Why is ParallelDo slower than Do?

Is bread bad for ducks?

When should I buy a clipper card after flying to Oakland?

What is the most efficient way to store a numeric range?

Why couldn't they take pictures of a closer black hole?

Is Sun brighter than what we actually see?

Did any laptop computers have a built-in 5 1/4 inch floppy drive?

Using xargs with pdftk

Is "plugging out" electronic devices an American expression?

How do I free up internal storage if I don't have any apps downloaded?

What is the meaning of Triage in Cybersec world?



Date transformation for KNN to get distance [duplicate]



The 2019 Stack Overflow Developer Survey Results Are InDate transformation for KNNHow to appropriately set weights for weighted KNNLearn and sample from a generative model with 2000 boolean featuresDistance measure for ternary featureWhen would one use Manhattan distance as opposite to Euclidean distance?Extract and normalize date from string for the proper text miningDistance measure calculation addresses for record linkingadvice on distance metric for knn w/image recognitionTime Series prediction for uneven data with some data providedMachine learning or NLP approach to convert string about month ,year into datesDate transformation for KNN










0












$begingroup$



This question is an exact duplicate of:



  • Date transformation for KNN

    1 answer



I have data set with date features like 01/01/2019 and I would like to use KNN. However, I cannot find a good transformation for dates that has a meaningful distance result for the last feature.



For example:



f1 | 1 | 2 | 3 | 4 | 01/01/2019



f2 | 10 | 3 | 12 | 1 | 14/01/2019



Does anyone have any recommendations?










share|improve this question









$endgroup$



marked as duplicate by Ethan, Siong Thye Goh, Mark.F, Sean Owen Mar 30 at 8:08


This question was marked as an exact duplicate of an existing question.






















    0












    $begingroup$



    This question is an exact duplicate of:



    • Date transformation for KNN

      1 answer



    I have data set with date features like 01/01/2019 and I would like to use KNN. However, I cannot find a good transformation for dates that has a meaningful distance result for the last feature.



    For example:



    f1 | 1 | 2 | 3 | 4 | 01/01/2019



    f2 | 10 | 3 | 12 | 1 | 14/01/2019



    Does anyone have any recommendations?










    share|improve this question









    $endgroup$



    marked as duplicate by Ethan, Siong Thye Goh, Mark.F, Sean Owen Mar 30 at 8:08


    This question was marked as an exact duplicate of an existing question.




















      0












      0








      0





      $begingroup$



      This question is an exact duplicate of:



      • Date transformation for KNN

        1 answer



      I have data set with date features like 01/01/2019 and I would like to use KNN. However, I cannot find a good transformation for dates that has a meaningful distance result for the last feature.



      For example:



      f1 | 1 | 2 | 3 | 4 | 01/01/2019



      f2 | 10 | 3 | 12 | 1 | 14/01/2019



      Does anyone have any recommendations?










      share|improve this question









      $endgroup$





      This question is an exact duplicate of:



      • Date transformation for KNN

        1 answer



      I have data set with date features like 01/01/2019 and I would like to use KNN. However, I cannot find a good transformation for dates that has a meaningful distance result for the last feature.



      For example:



      f1 | 1 | 2 | 3 | 4 | 01/01/2019



      f2 | 10 | 3 | 12 | 1 | 14/01/2019



      Does anyone have any recommendations?





      This question is an exact duplicate of:



      • Date transformation for KNN

        1 answer







      machine-learning data distance k-nn






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 29 at 20:53









      MappMapp

      143




      143




      marked as duplicate by Ethan, Siong Thye Goh, Mark.F, Sean Owen Mar 30 at 8:08


      This question was marked as an exact duplicate of an existing question.









      marked as duplicate by Ethan, Siong Thye Goh, Mark.F, Sean Owen Mar 30 at 8:08


      This question was marked as an exact duplicate of an existing question.






















          1 Answer
          1






          active

          oldest

          votes


















          0












          $begingroup$

          What do you consider a meaningful distance? One possibility would be days since some reference date.



          If seasonality also matters, you could additionally (or also) have calendar date or some sine or cosine functions with period 1 year/n for integer n - the idea being to get a periodic spline. The same kind of idea (or flagging weekday vs. weekend etc.) could apply to day of the week, if that makes sense for your problem.






          share|improve this answer









          $endgroup$



















            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0












            $begingroup$

            What do you consider a meaningful distance? One possibility would be days since some reference date.



            If seasonality also matters, you could additionally (or also) have calendar date or some sine or cosine functions with period 1 year/n for integer n - the idea being to get a periodic spline. The same kind of idea (or flagging weekday vs. weekend etc.) could apply to day of the week, if that makes sense for your problem.






            share|improve this answer









            $endgroup$

















              0












              $begingroup$

              What do you consider a meaningful distance? One possibility would be days since some reference date.



              If seasonality also matters, you could additionally (or also) have calendar date or some sine or cosine functions with period 1 year/n for integer n - the idea being to get a periodic spline. The same kind of idea (or flagging weekday vs. weekend etc.) could apply to day of the week, if that makes sense for your problem.






              share|improve this answer









              $endgroup$















                0












                0








                0





                $begingroup$

                What do you consider a meaningful distance? One possibility would be days since some reference date.



                If seasonality also matters, you could additionally (or also) have calendar date or some sine or cosine functions with period 1 year/n for integer n - the idea being to get a periodic spline. The same kind of idea (or flagging weekday vs. weekend etc.) could apply to day of the week, if that makes sense for your problem.






                share|improve this answer









                $endgroup$



                What do you consider a meaningful distance? One possibility would be days since some reference date.



                If seasonality also matters, you could additionally (or also) have calendar date or some sine or cosine functions with period 1 year/n for integer n - the idea being to get a periodic spline. The same kind of idea (or flagging weekday vs. weekend etc.) could apply to day of the week, if that makes sense for your problem.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 29 at 21:21









                BjörnBjörn

                243111




                243111













                    Popular posts from this blog

                    Rank groups within a grouped sequence of TRUE/FALSE and NAGrouping functions (tapply, by, aggregate) and the *apply familyCharacters counting and subletting specific patternsWhat is the purpose of setting a key in data.table?data.table vs dplyr: can one do something well the other can't or does poorly?how to make a bar plot for a list of dataframes?How to group by unique values in a list in RPandas - Alternative to rank() function that gives unique ordinal ranks for a columnRank within group in for loop in RData transformation: from dyadic to observational data in RGetting map from purrr to work with paste0

                    Are all passive ability checks floors for active ability checks?Does passive perception supersede active perception?Which skills can be used passively?Active Opposition with Free-Form Professions in Fate5E Trap/Ambush/Stealth Mechanics VS Passive Perception ConfusionInteraction between perception and stealth in obscured conditionsHow does Keen Sight affect Passive Perception?Are all d20 rolls either attacks, saves or ability checks?Can players declare that they are making a specific ability check?Can I see a Hidden creature that is not obscured at all?Can a Stealth check ever be made passively?Is this alternate version of the Observant feat balanced?What is the minimum amount of skill points per HD?

                    Quoting Keynes in a lectureIs differentiated instruction permitted by universities?How to make students learn prerequisitesUnsatisfactory Instructor Evaluations: balancing of expectations of engineering studentsWhat is the difference between a “statistician”, “applied statistician”, and an academic applying advanced stats within their field?Listing in reference section, but not quotingHow to efficiently use time while preparing for a class?Graduate Admissions: Teaching Emphasisstrategies for sharing teaching information with universities I don't personally have contacts withIs there an efficient way to give a large class of students feedback about their assignments?Is it unreasonable to expect students to read the lecture notes before attending the first class?