I am trying to form a classification model with the help of NDVI time series data. I want to use methods like SVM and Random Forest. I know how to apply these methods to normal data. But, I am confused while applying it to this time series data. This is a sample of my data:

enter image description here

Here the data have the different type of crops as classes. After that, each column represents the number of days after sowing. I was thinking of taking these columns i.e. number of days as my random variables and Class as my response variable to apply random forest and SVM classifiers. But I have a doubt if we can do that?? Is it right to apply classification method or there is some other procedure to do it on this type of data?? Please suggest me how can I apply classification method?? Any help would be highly valuable for me.

  • You can apply any machine learning model, I don't see the problem of using NDVI columns as predictors. Just for curiosity... Why are NDVI values of 20 days after sowing bigger than NDVI values of 40 days? – aldo_tapia May 25 '18 at 11:22
  • The ndvi values are calculated from optical data. So there may be some atmospheric condition on that day which altered the actual ndvi values. – agangwal May 25 '18 at 12:12

If my understanding of your question is correct, I see no problem with applying a random Forest, SVM or any other classification method. Class – like you said – is your response variable, the others are predictors. While in your example the predictors may have been created using time series analysis, there is no technical difference between this set of predictors and others that e.g. are rather based on reflectance values in different bands of a single Landsat/Sentinel/Modis scene or any other data. However, be aware that there is no guarantee of an actual connection between the crop type and your predictors; you’ll only be able to examine this after fitting the model.

Just a small annotation: I guess it would be feasible to remove the unnamed: 0 column, as it has no predictive meaning and may bias the result.


Try KNN with metric as DTW(Dynamic Time warping). It gives good result based on the time-series data.

Source: https://tslearn.readthedocs.io/en/latest/variablelength.html#supervised-classification

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.