Ludwig: Training forecast data

Created on 19 Feb 2019  路  15Comments  路  Source: ludwig-ai/ludwig

Hi.

I'm trying to run the forecast prediction example, but apparently I'm not using correctly.

Does you have an example of how I can include the futures input properly? What format to expect on the CSV file?

waiting for answer

Most helpful comment

First, timeseires forcasting can do much more interesting things than forecasting stock market prices.
Stock market prices are part of a level two chaotic system (a chaotic system where you acting on your own predictions make the predictions wrong), so I personally believe it's a pretty useless exercise.
Moreover, the fact that you want to use Ludwig for building such a model does not mean that everyone wants to do so, and I don't like the attitude of the bringer of truth that you show in the first sentence of ou post while saying something provably wrong, please refrain from this attitude moving forward.

That said, on the technical side of things, what you call mindfuckery is 10 lines of really basic code or even less, already written for you here.
https://uber.github.io/ludwig/examples/#time-series-forecasting
We are also considering adding those 10 lines directly in Ludwig to make the lie of people who can't write those 10 lines of code (or even copy-pasting them) even simpler, as this is what Ludwig is about.
WOuld greatly appreciate contributions instead of this kind of comments.

All 15 comments

Hey Igor, have you had a look at the timeseries forecasting example here?
https://uber.github.io/ludwig/examples/#time-series-forecasting

It is possible to have the file timeseries_data.csv? So I can see the format of the timeseries

There is no specific CSV, That was an example. And the format is explicitly shown in the table in the example.

this works fine using yaml provided in example:

timeseries_data,y1,y2,y3,y4,y5
15.07 14.89 14.45,16.92,16.67,16.48,7.00,17.02
14.89 14.45 14.30,16.67,16.48,17.00,17.02,16.48
15.07 14.89 14.45,16.92,16.67,16.48,7.00,17.02
14.89 14.45 14.30,16.67,16.48,17.00,17.02,16.48
15.07 14.89 14.45,16.92,16.67,16.48,7.00,17.02
14.89 14.45 14.30,16.67,16.48,17.00,17.02,16.48
15.07 14.89 14.45,16.92,16.67,16.48,7.00,17.02
...

So the input feature is a sentence with numbers instead of words ?

Is it possible (or will it be) to do timeseries classification ?

Weather prediction example:

Data format:

  • Time series column: Timestamp
  • Input features: Temperature, Humidity, Pressure, WindSpeed, Rain (categorical)
  • Output feature: Rain (categorical)

One row would look like:
2019-03-07T01:00:00, 31, 61, 101, 20, LIGHT

Goal: predict "Rain" column n step(s) in the future.

@yanisIk the default way to read a timeseries is a string of numbers separated by whitespace. I wouldn't call it text.
Regarding your example, at the moment there is no explicit management of dates. but if you convert it into 5 separate numbers (year month day hour seconds) it will work.
Closing this as the original author has not answered yet. Feel free to reopen if the thread does not contain the answer you wer looking for @igorcosta .

Hi,

I have dataset with time stamp column where data is in following format

Weather prediction example(same as explained above):

Data format:

Time series column: Timestamp
Input features: Temperature, Humidity, Pressure, WindSpeed, Rain (categorical)
Output feature: Rain (categorical)

One row would look like:
2019-03-07

Goal: predict "Rain" column n step(s) in the future.

If i want to use time series then do i need to convert my date to "2019 03 07" format?? or I need to sepearate
my timeseries column into 3 columns like Year,month,date

It depends on the granularity of your data, it it's day by day, I would divide in three columns, but if you are interested in predictions hour by hour then it will have to be different. It's ultimately your design choice.

How I should specify the datatype of new column is it TimeSeries or Numerical??

It depends on how you decide to endoce it, it's your choice. It could be categorical or numerical, it's you call.

Let's be honest here, we all want to use the time series type to forecast stock market prices to earn major profits, forget about weather. The way the time series is currently set up is contradictory to how basically all finance platforms export their data, take Yahoo Finance for example, where prices are listed in successive rows of comma separated values of Open, High, Low and Close. One would currently have to do mindfuckery to convert a standard financial data series into Ludwig acceptable time series format.

First, timeseires forcasting can do much more interesting things than forecasting stock market prices.
Stock market prices are part of a level two chaotic system (a chaotic system where you acting on your own predictions make the predictions wrong), so I personally believe it's a pretty useless exercise.
Moreover, the fact that you want to use Ludwig for building such a model does not mean that everyone wants to do so, and I don't like the attitude of the bringer of truth that you show in the first sentence of ou post while saying something provably wrong, please refrain from this attitude moving forward.

That said, on the technical side of things, what you call mindfuckery is 10 lines of really basic code or even less, already written for you here.
https://uber.github.io/ludwig/examples/#time-series-forecasting
We are also considering adding those 10 lines directly in Ludwig to make the lie of people who can't write those 10 lines of code (or even copy-pasting them) even simpler, as this is what Ludwig is about.
WOuld greatly appreciate contributions instead of this kind of comments.

In the example https://uber.github.io/ludwig/examples/#time-series-forecasting-weather-data-example
the generated temperature_predictions.csv file has the values in the normalized form, how to denormalize them?

In the example https://uber.github.io/ludwig/examples/#time-series-forecasting-weather-data-example
the generated temperature_predictions.csv file has the values in the normalized form, how to denormalize them?

This is a great point and should be a different Issue. Opening a new one.

First, timeseires forcasting can do much more interesting things than forecasting stock market prices.
Stock market prices are part of a level two chaotic system (a chaotic system where you acting on your own predictions make the predictions wrong), so I personally believe it's a pretty useless exercise.
Moreover, the fact that you want to use Ludwig for building such a model does not mean that everyone wants to do so, and I don't like the attitude of the bringer of truth that you show in the first sentence of ou post while saying something provably wrong, please refrain from this attitude moving forward.

That said, on the technical side of things, what you call mindfuckery is 10 lines of really basic code or even less, already written for you here.
https://uber.github.io/ludwig/examples/#time-series-forecasting
We are also considering adding those 10 lines directly in Ludwig to make the lie of people who can't write those 10 lines of code (or even copy-pasting them) even simpler, as this is what Ludwig is about.
WOuld greatly appreciate contributions instead of this kind of comments.

could we work with multivariate time series(categorical+numerical+timestamps) to do the forecasting with Ludwig.
Tahnks for your time.

Was this page helpful?
0 / 5 - 0 ratings