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
The ExampleSet has no examples
Hi,
I get a similar error in my process. Inside the XVal (Cross Validation), till the Naive Bayes learner everything works great, but in the second operator (the OperatorChain) i can't get my ExampleSet and the ModelApplier obviously returns an empty result, which gives me an error in the ClassificationPerformance operator.
The error returned is "The ExampleSet has no examples".
Here a screenshot of a breakpoint after the ModelApplier: http://i35.tinypic.com/wgt3bk.png
Here a screenshot of the Cross Validator operator: http://i33.tinypic.com/2jcvhww.png
Here a screenshot of the NaiveBayes learner: http://i37.tinypic.com/5b4o4j.png
Here is che XML (note, I've updated the Text-Plugin up to the 4.1 version, with the correction of the DatabaseExampleSource bug)
<operator name="Root" class="Process" expanded="yes">
<operator name="Database Source" class="DatabaseExampleSource">
<parameter key="database_url" value="jdbc:mysql://localhost:3306/tesi"/>
<parameter key="id_attribute" value="indice"/>
<parameter key="label_attribute" value="label"/>
<parameter key="password" value="OB3A2Q0OV20="/>
<parameter key="query" value="/* 	Interrogazione Database */ SELECT indice, CONCAT(empty1, ' ', indirizzo, ' ', empty2) AS text_source, class AS label FROM `outrec2` WHERE indirizzo IS NOT NULL AND NOT (indirizzo='') LIMIT 0 , 3"/>
<parameter key="username" value="root"/>
</operator>
<operator name="StringTextInput" class="StringTextInput" expanded="no">
<parameter key="filter_nominal_attributes" value="true"/>
<list key="namespaces">
</list>
<operator name="StringTokenizer" class="StringTokenizer">
</operator>
<operator name="StopwordFilterFile" class="StopwordFilterFile">
<parameter key="file" value="D:\Tesi\stopwords.txt"/>
</operator>
<operator name="TokenLengthFilter" class="TokenLengthFilter" activated="no">
<parameter key="min_chars" value="3"/>
</operator>
<operator name="PorterStemmer" class="PorterStemmer" activated="no">
</operator>
</operator>
<operator name="XValidation" class="XValidation" expanded="yes">
<parameter key="sampling_type" value="shuffled sampling"/>
<operator name="NaiveBayes" class="NaiveBayes">
<parameter key="keep_example_set" value="true"/>
<parameter key="use_kernel" value="true"/>
</operator>
<operator name="Analyzer" class="OperatorChain" expanded="yes">
<operator name="ModelApplier" class="ModelApplier">
<list key="application_parameters">
</list>
</operator>
<operator name="ClassificationPerformance" class="ClassificationPerformance">
<list key="class_weights">
</list>
<parameter key="classification_error" value="true"/>
<parameter key="main_criterion" value="classification_error"/>
</operator>
</operator>
</operator>
</operator>
Thank you
I get a similar error in my process. Inside the XVal (Cross Validation), till the Naive Bayes learner everything works great, but in the second operator (the OperatorChain) i can't get my ExampleSet and the ModelApplier obviously returns an empty result, which gives me an error in the ClassificationPerformance operator.
The error returned is "The ExampleSet has no examples".
Here a screenshot of a breakpoint after the ModelApplier: http://i35.tinypic.com/wgt3bk.png
Here a screenshot of the Cross Validator operator: http://i33.tinypic.com/2jcvhww.png
Here a screenshot of the NaiveBayes learner: http://i37.tinypic.com/5b4o4j.png
Here is che XML (note, I've updated the Text-Plugin up to the 4.1 version, with the correction of the DatabaseExampleSource bug)
<operator name="Root" class="Process" expanded="yes">
<operator name="Database Source" class="DatabaseExampleSource">
<parameter key="database_url" value="jdbc:mysql://localhost:3306/tesi"/>
<parameter key="id_attribute" value="indice"/>
<parameter key="label_attribute" value="label"/>
<parameter key="password" value="OB3A2Q0OV20="/>
<parameter key="query" value="/* 	Interrogazione Database */ SELECT indice, CONCAT(empty1, ' ', indirizzo, ' ', empty2) AS text_source, class AS label FROM `outrec2` WHERE indirizzo IS NOT NULL AND NOT (indirizzo='') LIMIT 0 , 3"/>
<parameter key="username" value="root"/>
</operator>
<operator name="StringTextInput" class="StringTextInput" expanded="no">
<parameter key="filter_nominal_attributes" value="true"/>
<list key="namespaces">
</list>
<operator name="StringTokenizer" class="StringTokenizer">
</operator>
<operator name="StopwordFilterFile" class="StopwordFilterFile">
<parameter key="file" value="D:\Tesi\stopwords.txt"/>
</operator>
<operator name="TokenLengthFilter" class="TokenLengthFilter" activated="no">
<parameter key="min_chars" value="3"/>
</operator>
<operator name="PorterStemmer" class="PorterStemmer" activated="no">
</operator>
</operator>
<operator name="XValidation" class="XValidation" expanded="yes">
<parameter key="sampling_type" value="shuffled sampling"/>
<operator name="NaiveBayes" class="NaiveBayes">
<parameter key="keep_example_set" value="true"/>
<parameter key="use_kernel" value="true"/>
</operator>
<operator name="Analyzer" class="OperatorChain" expanded="yes">
<operator name="ModelApplier" class="ModelApplier">
<list key="application_parameters">
</list>
</operator>
<operator name="ClassificationPerformance" class="ClassificationPerformance">
<list key="class_weights">
</list>
<parameter key="classification_error" value="true"/>
<parameter key="main_criterion" value="classification_error"/>
</operator>
</operator>
</operator>
</operator>
Thank you
0
Answers
just a guess: could it be that you have less then 10 texts? Just set the cross validation into "leave-one-out" mode and check again. The leave-one-out mode should also work if you have only few examples.
Cheers,
Ingo
ArrayIndexOutOfBoundsException
Process failed
Message: 17
And the window allows me to send a bug report.
If i set the cross validation into "leave-one-out" mode I get the same problem, but the Message changes in "Message: 18".
A curious thing is that if I use another learner such as LibSVMLearner it seems to work.
could you please make a screenshot directly after the StringTextInput? So we could have a look at the structure of the data set (meta data and data view if they are not too sensible). Maybe this gives us an idea where to search for a problem.
Cheers,
Ingo
http://i35.tinypic.com/2qiwyfm.png
The data after the StringTextInput:
http://i33.tinypic.com/2ep2dci.png
The meta-data after the StringTextInput:
http://i34.tinypic.com/18hi4z.png
The MySQL database table screenshot:
http://i33.tinypic.com/2up6yxe.png