how to range for column

I have temperature column contains values from 0 to 100 but now i want to put this values in range like that
20-30 and so on.

E.g: if temperature is 45.26 then its must belonging to range 30-40.

Hi vaibho.

The best and most purpose-built node for this task is the numeric binner node. It’s perfect for what you describe above. If you have any trouble configuring this node, just post again with your issue.


Thanks Its Working !!

hello sir/mam,
I created bin as you mentioned above and build decision tree model .
now i am testing this model on new data ,new data consist of temperature column E.g say temp value =54.15 in testing data there is no bin column due to that it throws following error

ERROR JPMML Classifier 0:22 Execute failed: The column S_Temperature_binned does not exist in the table

if i add this column in testing data ( S_Temperature_binned) it work fine

But my problem is that newly sensed data is not in bin format ,every time I have to provide bin class any other alternative solution for that .

Hi vaibho,

I think you’ll definitely need to post an image of the workflow (or attach the workflow itself) to provide some concrete context.

You will definitely have to provide all features from your training data also in your new data you want to score. That includes every manipulation, renaming, binning etc. - that is what makes the deployment of models sometimes challenging.

Some nodes like the H2O nodes would integrate some data preparations like binning into their model ‘containers’ (eg. MOJO Format). Otherwise you will have to store every manipulation and do it again for new data.

There to help is the Modular PMML system, where you can ‘store’ all your transformations (within limitations) and also your model into one (or two) PMML files and later use them to apply changes, in theory even on a server supporting PMML. Be aware that although being a ‘standard’ you might encounter various challenges using PMML. Only other solution would be just to use KNIME itself (or the commercial KNIME server) to do the transformations, or you might do that with SQL in a database or with the big data connectors (or the Spark nodes) on a big data cluster.

1 Like