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

"Problem with using advanced_file_connectors:read_sparse in Java Application"

darekg11darekg11 Member Posts: 2 Learner III
edited June 2019 in Help
Hi, I am using RapidMiner 6.5 with 1 year Academia license.

In my process I'm using Read Sparse Operator, here is my Process after exporting to XML:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="6.5.002">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="6.5.002" expanded="true" name="Process">
   <parameter key="logverbosity" value="init"/>
   <parameter key="random_seed" value="2001"/>
   <parameter key="send_mail" value="never"/>
   <parameter key="notification_email" value=""/>
   <parameter key="process_duration_for_mail" value="30"/>
   <parameter key="encoding" value="SYSTEM"/>
   <parameter key="parallelize_main_process" value="false"/>
   <process expanded="true">
     <operator activated="true" class="advanced_file_connectors:read_sparse" compatibility="6.5.002" expanded="true" height="60" name="Read Sparse" width="90" x="45" y="210">
       <parameter key="format" value="no_label"/>
       <parameter key="data_file" value="C:\Users\Kąputereg\Desktop\PROJEKT - RAPIDMINER\counted_2000_no_label.txt"/>
       <parameter key="dimension" value="18635"/>
       <parameter key="sample_size" value="-1"/>
       <parameter key="use_quotes" value="true"/>
       <parameter key="quotes_character" value="&quot;"/>
       <parameter key="datamanagement" value="double_sparse_array"/>
       <parameter key="decimal_point_character" value="."/>
       <list key="prefix_map"/>
       <parameter key="encoding" value="SYSTEM"/>
     </operator>
     <operator activated="true" class="retrieve" compatibility="6.5.002" expanded="true" height="60" name="Retrieve 200k_SVM_Linear_C_0" width="90" x="45" y="75">
       <parameter key="repository_entry" value="//Local Repository/data/Models/200k_SVM_Linear_C_0"/>
     </operator>
     <operator activated="true" class="apply_model" compatibility="6.5.002" expanded="true" height="76" name="Apply Model" width="90" x="246" y="120">
       <list key="application_parameters"/>
       <parameter key="create_view" value="false"/>
     </operator>
     <connect from_op="Read Sparse" from_port="output" to_op="Apply Model" to_port="unlabelled data"/>
     <connect from_op="Retrieve 200k_SVM_Linear_C_0" from_port="output" to_op="Apply Model" to_port="model"/>
     <connect from_op="Apply Model" from_port="labelled data" to_port="result 1"/>
     <portSpacing port="source_input 1" spacing="0"/>
     <portSpacing port="sink_result 1" spacing="0"/>
     <portSpacing port="sink_result 2" spacing="0"/>
   </process>
 </operator>
</process>
Now when I want to load it to my java application I get following error:
INFO: <em class="error">The operator class 'advanced_file_connectors:read_sparse' is unknown. Possibly you must install a plugin for operators of group 'advanced_file_connectors'.</em>
And my code:
public RapidMinerClassification(String pathToProcess) throws IOException, XMLException
{
System.setProperty("rapidminer.home", "C:\\Users\\Kąputereg\\.RapidMiner");
RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE);
   RapidMiner.init();
   _rapidMinerProcess = new Process(new File(pathToProcess));
_readSparseOperator = _rapidMinerProcess.getOperator("Read Sparse");
}

public List<ClassificationResult> PredictSentimentalValue(String pathToCountedSparseFile) throws OperatorException
{
_readSparseOperator.setParameter(SparseFormatExampleSource.PARAMETER_DATA_FILE, pathToCountedSparseFile);
_rapidMinerProcess.run();
return null;
}
I think it may be related to fact that Read Sparse comes from Academia Lincese but I set right path to my RapidMiner home directory as indicated by:
INFO: rapidminer.home is 'C:\Users\Kąputereg\.RapidMiner'.
Dec 25, 2015 5:56:08 PM com.rapidminer.core.license.ProductConstraintManager initialize
INFO: Initializing license manager.
Dec 25, 2015 5:56:08 PM com.rapidminer.core.license.ProductConstraintManager initialize
INFO: Using default license location.
Dec 25, 2015 5:56:08 PM com.rapidminer.core.license.ProductConstraintManager initialize
INFO: License folder in RapidMiner Studio installation folder found. Also loading licenses from there.
Any help would be appreciated.


EDIT: Fixed, for any future people with similar problem:

In Your RapidMiner Home directory create additional directory: lib\\plugins and copy all neccessery files there.
Tagged:
Sign In or Register to comment.