The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
[Solved] Learner with numerical input and binominal output?
Dear all,
I want to build a series prediction process but I am not quite sure which learner is the right one to use.
The input is a multivariate numerical data set (including a numerical label).
The output is supposed to be a simple binominal "up" or "down".
I wanted to ask whether there is a special learner or setting for this kind of task. If not I could imagine to use a SVM with numerical output followed by a "generate attribute" operator that includes a formula like
if(prediction[for t+1]>=label[of t] then "up" else "down")
Best regards
Sachs
I want to build a series prediction process but I am not quite sure which learner is the right one to use.
The input is a multivariate numerical data set (including a numerical label).
The output is supposed to be a simple binominal "up" or "down".
I wanted to ask whether there is a special learner or setting for this kind of task. If not I could imagine to use a SVM with numerical output followed by a "generate attribute" operator that includes a formula like
if(prediction[for t+1]>=label[of t] then "up" else "down")
Best regards
Sachs
Tagged:
0
Answers
you should install the Series Extension. Then you can window your data to get it into the right format (I suppose you already have done that?).
To get up/down-labels, use the Differentiate operator with the correct change_mode.
Best regards,
Marius
Dear Marius,
thank you very much for your fast response. I tried to set up the process according to your suggestion but I got stuck at some point:
-I don't know how get the label converted to binominal type so that the SVM will accept it. So far I tried "nominal to binominal" operator but it doesn't work out yet.
-Some of the operators seem to "skip" the role. However, there is a workaround using the set role operator.
Kind regards
Sachs
this specific process runs fine if you actually hit the Run button, even though the meta data processing creates some warnings. This is because Differentiate can create the label "no change" in theory, but this specific data set has no constant values.
To overcome this problem in general where you have the "no change" class, you have several options. Applying Nominal to Binominal on the label however is not possible, since that would split up the label attribute into several binominal attributes, where the learners can only handle a single label attribute.
So what you can do is the following.
A)
Since "no change" is probably rather rare, dismiss examples with no change (use Filter Examples)
Generate three SVMs, that classify up/not-up, down/not-down and change/no-change, apply all three models and predict that outcome with the highest confidence
I have created an internal ticket about the Differentiate operator dismissing the label role.
Best regards,
Marius
Dear Marius,
now it seems to work fine. Besides the worries with the polynominal attributes I got confused by the performance operator. I used prediction trend accuracy in the past but it shows "unknown" in this set up. But after changing to the common performance operator everything is ok now.
Thank you for your advise
Sachs
In any case, since you are now dealing with a binominal classification problem and no longer a regression, the trend accuracy operator does not work anyway.
Best regards,
Marius
thank you! How could I have overlooked that the test window needs to be at least two?!
Now everything works fine!
Cheers
Sachs
This operator would avoid error messages of the following operators and could check for integrity (e.g. if binominal is only two different values).
Best
Sachs
However, we are thinking about doing (some of) these transformation automatically in the future.
Best regards,
Marius