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

                    Is there a general name for the setup in which payoffs are not known exactly but players try to influence each other's perception of the payoffs?Osborne, Nash equilibria and the correctness of beliefsIs there a name for this family of games (Binomial games?)?Perfect Bayesian EquilibriumCalculating mixed strategy equilibrium in battle of sexesPure Strategy SPNEIs there a commitment mechanism which allows players to achieve pareto optimal solutions?Extensive Form GamesAn $n$-player prisoner's dilemma where a coalition of 2 players is better off defectingTit-For-Stat Strategy Best RepliesPotential solutions of the $n$-player Prisoner's Dilemma

                    Is flight data recorder erased after every flight?When are black boxes used?What protects the location beacon (pinger) of a flight data recorder?Is there anywhere I can pick up raw flight data recorder information?Who legally owns the Flight Data Recorder?Constructing flight recorder dataWhy are FDRs and CVRs still two separate physical devices?What are the data elements shown on the GE235 flight data recorder (FDR) plot?Are CVR and FDR reset after every flight?What is the format of data stored by a Flight Data Recorder?How much data is stored in the flight data recorder per hour in a typical flight of an A380?Is a smart flight data recorder possible?

                    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