0
$\begingroup$

I have a data set like this. Here the first column is date, the second column is Temperature, third one is humidity, fourth and fifth column are two other boolean data. I have data of 6 years like this.

2010-01-01,25.6,59,0,1
2010-01-02,25.6,60,0,1
2010-01-03,24.2,45,1,1
2010-01-04,26.3,20,0,1
2010-01-05,26.2,17,0,1
2010-01-06,24.3,65,0,0
2010-01-07,23.1,50,0,1
2010-01-08,26.3,25,1,0
2010-01-09,26.6,23,0,1
2010-01-10,24.3,60,0,1

And the label (The variable I want to predict) for this data set is: (boolean)

0,0,0,1,1,0,0,0,1,0

Now I want to implement Machine Learning to predict from this data set for a future time frame. I have almost no knowledge on machine learning. I want to use python to do it. Which library or methodology will be best and easiest for this? And can I have a simple sample code?

$\endgroup$
  • $\begingroup$ Is the data periodic? $\endgroup$ – El Burro Apr 21 '17 at 12:32
  • $\begingroup$ Not always. But there is a pattern. $\endgroup$ – nsssayom Apr 21 '17 at 12:33
1
$\begingroup$

Your problem looks to me more like a classification problem than a time series problem. My suggestion: Split the date into several sub-variables (year, month, day, week-of-day (maybe). Then just use this and the other values as input for a classification algorithm. Ideally you try several. I can recommend sklearn for this (http://scikit-learn.org/stable/auto_examples/classification/plot_classifier_comparison.html)

One advice: Depending on the classification algorithm you need to first normalize your data. I find the following blog useful for entry-level problems (with code examples-- if you want to approach this from a time-series perspective he also talks about this) and documentation http://machinelearningmastery.com/blog/.

Hope that helps.

$\endgroup$
  • $\begingroup$ Okay! I am going to try this now... $\endgroup$ – nsssayom Apr 21 '17 at 12:44
  • $\begingroup$ It can be a bit overwhelming at the beginning - but this should be the right place if you run into more specific problems :). $\endgroup$ – El Burro Apr 21 '17 at 12:51
0
$\begingroup$

Welcome to the wonderful and sometimes intimidating world of machine learning! Building on El Burro's reply, I would start with a recurrent neural network, and put a logistic layer at the top.

Recurrent neural networks are times series models in machine learning. They take input (the value of a variable at each point in time), perform some transformations, and give an output (a class label, in your case, but they can also be used for sequence-to-sequence prediction).

One specifically relevant blog post for you might be sequence classification.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.