The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Missing Operator Parameters

rm_user2012rm_user2012 Member Posts: 4 Contributor I
edited November 2018 in Help
Hi,

I am facing a problem with declaring the parameters in the operators. I tried adding the parameters as per instructed by the guide but when I select the operator in Rapidminer,
only 4 out of the 6 parameters declared appears. The first two parameters has been ignored and not reflected in Rapidminer GUI. However, when I change the order when adding the parameters,
the boolean parameters appear but still only a max of 4 out 6 parameters are displayed.
Can anyone help me with this problem?
Thanks!

The codes to declare and add the parameters are shown below:

@Override
public List<ParameterType> getParameterTypes() {
List<ParameterType> types = super.getParameterTypes();

ParameterType type0 = new ParameterTypeBoolean(PARAMETER_AMPLIFY_POSITIVE, amplify_desc, true,false);

ParameterType type1= new ParameterTypeBoolean(PARAMETER_REDUCE_NEGATIVE, reduceNeg_desc, true,false);

ParameterType type2 = new ParameterTypeChar(PARAMETER_POSITIVE_LABEL, posLbl_desc,'P',false);

ParameterType type3 = new ParameterTypeDouble(PARAMETER_POSITIVE_GAUSSIAN_REMOVE_THRESHOLD, posGausRemovThres_desc, 0,1,0.95,false);

ParameterType type4 = new ParameterTypeDouble(PARAMETER_NEGATIVE_GAUSSIAN_REMOVE_THRESHOLD, negGausRemovThres, 0, 1, 0.95,false);

ParameterType type5 = new ParameterTypeDouble(PARAMETER_MTD_MEMBERSHIP_REMOVE_THRESHOLD, mtdAmpThres_desc,0, 1, 0.9,false);

types.add(type0);
types.add(type1);
types.add(type2);
types.add(type3);
types.add(type4);
types.add(type5);

return types;
}
Tagged:

Answers

  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    Did you accidentally set the same values for the PARAMTER_XXX constants?
  • rm_user2012rm_user2012 Member Posts: 4 Contributor I
    Hi Marius,

    Thanks for the reply!

    The values for all the parameter constants are different , as shown in the codes below:

    // Constants
    // public
    public static final String PARAMETER_POSITIVE_LABEL = "Input positive class label";
    public static final String PARAMETER_POSITIVE_GAUSSIAN_REMOVE_THRESHOLD = "Input gaussian remove threshold for positive class";
    public static final String PARAMETER_NEGATIVE_GAUSSIAN_REMOVE_THRESHOLD = "Input gaussian remove threshold for negative class";
    public static final String PARAMETER_MTD_MEMBERSHIP_REMOVE_THRESHOLD = "Input threshold to keep newly synthetic generated data for the positive class";
    public static final String PARAMETER_AMPLIFY_POSITIVE = "Input gaussian remove threshold for positive class";
    public static final String PARAMETER_REDUCE_NEGATIVE = "Input gaussian remove threshold for negative class";


    // Parameters description
    public static final String posLbl_desc = "The positive class will be amplified, while the remaining class will be reduced";
    public static final String posGausRemovThres_desc = "Outlier points in the positive class that is outside the threshold will be removed";
    public static final String negGausRemovThres = "Outlier points in teh negative class that is outside the threshold will be removed";
    public static final String mtdAmpThres_desc = "Newly generated points with threshold will be added into the amplified dataset";
    public static final String amplify_desc = "Check to amplify the positive data set with MTD";
    public static final String reduceNeg_desc = "Check to reduce the negative data set using SVM";
    I still can't figure out what's wrong with it...
  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    Well, that's odd. Just to exclude the basic cases:
    Did you recompile and reinstall your extension after making the changes to the parameters?
    Did you specify any parameter dependencies?
    Do you inherit from another operator class, from where naming conflicts could arise?

    Btw, one remark on the parameter names: by convention they should be all lower-case and contain underscores instead of spaces. But that does not influence the functionality.
Sign In or Register to comment.