Message Boards Message Boards

0
|
5227 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to use the Predict function?

Posted 3 years ago

Hello,

I am in the process of teaching my-self Machine Learning: looking at the Wolfram lectures and those from AWS. I have attached my working Notebook. Please note that I got help to get the time-line plot from one of the generous Wolfram on-line experts.

I came across the Predict Function, but I can't figure out how to convert it to my case. In the Wolfram example I found in Documentation (highlighted in light magenta color) the dates point to a numerical event. In my case I have dates pointing to locations that are shown in the legend. I want to pick a date in the future say Sept 20th, and let Predict run and tell me where will be the new location (indicated in the legend such as labels = {278 EXWY, BynB, GthlB, OutrB, HT, LT,GWB}.

Best regards, Andrew

Attachments:
POSTED BY: Andrew Skipor
3 Replies
Posted 3 years ago

Hello friend,

It looks like your data is categorical, as you have multiple distinct event "categories." Predict thinks your problem is continuous (all events live on a spectrum), thus producing "2.5".

For categorical data, you probably want to use the Classify function.

But it might help to think more about the problem. The results will likely not be realistic since all it has as input is the event's time, and it is trying to prevent the event's occurrence. This is a very tricky problem with very little given information about the days.

You might have more success treating it as a SequencePredict problem, where you have a binary sequence for each event category on each day (true or false). This would likely be better than Classify, but it is really just forming some random transition probability based on past events (a Markov model).

You could also try SequencePredict with a list of events that occurred each day, but that could cause weird results depending on how the Markov model is configured and how much data you have of combinations of different events.

Ultimately, there is not much machine learning you can do with only this data. It might help to look for additional, domain-related information about those days that the events occurred on. I am not sure what domain your data is from, but maybe some easy-to-get data like the weather for those dates could be used to augment your current dataset.

Best of luck!

POSTED BY: Alec Graves
Posted 3 years ago

I have discovered some more possible solutions:

There are other functions like "FindFit" and "TimeSeriesForcast" that could be applicable since you already have TimeSeries data.

I saw a list of Wolfram Language functions at the bottom of this guide, and it reminded me of your situation:

http://reference.wolfram.com/language/guide/TimeSeries.html

POSTED BY: Alec Graves

Hello Alec,

Thank you very much for your suggestions and comments. I will look at these functions. These events don't have any coupling to weather or other physical phenomena, I believe they are made by human choice. There could be some underlying motivation(s), but I am not aware of these.

Thanks very much, I have now a few more new Wolfram functions to add to my portfolio.

Andrew

POSTED BY: Andrew Skipor
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract