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
NominalTo Numeric
Hi,
I'm trying to do in Java the same that I do in the interface.
But...I don't know how to create and apply the NominalToNumeric preprocessing.
I've a exampleSet and I want to convert it in another exampleSet modified.
Can anyone help me?
Thanks in advance,
Jorge
I'm trying to do in Java the same that I do in the interface.
But...I don't know how to create and apply the NominalToNumeric preprocessing.
I've a exampleSet and I want to convert it in another exampleSet modified.
Can anyone help me?
Thanks in advance,
Jorge
0
Answers
- use the static method Operator operator = OperatorService.createOperator(..)
- set the parameters using operator.setParameter(..)
- create an IOContainer with the exampleSet
- use the apply method to apply the operator onto the IOContainer
Greetings,Sebastian
but the problem is that...
When I execute this line of my code...
Operator n2n = OperatorService.createOperator(NominalToNumeric.class);
The result is that...
Exception in thread "main" java.lang.NullPointerException
at com.rapidminer.operator.OperatorCreationException.createMessage(OperatorCreationException.java:69)
at com.rapidminer.operator.OperatorCreationException.<init>(OperatorCreationException.java:53)
at com.rapidminer.tools.OperatorService.createOperator(OperatorService.java:567)
at ProcessCreator.main(ProcessCreator.java:45)
Where's the problem?
Greetings,
Jorge
did you call RapidMiner.init(..) before?
Greetings,
Sebastian
All works ok except that step
That's my code: Greetings,
Jorge
could you please post the log message of the rapid miner initialization?
Greetings,
Sebastian
Here you have it... Greetings,
Jorge
thank you for this detailed informations. It now was easy to track down the bug occuring only while trying to construct renamed operators. Because of the renaming there is more than one descriptions available. We will remove the bug, but this will last more than a minute.
So I will give you a hint, how to prevent this.
In the ressources directory is a file named operators.xml. Delete the following token: After saving and probably performing Ant target "Copy-Ressources" your problem should be solved, since the second description isn't present any more.
Greetings,
Sebastian
I deleted that token and the error persists...
I tried to redefine the path of the operators.xml and I configured another time the project in eclipse, but the problem doesn't want to go out xD
Another idea?
Thanks for your time,
Jorge
probably you deleted it in the wrong version. This is always a little bit confusing: There is one version in <eclipseProjectDir>/ressources and one in <eclipseProjectDir>/<buildDir>/ressources. You have to edit the first one and then perform the Ant Target "Copy-Ressources"
Another way around would be to create the Operator using its name, not its class name.
Greetings,
Sebastian
The problem was in the "Copy-Resources" target
It works perfectly now ;D
Greetings,
Jorge