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 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…
Join us for a community conversation to explore how different modeling approaches in Simcenter PSIM can help engineers simulate power electronics systems while balancing accuracy, simulation speed, and design insight. What you'll learn: Power transistor modeling : Thermal and high fidelity models Protection component…