The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Hello, I'm just new here and I think I might know the answer to your question:
If you check the API, there are many methods provided that can be used to set the parameters:
setParameters(Parameters parameters);
setParameter(String key, String value);
setListParameter(String key, List<String[]> list);
setPairParameter(String key, String firstValue, String secondValue);
To understand these methods, you should have an overall understanding on both the parameters in an operator, and the various types of parameter. This means you might need to check the API or the source code under the package: com.rapidminer.parameter, where you can find all the parameter types used in RM core, ( and btw you can build your own by extending the classes ParameterType and CombinedParameterType).
Moreover, you should know what parameters are used in the operator NominalToBinominal and what their types are.
You can find the parameters on the GUI, but a better suggestion is to check the method
public List<ParameterType> getParameterTypes();
in this class, as well as in all of its super classes and other components (such as AttributeSubsetSlector and RandomGenerator).
Here is a small example on AttributeSubsetSelector:
import com.rapidminer.RapidMiner;import com.rapidminer.operator.OperatorCreationException;import com.rapidminer.operator.preprocessing.filter.NominalToBinominal;import com.rapidminer.operator.tools.AttributeSubsetSelector;import com.rapidminer.parameter.UndefinedParameterError;import com.rapidminer.tools.OperatorService;public class Test { public static void main(String[] args) throws OperatorCreationException, UndefinedParameterError{ RapidMiner.init(); NominalToBinominal opt = OperatorService.createOperator(NominalToBinominal.class); // here we set the parameter using the method setParameter(String key, String value); // ""+int is just a quick way to convert single int into a string opt.setParameter(AttributeSubsetSelector.PARAMETER_FILTER_TYPE, ""+(AttributeSubsetSelector.CONDITION_ALL)); // now lets test whether the value is set String s = opt.getParameterAsString(AttributeSubsetSelector.PARAMETER_FILTER_TYPE); System.out.println(s); // change the value opt.setParameter(AttributeSubsetSelector.PARAMETER_FILTER_TYPE, ""+(AttributeSubsetSelector.CONDITION_NO_MISSING_VALUES)); // check if the out put is changed String s1 = opt.getParameterAsString(AttributeSubsetSelector.PARAMETER_FILTER_TYPE); System.out.println(s1); // actually you can also get the parameter as an integer or other applicable data type int i = opt.getParameterAsInt(AttributeSubsetSelector.PARAMETER_FILTER_TYPE); System.out.println(i); }}
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…