turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community Home
- :
- Product Help
- :
- RapidMiner Studio Forum
- :
- Input for ModelApplier

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

07-16-2008 11:03 AM

8 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

07-16-2008 12:34 PM

07-16-2008 12:34 PM

Hello

I am afraid I got you wrong, but...

If you look in the javadoc, you will see that every class that implements the interface "Model" provides a method called

This method (normally) adds prediction and confidence attributes to the input ExampleSet testSet based on the used model.

Is this what you are looking for ?

Steffen

I am afraid I got you wrong, but...

If you look in the javadoc, you will see that every class that implements the interface "Model" provides a method called

ExampleSet apply(ExampleSet testSet)

throws OperatorException

This method (normally) adds prediction and confidence attributes to the input ExampleSet testSet based on the used model.

Is this what you are looking for ?

Steffen

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

07-17-2008 11:08 AM

07-17-2008 11:08 AM

I don't know if this is what I'm lokking for...

I try to explain my problem:

I've got a time serie of values (for time=0,...,t ) which I used to generate a regression model. Now I want to apply an simple Integer value (t+1) to "forcast" the next value. But until now, I didn't find a way to apply this value which is saved in an integer variable to my model.

I really hopy someone know what I have to do. It is the first time I am using Rapid Miner...

I try to explain my problem:

I've got a time serie of values (for time=0,...,t ) which I used to generate a regression model. Now I want to apply an simple Integer value (t+1) to "forcast" the next value. But until now, I didn't find a way to apply this value which is saved in an integer variable to my model.

I really hopy someone know what I have to do. It is the first time I am using Rapid Miner...

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

07-18-2008 05:26 AM

07-18-2008 05:26 AM

Hello,

first of all: welcome here to our community. I would like to give you two remarks:

1.) Although you probably do not want to hear this but: it is most often not a good idea to simply use a regression model for time series forecasting. The reasons is that the future predictions are not backed up by any of the seen data and therefore the predictions often tend to drop to zero. So what you probably want to use is a windowing approach together with a base regression learner. You can have a look into the discussion here

http://rapid-i.com/rapidforum/index.php/topic,16.0.html

in order to get the basic ideas.

2.) If you stick to the approach described in the link above, you can simply build a new window from the historical data plus the new one and apply the model to it just in the same way as you can apply a model to other data. The prediction of this model then is the prediction for the time lag defined by the horizon in the windowing approach.

Hope that gives you some hints how to work on your problem.

Cheers,

Ingo

How to load processes in XML from the forum into RapidMiner: Read this!

first of all: welcome here to our community. I would like to give you two remarks:

1.) Although you probably do not want to hear this but: it is most often not a good idea to simply use a regression model for time series forecasting. The reasons is that the future predictions are not backed up by any of the seen data and therefore the predictions often tend to drop to zero. So what you probably want to use is a windowing approach together with a base regression learner. You can have a look into the discussion here

http://rapid-i.com/rapidforum/index.php/topic,16.0.html

in order to get the basic ideas.

2.) If you stick to the approach described in the link above, you can simply build a new window from the historical data plus the new one and apply the model to it just in the same way as you can apply a model to other data. The prediction of this model then is the prediction for the time lag defined by the horizon in the windowing approach.

Hope that gives you some hints how to work on your problem.

Cheers,

Ingo

How to load processes in XML from the forum into RapidMiner: Read this!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

07-19-2008 10:24 AM

07-19-2008 10:24 AM

Thank you very much for your advices. But it is part of my diploma thesis (where I evaluate the use of prediction methods for tuning an database system) using regression methods to predict values. I know that there are problems using the hole time serie to forecast something.

My approach is the following:

- monitoring performance metrics of an IT-system

- create a regression model using the last x snapshots (where x is a constant!!!)

- apply this model for the next time value to forecast the next performance value

If I am not wrong, I implicitly use the same idea like your explained window operator. In the meantime, I found another way to set my input parameters by using the database where all my values are saved.

But now, I have another problem: How can I access the predicted value to use it in my java program??? ???

I really hope that someone can explain it to me...

My approach is the following:

- monitoring performance metrics of an IT-system

- create a regression model using the last x snapshots (where x is a constant!!!)

- apply this model for the next time value to forecast the next performance value

If I am not wrong, I implicitly use the same idea like your explained window operator. In the meantime, I found another way to set my input parameters by using the database where all my values are saved.

