RapidMiner

Classification by regression with text in input

Learner III evelyne_tran_1
Learner III

Classification by regression with text in input

Hi, 

 

I have an excel sheat with 1 column et many lines with text. I am trying to cluster my data according to text similarity. 

 

I have already used the k-means clustering to do the exercise but I didn't get the results that I expected. I want then to try the operator "Classification by regression". Is it however possible to use this operator with text in input?

 

Thanks for you answer!

15 REPLIES
RM Staff
RM Staff

Re: Classification by regression with text in input

Hi @evelyne_tran_1,

 

Have you transform your text into word vectors? You can refer to this kb article to get started: http://community.rapidminer.com/t5/Text-Analytics-in-RapidMiner/Sentiment-Analysis-as-a-supervised-l...

RapidMiner offers text mining extensions and also you can use Rosette and Aylien for text analytics.

 

You will need to get these text analysis extensions from RapidMiner Marketplace first.

 

Learner III evelyne_tran_1
Learner III

Re: Classification by regression with text in input

Hi, 

 

Thank you for your answer.

 

Yes I transformed them into vectors as you can see in the document attached. Still, I have some issue to run my process. I have the error message « Input ExampleSet does not have a label attribute ».

 

Evelyne

RM Certified Expert
RM Certified Expert

Re: Classification by regression with text in input

You need to select a column from your data set that will be the label. Also, is the text you are loading from the Read Excel in the Text data format for RapidMiner?  Usually "text" data from an Excel comes in as a Polynominal data type and must be converted to Text. Usaually with a Nominal to Text operator. 

Learner III evelyne_tran_1
Learner III

Re: Classification by regression with text in input

@Thomas_Ott,

 

Thanks to the Configuration Wizard, I selected my column mentionning that my data are texts and the attribute is defined as label is the step 4. Plus, I used the operator "Set Role" to defined again that my column I want to cluster is considered as label. 

I tried to put the operator "Nominal to Text" but I still have the same error message...

 

Best regards,

 

Evelyne

RM Certified Expert
RM Certified Expert

Re: Classification by regression with text in input

If you set your label in the import, then you shouldn't need a Set Role again. You wouldn't need to do a Nominal to Text too if you set that data format in the import wizard. 

 

That said, what is your error? Can you share a snapshot of your data and the error message? hard for me to guess here. 

Learner III evelyne_tran_1
Learner III

Re: Classification by regression with text in input

@Thomas_Ott,

 

You will find attached to this message the sreenshot with the configuration wizard.

 

The error message says in the "Validation operator" : "Missing label, Input ExampleSet does not have a label attribute".

Highlighted
RM Certified Expert
RM Certified Expert

Re: Classification by regression with text in input

@evelyne_tran_1 If you post the XML of your process it is easier for community members to help you troubleshoot.

 

I am confused why you would be setting the text column as your label.  If that is the column of text you are going to analyze, then it would NOT typically be the label.  The label is what RapidMiner calls the variable you are trying to predict--for text mining it is usually some kind of sentiment output, or perhaps a numerical rating, or a topic flag, or similar.   You can't have the text be both your label and also be the data you are using to predict the label after processing.

 

But in any event, you may also be having a problem because you need to make sure that your Process Document operator is keeping the meta data (which includes special attributes) after processing.  See the check box in the parameter window that says "add meta information" which you would need to check.

process doc.PNG

 

Brian T., Lindon Ventures - www.lindonventures.com
Analytics Consulting by Certified RapidMiner Analysts
Learner III evelyne_tran_1
Learner III

Re: Classification by regression with text in input

@Telcontar120,

 

The XML is attached with this message. Actually, I only have one text column. I only want to cluster this column thanks to the operator "Classification by regression". What should be my label then?

 

Evelyne

RM Certified Expert
RM Certified Expert

Re: Classification by regression with text in input

You can't have the text column you want to process as your label. You need another column to be set as the label.