How exactly do I go about extracting features from timestamps for machine learning? [on hold]Machine learning - features engineering from date/time dataHow to perform feature engineering on unknown features?Dissmissing features based on correlation with target variableGiving Emails as Input to Machine Learning AlgorithmsHow to find categorical features from a vector representation of text?Extracting meaningful features from clusters and study correlationUsing python and machine learning to extract information from an invoice? Inital dataset?How to model a Machine learning problem considering links between featuresHow can I improve a machine learning model?How to handle date data for Knn?

Where does the bonus feat in the cleric starting package come from?

Create all possible words using a set or letters

Could the E-bike drivetrain wear down till needing replacement after 400 km?

Creature in Shazam mid-credits scene?

Melting point of aspirin, contradicting sources

hline - width of entire table

Can someone explain how this makes sense electrically?

why `nmap 192.168.1.97` returns less services than `nmap 127.0.0.1`?

The Staircase of Paint

I am looking for the correct translation of love for the phrase "in this sign love"

Is a model fitted to data or is data fitted to a model?

Loading commands from file

Is it improper etiquette to ask your opponent what his/her rating is before the game?

Can the Supreme Court Overturn an Impeachment?

Is there a single word describing earning money through any means?

How to explain what's wrong with this application of the chain rule?

What is this called? Old film camera viewer?

Where did Heinlein say "Once you get to Earth orbit, you're halfway to anywhere in the Solar System"?

Is it better practice to read straight from sheet music rather than memorize it?

Travelling outside the UK without a passport

Drawing ramified coverings with tikz

Why is it that I can sometimes guess the next note?

Why did the HMS Bounty go back to a time when whales are already rare?

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?



How exactly do I go about extracting features from timestamps for machine learning? [on hold]


Machine learning - features engineering from date/time dataHow to perform feature engineering on unknown features?Dissmissing features based on correlation with target variableGiving Emails as Input to Machine Learning AlgorithmsHow to find categorical features from a vector representation of text?Extracting meaningful features from clusters and study correlationUsing python and machine learning to extract information from an invoice? Inital dataset?How to model a Machine learning problem considering links between featuresHow can I improve a machine learning model?How to handle date data for Knn?













1












$begingroup$


My dataset has a timestamp column with the following format: 06/24/18 0:56
How exactly do I convert this information into features that can be used for classification algorithms like logistic regression?










share|improve this question







New contributor




Apollo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$