But now, I have another problem: How can I access the predicted value to use it in my java program??? ???

I really hope that someone can explain it to me...

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

07-22-2008 10:47 AM

07-22-2008 10:47 AM

Hi,

Using regression methods is perfectly fine. But you should consider to wrap the regression learning step into a windowing in order to get true predictions...

...what you seem to have

I should definitely read the full text before answering. You are right, your approach follows the basic windowing idea mentioned in the post above - but you have to perform more work manually in creating the data sets.

May I ask if you could post the source code you tried so far (for model building and model application)? I could give you some hints on the code then and add the missing lines for the retrieval of the model predictions.

Cheers,

Ingo

How to load processes in XML from the forum into RapidMiner: Read this!

But it is part of my diploma thesis (where I evaluate the use of prediction methods for tuning an database system) using regression methods to predict values.

Using regression methods is perfectly fine. But you should consider to wrap the regression learning step into a windowing in order to get true predictions...

If I am not wrong, I implicitly use the same idea like your explained window operator. In the meantime, I found another way to set my input parameters by using the database where all my values are saved.

...what you seem to have

I should definitely read the full text before answering. You are right, your approach follows the basic windowing idea mentioned in the post above - but you have to perform more work manually in creating the data sets.

But now, I have another problem: How can I access the predicted value to use it in my java program???

May I ask if you could post the source code you tried so far (for model building and model application)? I could give you some hints on the code then and add the missing lines for the retrieval of the model predictions.

Cheers,

Ingo

How to load processes in XML from the forum into RapidMiner: Read this!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

07-22-2008 11:44 AM

07-22-2008 11:44 AM

Hello,

It isn't so. All my data is stored in a database so that I can get the last x value using the FETCH-command in the sql-query. So I think it isn' t too much work.

My source code is the following:

I omitted the settings of the parameters because I think there aren't so relevant. In the meantime I found a way to get the predicted value, but I am sure there are better possibilities to get it:

It would be great if you could show me a better way to the predicted value...

but you have to perform more work manually in creating the data sets.

It isn't so. All my data is stored in a database so that I can get the last x value using the FETCH-command in the sql-query. So I think it isn' t too much work.

My source code is the following:

// Model generation

Operator input = OperatorService.createOperator( DatabaseExampleSource.class );

/* ... */

process.getRootOperator().addOperator( input );

Operator putput = OperatorService.createOperator( LinearRegression.class );

process.getRootOperator().addOperator( putput );

Operator output = OperatorService.createOperator( ModelWriter.class );

/* ... */

process.getRootOperator().addOperator( output );

process.run();

// Applying data on model

Operator input = OperatorService.createOperator( ModelLoader.class );

/* ... */

process.getRootOperator().addOperator( input );

Operator input2 = OperatorService.createOperator( DatabaseExampleSource.class );

/* ... */

process.getRootOperator().addOperator( input2 );

Operator applier = OperatorService.createOperator( ModelApplier.class );

process.getRootOperator().addOperator( applier );

ExampleSet resultSet = process.run();

I omitted the settings of the parameters because I think there aren't so relevant. In the meantime I found a way to get the predicted value, but I am sure there are better possibilities to get it:

Example reader = resultSet.getExample(0);

Attributes att = reader.getAttributes();

String value = reader.getValueAsString( att.getPredictedLabel() );

result = Math.round( Float.parseFloat( value ) * 1000.0 )/1000.0;

It would be great if you could show me a better way to the predicted value...

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

07-22-2008 12:01 PM

07-22-2008 12:01 PM

Hi again,

Looks good for me so far.

The one you mentioned is correct in principle. I just did not understand the last two lines. Why didn't you just use "getValue(Attribute)" as in the following snippet:

Cheers,

Ingo

How to load processes in XML from the forum into RapidMiner: Read this!

I omitted the settings of the parameters because I think there aren't so relevant. In the meantime I found a way to get the predicted value, but I am sure there are better possibilities to get it:

Looks good for me so far.

It would be great if you could show me a better way to the predicted value...

The one you mentioned is correct in principle. I just did not understand the last two lines. Why didn't you just use "getValue(Attribute)" as in the following snippet:

double result = reader.getValue(att.getPredictedLabel());

Cheers,

Ingo

How to load processes in XML from the forum into RapidMiner: Read this!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

07-23-2008 02:19 AM