The ExampleSet has no examples

castecaste Member Posts: 9 Contributor II
edited November 2018 in Help
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="/*&#10;&#09;Interrogazione Database&#10;*/&#10;&#10;&#10;&#10;SELECT indice, CONCAT(empty1, &#39; &#39;, indirizzo, &#39; &#39;, empty2) AS text_source, class AS label&#10;FROM `outrec2` &#10;WHERE indirizzo IS NOT NULL AND NOT (indirizzo=&#39;&#39;)&#10;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

Answers

  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751 RM Founder
    Hello,

    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
  • castecaste Member Posts: 9 Contributor II
    I tried to insert 20 texts, but it still doesn't work. So I've activated the rapidminer.general.debugmode in my preferences and the error that I get is:

    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.
  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751 RM Founder
    Hi,

    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
  • castecaste Member Posts: 9 Contributor II
    The data after the DatabaseExampleSource:
        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
  • castecaste Member Posts: 9 Contributor II
    I've updated to version 4.2 and everything works fine. Thank you Ingo and sorry for disturb!
Sign In or Register to comment.