The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
public class NaiveClassifier { public static void main (String args[]) { try { RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE); RapidMiner.init(); Process process = new Process(new File("C:\\Users\\nelze\\.RapidMiner5\\repositories\\WalkingRepo\\NaiveClassify.rmp")); Operator op = process.getOperator("Read CSV"); op.setParameter(CSVExampleSource.PARAMETER_FILENAME, "C:\\Users\\nelze\\unlabeled.csv"); RepositoryLocation loc = new RepositoryLocation("C:\\Users\\nelze\\unlabeled.csv"); IOObjectEntry entry = (IOObjectEntry) loc.locateEntry(); IOObject myIOObject = entry.retrieveData(null); IOContainer ioInput = new IOContainer(new IOObject[] {myIOObject}); IOContainer ioResult = process.run(ioInput); ExampleSet resultSet1 = (ExampleSet)ioResult.getElementAt(0); System.out.println(resultSet1); } catch (IOException | XMLException | OperatorException ex) { ex.printStackTrace(); } catch (RepositoryException e) { // TODO Auto-generated catch block e.printStackTrace(); } }}
RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE); RapidMiner.init(); Process process = new Process(new File("C:\\Users\\nelze\\.RapidMiner5\\repositories\\WalkingRepo\\NaiveClassify.rmp")); Operator op = process.getOperator("Read CSV"); op.setParameter(CSVExampleSource.PARAMETER_FILENAME, "C:\\Users\\nelze\\unlabeled.csv"); IOContainer ioResult = process.run(); ExampleSet resultSet1 = (ExampleSet)ioResult.getElementAt(0); System.out.println(resultSet1);
ExampleSet exampleSet = null;Iterator<Attribute> allAttributes = exampleSet.getAttributes().allAttributes();while (allAttributes.hasNext()) { Attribute att = allAttributes.next(); for (Example example : exampleSet) { if (att.isNominal()) { System.out.println(example.getNominalValue(att)); } else if (att.isDateTime()) { System.out.println(example.getDateValue(att)); } else { System.out.println(example.getValue(att)); } }}
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…