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
"R model error"
Why do I get this error? Thank you.
Nov 2, 2010 5:25:40 PM INFO: Saved process definition at '//Repository/57459910/57459910_experimentR 2'.
Nov 2, 2010 5:25:40 PM INFO: No filename given for result file, using stdout for logging results!
Nov 2, 2010 5:25:40 PM INFO: Loading initial data.
Nov 2, 2010 5:25:40 PM INFO: Process //Repository/57459910/57459910_experimentR 2 starts
Nov 2, 2010 5:25:40 PM WARNING: Using deprecated example set stream version 1
Nov 2, 2010 5:25:40 PM SEVERE: Naive Bayes: Warning in prep.data(TRUE, data, target, excluded, prep.ctrl) :
Empty levels were dropped from class col.: Iris-virginica
Nov 2, 2010 5:25:41 PM SEVERE: Process failed: An error occurred while executing R.
Nov 2, 2010 5:25:41 PM SEVERE: Here: Process[1] (Process)
subprocess 'Main Process'
+- Retrieve[1] (Retrieve)
+- Validation[1] (Sliding Window Validation)
subprocess 'Training'
| +- Decision Tree[0] (Decision Tree)
==> | +- Naive Bayes[1] (Naive Bayes)
subprocess 'Testing'
+- Apply Model[0] (Apply Model)
+- Performance[0] (Performance)
-------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.0">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.0.11" expanded="true" name="Process">
<process expanded="true" height="522" width="549">
<operator activated="true" class="retrieve" compatibility="5.0.11" expanded="true" height="60" name="Retrieve" width="90" x="155" y="205">
<parameter key="repository_entry" value="//Samples/data/Iris"/>
</operator>
<operator activated="true" class="series:sliding_window_validation" compatibility="5.0.2" expanded="true" height="112" name="Validation" width="90" x="429" y="216">
<parameter key="training_window_width" value="90"/>
<parameter key="test_window_width" value="1"/>
<parameter key="horizon" value="10"/>
<parameter key="average_performances_only" value="false"/>
<process expanded="true" height="522" width="346">
<operator activated="false" class="decision_tree" compatibility="5.0.11" expanded="true" height="76" name="Decision Tree" width="90" x="179" y="255">
<parameter key="criterion" value="gini_index"/>
</operator>
<operator activated="true" class="r:naive_bayes" compatibility="5.0.2" expanded="true" height="76" name="Naive Bayes" width="90" x="154" y="46"/>
<connect from_port="training" to_op="Naive Bayes" to_port="training set"/>
<connect from_op="Naive Bayes" from_port="model" to_port="model"/>
<portSpacing port="source_training" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
<portSpacing port="sink_through 1" spacing="0"/>
</process>
<process expanded="true" height="522" width="300">
<operator activated="true" class="apply_model" compatibility="5.0.11" expanded="true" height="76" name="Apply Model" width="90" x="45" y="30">
<list key="application_parameters"/>
</operator>
<operator activated="true" class="performance" compatibility="5.0.11" expanded="true" height="76" name="Performance" width="90" x="180" y="30"/>
<connect from_port="model" to_op="Apply Model" to_port="model"/>
<connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
<connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
<connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
<portSpacing port="source_model" spacing="0"/>
<portSpacing port="source_test set" spacing="0"/>
<portSpacing port="source_through 1" spacing="0"/>
<portSpacing port="sink_averagable 1" spacing="0"/>
<portSpacing port="sink_averagable 2" spacing="0"/>
</process>
</operator>
<connect from_op="Retrieve" from_port="output" to_op="Validation" to_port="training"/>
<connect from_op="Validation" from_port="averagable 1" 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>
Nov 2, 2010 5:25:40 PM INFO: Saved process definition at '//Repository/57459910/57459910_experimentR 2'.
Nov 2, 2010 5:25:40 PM INFO: No filename given for result file, using stdout for logging results!
Nov 2, 2010 5:25:40 PM INFO: Loading initial data.
Nov 2, 2010 5:25:40 PM INFO: Process //Repository/57459910/57459910_experimentR 2 starts
Nov 2, 2010 5:25:40 PM WARNING: Using deprecated example set stream version 1
Nov 2, 2010 5:25:40 PM SEVERE: Naive Bayes: Warning in prep.data(TRUE, data, target, excluded, prep.ctrl) :
Empty levels were dropped from class col.: Iris-virginica
Nov 2, 2010 5:25:41 PM SEVERE: Process failed: An error occurred while executing R.
Nov 2, 2010 5:25:41 PM SEVERE: Here: Process[1] (Process)
subprocess 'Main Process'
+- Retrieve[1] (Retrieve)
+- Validation[1] (Sliding Window Validation)
subprocess 'Training'
| +- Decision Tree[0] (Decision Tree)
==> | +- Naive Bayes[1] (Naive Bayes)
subprocess 'Testing'
+- Apply Model[0] (Apply Model)
+- Performance[0] (Performance)
-------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.0">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.0.11" expanded="true" name="Process">
<process expanded="true" height="522" width="549">
<operator activated="true" class="retrieve" compatibility="5.0.11" expanded="true" height="60" name="Retrieve" width="90" x="155" y="205">
<parameter key="repository_entry" value="//Samples/data/Iris"/>
</operator>
<operator activated="true" class="series:sliding_window_validation" compatibility="5.0.2" expanded="true" height="112" name="Validation" width="90" x="429" y="216">
<parameter key="training_window_width" value="90"/>
<parameter key="test_window_width" value="1"/>
<parameter key="horizon" value="10"/>
<parameter key="average_performances_only" value="false"/>
<process expanded="true" height="522" width="346">
<operator activated="false" class="decision_tree" compatibility="5.0.11" expanded="true" height="76" name="Decision Tree" width="90" x="179" y="255">
<parameter key="criterion" value="gini_index"/>
</operator>
<operator activated="true" class="r:naive_bayes" compatibility="5.0.2" expanded="true" height="76" name="Naive Bayes" width="90" x="154" y="46"/>
<connect from_port="training" to_op="Naive Bayes" to_port="training set"/>
<connect from_op="Naive Bayes" from_port="model" to_port="model"/>
<portSpacing port="source_training" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
<portSpacing port="sink_through 1" spacing="0"/>
</process>
<process expanded="true" height="522" width="300">
<operator activated="true" class="apply_model" compatibility="5.0.11" expanded="true" height="76" name="Apply Model" width="90" x="45" y="30">
<list key="application_parameters"/>
</operator>
<operator activated="true" class="performance" compatibility="5.0.11" expanded="true" height="76" name="Performance" width="90" x="180" y="30"/>
<connect from_port="model" to_op="Apply Model" to_port="model"/>
<connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
<connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
<connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
<portSpacing port="source_model" spacing="0"/>
<portSpacing port="source_test set" spacing="0"/>
<portSpacing port="source_through 1" spacing="0"/>
<portSpacing port="sink_averagable 1" spacing="0"/>
<portSpacing port="sink_averagable 2" spacing="0"/>
</process>
</operator>
<connect from_op="Retrieve" from_port="output" to_op="Validation" to_port="training"/>
<connect from_op="Validation" from_port="averagable 1" 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>
0
Answers
your actual problem does not derive from the R-NaiveBayes but instead from using the SlidingWindow Validation that is made for time series, while you don't have a time series.
Just exchange it by a normal cross-validation and everything should run fine.
Greetings,
Sebastian
All non-R classification operators work perfectly fine with Sliding Windows Validation and Iris data. Check Decision Tree for example. Problem here is only with R operators.
ok, then unfortunately you will have to a problem until we solve it in the extension. You can use the NaiveBayes operator instead, this should work...
Greetings,
Sebastian