Weka Prediction


I've got a problem with the Weka predicton. I have a point/dot that is moving through space (x,y,z) and changes its colour (r,g,b) while moving. For a very simple example I shall predict the next possible value for x.

I already splitted the table into test and training data. I used the "simple linear regression 3.7" to calculate the next possible value for x. Now I give this information to the "Weka Predictor 3.7". And here is the problem. The linear regression node calculated a value (12,45), that is a double. In the original table x is an integer. Now the predictor doesn't work because of this problem. What can I do?

Thank you for your help!


I also wanted to try this. But from the linear regression node I only have this grey port. The double-to-int node has normal ports. So I can't connect them. Or is there another way to connect them?


You could use the Double to Int node to convert the output of your linear regression. Alternatively (if you want to avoid rounding) you could also convert the int values of your original table to doubles by using a java snippet node.



I think I know what you mean now. I attached a small workflow that demonstrates how to change the initial table containing integers to doubles (the sample data do not make much sense though). Then the predictor node should work.



Thank you for your help. I had to insert "number to string" and then "String to number" (because the node didn't recognise the other columns - don't ask me why). My solution is now a little inconvenient but it works (it's just for demonstration purposes)!

Thanks a lot!

This is useful. How do I import the .zip file into Knime/ Thanks.

Use "Import Knime Workflow", choose "Select archive file", browse to the zip file, select a destination folder (usually "Local") and Voilá!