Prediction Range
laurab
New Altair Community Member
Hi,
I am using the weka MLP and would like to stop negative predictions occuring. Is there any way of limiting the prediction range or something so the the lowest prediction value is 0? I am already removing null values from my training set. The training set lower range for value is 0.
Thanks Laura
I am using the weka MLP and would like to stop negative predictions occuring. Is there any way of limiting the prediction range or something so the the lowest prediction value is 0? I am already removing null values from my training set. The training set lower range for value is 0.
Thanks Laura
Tagged:
0
Answers
-
Hi Laura,
this will not be possible. But you could do a postprocessing step instead and setting all values smaller 0 to 0. Thats a possible solution for doing that:<operator name="Root" class="Process" expanded="yes">
Hope that will help you.
<operator name="ExampleSetGenerator" class="ExampleSetGenerator">
<parameter key="attributes_lower_bound" value="-1.0"/>
<parameter key="attributes_upper_bound" value="1.0"/>
<parameter key="number_of_attributes" value="3"/>
<parameter key="target_function" value="complicated function"/>
</operator>
<operator name="LinearRegression" class="LinearRegression">
<parameter key="keep_example_set" value="true"/>
</operator>
<operator name="ModelApplier" class="ModelApplier">
</operator>
<operator name="ChangeAttributeName" class="ChangeAttributeName">
<parameter key="new_name" value="prediction"/>
<parameter key="old_name" value="prediction(label)"/>
</operator>
<operator name="AttributeConstruction" class="AttributeConstruction">
<list key="function_descriptions">
<parameter key="prediction_nonNegative" value="if (prediction < 0, 0, prediction)"/>
</list>
</operator>
</operator>
Greetings,
Sebastian0 -
Hi Sebastian,
Thanks alot for your reply, its really helpful. I also have a another problem but it is not related to this issue so I will start a new thread.
Cheers Laura0