September 2017
Beginner to intermediate
304 pages
7h 2m
English
To make our time series stationary, we will create a proxy time series where the observation at time period t is the observation at time period t from our original time series minus the previous observation. Let's difference each observation in this manner and then plot the results to see if it gets rid of the trends in our data. We are also going to output this differenced time series to a new *.csv file, as shown in the following code:
// as slices of floats. passengerVals := passengersDF.Col("AirPassengers").Float() timeVals := passengersDF.Col("time").Float() // pts will hold the values for plotting. pts := make(plotter.XYs, passengersDF.Nrow()-1) // differenced will hold our differenced values // that ...Read now
Unlock full access