Can´t define new Discretizers in my plugin?
fjcuberos
New Altair Community Member
I´m revamping my old 4.1 plugin. I want to include some new discretizers but there is a problem.
All the constructors of DiscretizationModel are protected so the new discretizers must reside in com.rapidminer.operator.preprocessing.discretization package.
I can create that package in my plugin or use reflection, but I believe that both are bad workarounds.
Another problem:
If one distance depends on the discretization limits in a DiscretizationModel the only solution I see is reflection. Could exists a getRanges() method?
Again thanks to all the RM team.
F.J. Cuberos
All the constructors of DiscretizationModel are protected so the new discretizers must reside in com.rapidminer.operator.preprocessing.discretization package.
I can create that package in my plugin or use reflection, but I believe that both are bad workarounds.
Another problem:
If one distance depends on the discretization limits in a DiscretizationModel the only solution I see is reflection. Could exists a getRanges() method?
Again thanks to all the RM team.
F.J. Cuberos
0
Answers
-
Hi,
we have just added a method
to the discretization model and also made the constructors public. I have no idea why they were protected anyway.
public Map<String, SortedSet<Tupel<Double, String>>> getRanges() {
return this.rangesMap;
}
Beside that, we also added the input IOContainer as a parameter to the method creating distance measures as well as added a new init method for distance measures
public void init(ExampleSet exampleSet, ParameterHandler parameterHandler, IOContainer ioContainer) throws OperatorException { ... }
All those changes can be accesses from the current developer branch.
Cheers,
Ingo0 -
Ok, thanks. That fulfill all my needs.
Cheers
Francisco Javier Cuberos0