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 naive bayes
Hi,
I am trying to use a Naive Bayes model to train my sentiment analysis, but when I try to apply the model to my scoring set I get the following error:
"The learned model "Simple Distribution" does not support the parameter "create_view". Some models support parameters for the predictions of values. This model does not support the given parameter".
I would love it if someone can help me with this. Thanks!
0
Answers
Does your test set have the same characteristics (number of attributes and attribute types) as your training set?
Thanks for the response. It does. My training set has 2 columns, one for the text I´m analyzing and one for the sentiment. The test set is a different data set that has the same columns, one for the text and one for the sentiment. The sentiments for my test set are fake, tho. What I really want to do is to predict the sentiment of my test set based on the trained model and keep the predicted labels.
It is a bit difficult to figure out why you get the error, without seeing your process. Is the error already occuring during training of the model or only when you try to apply the trained model to the test data? If it is the latter, it would indicate that you are feeding your model data that is somehow different than the training data.
Indeed, it happens in the Apply Model operator. The cross validation occurs with no issues, it seems.
Here are two captures of the first few rows of the data sets. I can´t tell if there is any difference between them.
Thanks for your help, I appreciate it.
It seams you skipped some necessary "text processing" on the input data?
What do you mean by necessary? I mean I do have a Process Document Operator that tokenizes, stems, eliminate stopwords, and filters hashtags for both datasets in my process.
Thanks for replying!!
It sounds like you didn't use the trained Wordlist as a preprocessing input to your scoring set.
This is an example, just swap out the CV for your Naive Bayes with CV and set your Sentiment as your label
Hi, Thomas,
Thanks for the response. I am having a hard time following the code you attached to your post. Is there a chance you can add an image or something like that. Let me see if I can follow your suggestion, you´re saying that I should have a Naive Bayes operator before the Cross Validation operator, and then doing the cross validation with my test set?
I appreciate the help. As you can tell I am no expert in this subject.
Thnks, again!
Just clip and paste in my XML code into the XML view. To activiate that view just go to your Studio > View > Show Panel and select XML.
Click the green check mark and everything populates up.
This article here explains in more detail how to use the XML code posted before and turn this into the graphical process you are used to: http://community.rapidminer.com/t5/RapidMiner-Studio-Knowledge-Base/How-can-I-share-processes-without-RapidMiner-Server/ta-p/37047
Hope this helps,
Ingo