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
How to get the attributes from a DistributionModel.
Fireholder
Member Posts: 26 Contributor II
I have an output which is IOObject and which is is DistributionModel at the same time. So now I want to get the attributes and values from that model. The project I'm working in is much wider and actually I want to get the output and retrieve the data from that output no matter whether it's distribution model,exampleset,etc. I'm already familiar with Examplesets and now going to work with distribution models.Any ideas?This is my code:
best regards, Fire
RapidMiner.setExecutionMode(ExecutionMode.COMMAND_LINE);Thanks in advance.
RapidMiner.init();
Test obj=new Test() ;
//obj.go();
// MUST BE INVOKED BEFORE ANYTHING ELSE !!!
Process process=new Process(readFileAsString(x));
//process.getRootOperator().getOperator(1).setParameter(key, value);
IOContainer ioResult = process.run();
DistributionModel resultSet=null;
if (ioResult.getElementAt(0) instanceof DistributionModel) {
System.out.println ("***************************");
resultSet = (DistributionModel)ioResult.getElementAt(0);
}
best regards, Fire
Tagged:
0
Answers
I'm not sure what you want, however in RapidMiner a model is NOT a data storage like an ExampleSet.
In your case, the only things you can get of of the DistributionModel is the distribution via model.getDistributin(classIndex, attributeIndex); and the class indicies and attribute names (see the respective getters).
Regards,
Marco
rgrds,Fire