Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
"Error: NumberFormatException Caught"
Hi,
I run the below code,
[quote]Process Failed:
NumberFormatException caught: For input string: "4.0"[/quote]
Why is this error? The data read is an integer. But still the error comes.... Any ideas?
Thanks, Shubha
I run the below code,
<operator name="Root" class="Process" expanded="yes">And get the error,
<operator name="ExampleSetGenerator (3)" class="ExampleSetGenerator">
<parameter key="target_function" value="spiral cluster"/>
<parameter key="number_of_attributes" value="2"/>
</operator>
<operator name="ExampleSetGenerator" class="ExampleSetGenerator">
<parameter key="target_function" value="random"/>
<parameter key="number_examples" value="1"/>
<parameter key="number_of_attributes" value="1"/>
</operator>
<operator name="Real2Integer" class="Real2Integer">
<parameter key="round" value="true"/>
</operator>
<operator name="AttributeConstruction" class="AttributeConstruction">
<list key="function_descriptions">
<parameter key="store" value="abs(att1)"/>
</list>
</operator>
<operator name="DataMacroDefinition" class="DataMacroDefinition">
<parameter key="macro" value="k_val"/>
<parameter key="macro_type" value="data_value"/>
<parameter key="attribute_name" value="store"/>
<parameter key="example_index" value="1"/>
</operator>
<operator name="IOSelector" class="IOSelector">
<parameter key="io_object" value="ExampleSet"/>
<parameter key="select_which" value="2"/>
</operator>
<operator name="LOFOutlierDetection (2)" class="LOFOutlierDetection">
<parameter key="minimal_points_lower_bound" value="%{k_val}"/>
<parameter key="minimal_points_upper_bound" value="%{k_val}"/>
</operator>
</operator>
[quote]Process Failed:
NumberFormatException caught: For input string: "4.0"[/quote]
Why is this error? The data read is an integer. But still the error comes.... Any ideas?
Thanks, Shubha
Tagged:
0
Answers
I got rid of the error by introducing a "MacroConstruction" operator between "DataMacroDefinition" and "IOSelector".
<operator name="MacroConstruction" class="MacroConstruction" breakpoints="before">
<list key="function_descriptions">
<parameter key="v" value="abs(%{k_val})"/>
</list>
</operator>
But, does DataMarcoDefinition takes the values given to it as strings?
Thanks