🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

User defined Similarity?

User: "fjcuberos"
New Altair Community Member
Updated by Jocelyn
I´ve seen  the revamped distance-similarity schema in RM 4.3.
Is there any way  to use a user defined similarity? 
The only I imagine  is to extend DistanceMeasures

  public static final String PARAMETER_USER_CLASS= "user_class";
  ... 
    public static final String[] MEASURE_TYPES = new String[] {
        "MixedMeasures",
        "NominalMeasures",
        "NumericalMeasures",
        "BregmanDivergences",
        "UserDefinedDistance"
    };
....
    type = new ParameterTypeString(PARAMETER_USER_CLASS,"Class reference","put.your.class.here");
        type.registerDependencyCondition(new EqualTypeCondition(operator, PARAMETER_MEASURE_TYPES, true, 4));
        list.add(type);
...
And some logic to instantiate the class.

But I label this way unelegant  (require change core code) and I can´t see a way a plugin can expand the list of selectable distances-similarities. Any idea? A suggestion for RM5.0?

Thanks for your attention and great work.

F.J. Cuberos

Find more posts tagged with