Optimizing Set Macro on 7.5
JEdward
RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:578Unicorn
Is anyone else finding problems optimizing Set Macro in version 7.5 of RapidMiner?
试图优化一个python模型&发现那t the value parametrer of Set Macro doesn't appear in Optimize Evolutionary.
<操作符= " true " class = " python_scripting激活:execute_python" compatibility="7.4.000" expanded="true" height="82" name="BDT (sklearn)" width="90" x="112" y="34">
<操作符= " true " class = " python_scripting激活:execute_python" compatibility="7.4.000" expanded="true" height="103" name="Apply Model (2)" width="90" x="112" y="34">
<参数键=“脚本”值= "熊猫作为pd导入 # rm_main is a mandatory function, # the number of arguments has to be the number of input ports (can be none) def rm_main(rfinfo, data): rf = rfinfo[0] regular = rfinfo[1] label = rfinfo[2] meta = data.rm_metadata predictions = rf.predict(data[regular]) confidences = rf.predict_proba(data[regular]) predictions = pd.DataFrame(predictions, columns=["prediction("+label+")"]) confidences = pd.DataFrame(confidences, columns=["confidence(" + str(c) + ")" for c in rf.classes_]) data = data.join(predictions) data = data.join(confidences) data.rm_metadata = meta data.rm_metadata["prediction("+label+")"] = ("nominal","prediction") for c in rf.classes_: data.rm_metadata["confidence("+str(c)+")"] = ("numerical","confidence_"+str(c)) return data, rf"/>Python
0
Answers
I think this isn't a bug because the Evolutionary optimzer uses the genetic parameters to 'randomly' assign values, so you can't take a Grid approach this. Did you try this in a regular Grid optmizer?
If not a bug then it's a missing feature. I've managed to create a workaround which works, but is clearly not the most efficient. Let's move this thread into feature requests.
Edit: realise my process didn't display properly.
As you can see, the workaround uses RM modelling operators to represent the values that I want to change in the Python code. So the feature I'd like is an operator which Optimize Parameters Evolutionary can access allowing values to be set and used by macros.