put on hold as too broad by Mark.F, oW_, Esmailian, Ethan, Siong Thye Goh Mar 20 at 1:16


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






















    1












    $begingroup$


    My dataset has a timestamp column with the following format: 06/24/18 0:56
    How exactly do I convert this information into features that can be used for classification algorithms like logistic regression?










    share|improve this question







    New contributor




    Apollo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.







    $endgroup$



    put on hold as too broad by Mark.F, oW_, Esmailian, Ethan, Siong Thye Goh Mar 20 at 1:16


    Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.




















      1












      1








      1





      $begingroup$


      My dataset has a timestamp column with the following format: 06/24/18 0:56
      How exactly do I convert this information into features that can be used for classification algorithms like logistic regression?










      share|improve this question







      New contributor




      Apollo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.







      $endgroup$




      My dataset has a timestamp column with the following format: 06/24/18 0:56
      How exactly do I convert this information into features that can be used for classification algorithms like logistic regression?







      machine-learning feature-extraction feature-engineering






      share|improve this question







      New contributor




      Apollo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Apollo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Apollo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Mar 19 at 14:10









      ApolloApollo

      61




      61




      New contributor




      Apollo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Apollo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Apollo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      put on hold as too broad by Mark.F, oW_, Esmailian, Ethan, Siong Thye Goh Mar 20 at 1:16


      Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









      put on hold as too broad by Mark.F, oW_, Esmailian, Ethan, Siong Thye Goh Mar 20 at 1:16


      Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






















          2 Answers
          2






          active

          oldest

          votes


















          1












          $begingroup$

          A common approach for time-series classification problems is to divide the continuous stream of data into samples of a certain duration.



          This is called sliding window segmentation.



          enter image description here



          You don't really use timestamps as features because they wouldn't be useful during the classification of unseen data. Imagine training a model with data obtained in 2018, and trying to classify data for 2019. The information is not on the dates but in the values of the other features!






          share|improve this answer









          $endgroup$












          • $begingroup$
            Nice answer but I think he's looking for more basic help than that!
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 15:50


















          1












          $begingroup$

          Welcome to the site! You will get better answers if you post the language you are working in, but I'll assume python. One of the most basic things you're going to need is to break it down into components. So, let's say your column in the pandas dataframe is named "client_date". You could use:



          # Convert the date to something python understands
          df['client_date'] = pd.to_datetime(df['client_date'])
          # Get a year
          df['client_year'] = df['client_date'].dt.year
          # Get a month
          df['client_year'] = df['client_date'].dt.month


          I think you get the idea and that will help get you started for the rest of your research. Good luck!






          share|improve this answer











          $endgroup$








          • 1




            $begingroup$
            Thank you so much for your response. I'd love it if you could address another silly doubt of mine. Converting the date to the python format worked perfectly fine. However, while trying to extract the month/year, I get the following error: return object.__getattribute__(self, name) AttributeError: 'Series' object has no attribute 'month'
            $endgroup$
            – Apollo
            Mar 19 at 20:15










          • $begingroup$
            @Apollo I apologize, there was an error in my original answer. Please try the above code again. Note the addition of "dt" , as in df['client_year'] = df['client_date'].dt.year
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 20:32










          • $begingroup$
            @Apollo Also, if my answer has helped you in some way, I'd appreciate the upvote and marking my answer as the chosen solution.
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 20:32






          • 1




            $begingroup$
            Upvotes will turn public once my reputation crosses 15. Thanks again!
            $endgroup$
            – Apollo
            Mar 19 at 20:47


















          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1












          $begingroup$

          A common approach for time-series classification problems is to divide the continuous stream of data into samples of a certain duration.



          This is called sliding window segmentation.



          enter image description here



          You don't really use timestamps as features because they wouldn't be useful during the classification of unseen data. Imagine training a model with data obtained in 2018, and trying to classify data for 2019. The information is not on the dates but in the values of the other features!






          share|improve this answer









          $endgroup$












          • $begingroup$
            Nice answer but I think he's looking for more basic help than that!
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 15:50















          1












          $begingroup$

          A common approach for time-series classification problems is to divide the continuous stream of data into samples of a certain duration.



          This is called sliding window segmentation.



          enter image description here



          You don't really use timestamps as features because they wouldn't be useful during the classification of unseen data. Imagine training a model with data obtained in 2018, and trying to classify data for 2019. The information is not on the dates but in the values of the other features!






          share|improve this answer









          $endgroup$












          • $begingroup$
            Nice answer but I think he's looking for more basic help than that!
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 15:50













          1












          1








          1





          $begingroup$

          A common approach for time-series classification problems is to divide the continuous stream of data into samples of a certain duration.



          This is called sliding window segmentation.



          enter image description here



          You don't really use timestamps as features because they wouldn't be useful during the classification of unseen data. Imagine training a model with data obtained in 2018, and trying to classify data for 2019. The information is not on the dates but in the values of the other features!






          share|improve this answer









          $endgroup$



          A common approach for time-series classification problems is to divide the continuous stream of data into samples of a certain duration.



          This is called sliding window segmentation.



          enter image description here



          You don't really use timestamps as features because they wouldn't be useful during the classification of unseen data. Imagine training a model with data obtained in 2018, and trying to classify data for 2019. The information is not on the dates but in the values of the other features!







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 19 at 14:40









          Francesco PegoraroFrancesco Pegoraro

          56717




          56717











          • $begingroup$
            Nice answer but I think he's looking for more basic help than that!
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 15:50
















          • $begingroup$
            Nice answer but I think he's looking for more basic help than that!
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 15:50















          $begingroup$
          Nice answer but I think he's looking for more basic help than that!
          $endgroup$
          – I_Play_With_Data
          Mar 19 at 15:50




          $begingroup$
          Nice answer but I think he's looking for more basic help than that!
          $endgroup$
          – I_Play_With_Data
          Mar 19 at 15:50











          1












          $begingroup$

          Welcome to the site! You will get better answers if you post the language you are working in, but I'll assume python. One of the most basic things you're going to need is to break it down into components. So, let's say your column in the pandas dataframe is named "client_date". You could use:



          # Convert the date to something python understands
          df['client_date'] = pd.to_datetime(df['client_date'])
          # Get a year
          df['client_year'] = df['client_date'].dt.year
          # Get a month
          df['client_year'] = df['client_date'].dt.month


          I think you get the idea and that will help get you started for the rest of your research. Good luck!






          share|improve this answer











          $endgroup$








          • 1




            $begingroup$
            Thank you so much for your response. I'd love it if you could address another silly doubt of mine. Converting the date to the python format worked perfectly fine. However, while trying to extract the month/year, I get the following error: return object.__getattribute__(self, name) AttributeError: 'Series' object has no attribute 'month'
            $endgroup$
            – Apollo
            Mar 19 at 20:15










          • $begingroup$
            @Apollo I apologize, there was an error in my original answer. Please try the above code again. Note the addition of "dt" , as in df['client_year'] = df['client_date'].dt.year
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 20:32










          • $begingroup$
            @Apollo Also, if my answer has helped you in some way, I'd appreciate the upvote and marking my answer as the chosen solution.
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 20:32






          • 1




            $begingroup$
            Upvotes will turn public once my reputation crosses 15. Thanks again!
            $endgroup$
            – Apollo
            Mar 19 at 20:47
















          1












          $begingroup$

          Welcome to the site! You will get better answers if you post the language you are working in, but I'll assume python. One of the most basic things you're going to need is to break it down into components. So, let's say your column in the pandas dataframe is named "client_date". You could use:



          # Convert the date to something python understands
          df['client_date'] = pd.to_datetime(df['client_date'])
          # Get a year
          df['client_year'] = df['client_date'].dt.year
          # Get a month
          df['client_year'] = df['client_date'].dt.month


          I think you get the idea and that will help get you started for the rest of your research. Good luck!






          share|improve this answer











          $endgroup$








          • 1




            $begingroup$
            Thank you so much for your response. I'd love it if you could address another silly doubt of mine. Converting the date to the python format worked perfectly fine. However, while trying to extract the month/year, I get the following error: return object.__getattribute__(self, name) AttributeError: 'Series' object has no attribute 'month'
            $endgroup$
            – Apollo
            Mar 19 at 20:15










          • $begingroup$
            @Apollo I apologize, there was an error in my original answer. Please try the above code again. Note the addition of "dt" , as in df['client_year'] = df['client_date'].dt.year
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 20:32










          • $begingroup$
            @Apollo Also, if my answer has helped you in some way, I'd appreciate the upvote and marking my answer as the chosen solution.
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 20:32






          • 1




            $begingroup$
            Upvotes will turn public once my reputation crosses 15. Thanks again!
            $endgroup$
            – Apollo
            Mar 19 at 20:47














          1












          1








          1





          $begingroup$

          Welcome to the site! You will get better answers if you post the language you are working in, but I'll assume python. One of the most basic things you're going to need is to break it down into components. So, let's say your column in the pandas dataframe is named "client_date". You could use:



          # Convert the date to something python understands
          df['client_date'] = pd.to_datetime(df['client_date'])
          # Get a year
          df['client_year'] = df['client_date'].dt.year
          # Get a month
          df['client_year'] = df['client_date'].dt.month


          I think you get the idea and that will help get you started for the rest of your research. Good luck!






          share|improve this answer











          $endgroup$



          Welcome to the site! You will get better answers if you post the language you are working in, but I'll assume python. One of the most basic things you're going to need is to break it down into components. So, let's say your column in the pandas dataframe is named "client_date". You could use:



          # Convert the date to something python understands
          df['client_date'] = pd.to_datetime(df['client_date'])
          # Get a year
          df['client_year'] = df['client_date'].dt.year
          # Get a month
          df['client_year'] = df['client_date'].dt.month


          I think you get the idea and that will help get you started for the rest of your research. Good luck!







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 19 at 20:31

























          answered Mar 19 at 15:50









          I_Play_With_DataI_Play_With_Data

          1,234632




          1,234632







          • 1




            $begingroup$
            Thank you so much for your response. I'd love it if you could address another silly doubt of mine. Converting the date to the python format worked perfectly fine. However, while trying to extract the month/year, I get the following error: return object.__getattribute__(self, name) AttributeError: 'Series' object has no attribute 'month'
            $endgroup$
            – Apollo
            Mar 19 at 20:15










          • $begingroup$
            @Apollo I apologize, there was an error in my original answer. Please try the above code again. Note the addition of "dt" , as in df['client_year'] = df['client_date'].dt.year
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 20:32










          • $begingroup$
            @Apollo Also, if my answer has helped you in some way, I'd appreciate the upvote and marking my answer as the chosen solution.
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 20:32






          • 1




            $begingroup$
            Upvotes will turn public once my reputation crosses 15. Thanks again!
            $endgroup$
            – Apollo
            Mar 19 at 20:47













          • 1




            $begingroup$
            Thank you so much for your response. I'd love it if you could address another silly doubt of mine. Converting the date to the python format worked perfectly fine. However, while trying to extract the month/year, I get the following error: return object.__getattribute__(self, name) AttributeError: 'Series' object has no attribute 'month'
            $endgroup$
            – Apollo
            Mar 19 at 20:15










          • $begingroup$
            @Apollo I apologize, there was an error in my original answer. Please try the above code again. Note the addition of "dt" , as in df['client_year'] = df['client_date'].dt.year
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 20:32










          • $begingroup$
            @Apollo Also, if my answer has helped you in some way, I'd appreciate the upvote and marking my answer as the chosen solution.
            $endgroup$
            – I_Play_With_Data
            Mar 19 at 20:32






          • 1




            $begingroup$
            Upvotes will turn public once my reputation crosses 15. Thanks again!
            $endgroup$
            – Apollo
            Mar 19 at 20:47








          1




          1




          $begingroup$
          Thank you so much for your response. I'd love it if you could address another silly doubt of mine. Converting the date to the python format worked perfectly fine. However, while trying to extract the month/year, I get the following error: return object.__getattribute__(self, name) AttributeError: 'Series' object has no attribute 'month'
          $endgroup$
          – Apollo
          Mar 19 at 20:15




          $begingroup$
          Thank you so much for your response. I'd love it if you could address another silly doubt of mine. Converting the date to the python format worked perfectly fine. However, while trying to extract the month/year, I get the following error: return object.__getattribute__(self, name) AttributeError: 'Series' object has no attribute 'month'
          $endgroup$
          – Apollo
          Mar 19 at 20:15












          $begingroup$
          @Apollo I apologize, there was an error in my original answer. Please try the above code again. Note the addition of "dt" , as in df['client_year'] = df['client_date'].dt.year
          $endgroup$
          – I_Play_With_Data
          Mar 19 at 20:32




          $begingroup$
          @Apollo I apologize, there was an error in my original answer. Please try the above code again. Note the addition of "dt" , as in df['client_year'] = df['client_date'].dt.year
          $endgroup$
          – I_Play_With_Data
          Mar 19 at 20:32












          $begingroup$
          @Apollo Also, if my answer has helped you in some way, I'd appreciate the upvote and marking my answer as the chosen solution.
          $endgroup$
          – I_Play_With_Data
          Mar 19 at 20:32




          $begingroup$
          @Apollo Also, if my answer has helped you in some way, I'd appreciate the upvote and marking my answer as the chosen solution.
          $endgroup$
          – I_Play_With_Data
          Mar 19 at 20:32




          1




          1




          $begingroup$
          Upvotes will turn public once my reputation crosses 15. Thanks again!
          $endgroup$
          – Apollo
          Mar 19 at 20:47





          $begingroup$
          Upvotes will turn public once my reputation crosses 15. Thanks again!
          $endgroup$
          – Apollo
          Mar 19 at 20:47




          Popular posts from this blog

          Luettelo Yhdysvaltain laivaston lentotukialuksista Lähteet | Navigointivalikko

          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

          Gary (muusikko) Sisällysluettelo Historia | Rockin' High | Lähteet | Aiheesta muualla | NavigointivalikkoInfobox OKTuomas "Gary" Keskinen Ancaran kitaristiksiProjekti Rockin' High