Options

# "Applying generated weights to attributes"

Hello

I have just run a process involving optimize wights, and so the output I am given displays the optimal weights for my attributes.

My question is how do I apply these weights to a new model/data set?

Also, when I select any of the attribute weighting operators, it will display the weights I should use in the output, but doesnt actually apply those weights to my model/data......how do I apply these weights to a new set of data i am running through a neural net? I want to be able to use past data and weight attributes accordingly in order to help predict outcomes for a new data set.

Any help on this topic will be greatly appreciated

Cheers guys

Schills

I have just run a process involving optimize wights, and so the output I am given displays the optimal weights for my attributes.

My question is how do I apply these weights to a new model/data set?

Also, when I select any of the attribute weighting operators, it will display the weights I should use in the output, but doesnt actually apply those weights to my model/data......how do I apply these weights to a new set of data i am running through a neural net? I want to be able to use past data and weight attributes accordingly in order to help predict outcomes for a new data set.

Any help on this topic will be greatly appreciated

Cheers guys

Schills

Tagged:

0

## Answers

347MavenI think you are looking for this operator: DataTransformation->Selection->Select by Weights.

To include attribute weights directly into a model, the learning operator has to allow this. E.g. Neural Net does not, but NaiveBayes (theoretically, as far as I see no implementation in rm reflects this). Just check the input ports / descriptions of the various learners.

Since you can store/load weights easily, I think you are able to figure out the application of weights to new data on your own (see it as a puzzle).

hope this was helpful,

steffen

16Contributor IIThanks for your reply!

The operator "select by weights" seems to only select attributes that have a weight and then use these attributes when i run the data through a SVM.

However, the weights are not actually being applied to my data in my model.

The generation of the weights is not the issue, however applying them to my model/data to give new results is the issue.

I tried to figure out the application of weights to my new data, but am still not solving this problem

Could you please let me know how to do this? and how to store/load weights?

Thanking you in advance

Schills

849MavenThe "scale_by_weights" operator alters your data, like this... As Steff has pointed out, weights are properties of

attributes, and can be imported and exported in the normal way.2,531Unicornas every object in RapidMiner you can use the "Store" and "Retrieve" operator to save and load the objects to and from repository.

If you want to export the weights into another application or something like this, you can use "Weights to Data" and export the resulting ExampleSet with one of the Write operators.

Greetings,

Sebastian

16Contributor III understand how to store and retrieve the weights, and can set the role as "weight", but this doesnt help me apply the weights to data....am I right, or is there a way to apply weight to data through this method? There is only 1 input port into learner models, so I cant use both the retrieved weights and the retrieved data?

If weights are properties of attributes, how do the weights get applied to all the data for each attribute, and not just the attribute itself?

How does storing/loading weights allow you to apply these weights to new data and then run through a training model? What is the step i am missing that allows me to go from loading (retrieving) weights to apply it to new data so that data is then changed according to the weight?

Basically, if my overall model is ax+by+dz = G, where a,b, c are the weights, x,y z are the attributes and G is the model's predicted output, i wish to be able to set a,b and c.

The "scale by weights" operator seems to alter the data by applying the weights, however when i run this through a SVM and apply the model to new data, the whole process does not work for some reason. May this be because the SVM alredy applies weights to the data, and so any additional weighting will not work?

Any info would be appreciated

Cheers guys

2,531Unicornyou can weight single attributes by applying the weights as you have already found out. If you have new data and want to apply the model, you of course have to scale the new data again with the weights. Otherwise the new data will be completely different.

See the following process as an example: Greetings,

Sebastian