One-class SVM for text classfication
I classify several examples (each example is a small text) using the one-class SVM. I got a problem that I cannot fix "Needs a nominal label with 2 or more values". I tried to set role for the label, to change the label to numerical, to use meta "Polynomial to binominal". Nothing worked. n the last case I got a messsage that there is no obvious mistake, but still the program does not give me any results. There were some posts here related to the topic, but there is still no correct answer. I would appreciate any help. Here is my original xml, It works for LibSVM in multi-class case:
< ?xml version = " 1.0 " encoding = " utf - 8 "独立= " no"?>
Best Answer
-
MartinLiebig 管理员、版主、员工,RapidMiner Certified Analyst, RapidMiner Certified Expert, University ProfessorPosts:3,404RM Data Scientist
Hi
i've checked it again. it is the other way around. you need to have a nominal coloum with only one class as label. See attached process.
~Martin
Spoiler< ?xml version = " 1.0 " encoding = " utf - 8 "独立= " no"?>
<运营商激活= " true " class = "process" compatibility="7.1.001" expanded="true" name="Process">
<运营商激活= " true " class = "retrieve" compatibility="7.1.001" expanded="true" height="68" name="Retrieve Golf" width="90" x="45" y="34">
<运营商激活= " true " class = "nominal_to_numerical" compatibility="7.1.001" expanded="true" height="103" name="Nominal to Numerical" width="90" x="179" y="34">
<运营商激活= " true " class = "select_attributes" compatibility="7.1.001" expanded="true" height="82" name="Select Attributes" width="90" x="313" y="34">
<运营商激活= " true " class = "generate_attributes" compatibility="7.1.001" expanded="true" height="82" name="Generate Attributes" width="90" x="447" y="34">
<运营商激活= " true " class = "set_role" compatibility="7.1.001" expanded="true" height="82" name="Set Role" width="90" x="581" y="34">
<运营商激活= " true " class = "support_vector_machine_libsvm" compatibility="7.1.001" expanded="true" height="82" name="SVM" width="90" x="782" y="34">- Sr. Director Data Solutions, Altair RapidMiner -
Dortmund, Germany0
Answers
hello@In777
Not sure if I this solves your issue, but typical problems when doing type conversion and your column is has a special role (e.g columns like labels , weights etc.) is folks do not check the "inclide special attributes" checkbox.
Can you confirm if that was not the case
Dear@In777,
thanks for reaching out. The LibSVM One class svm is sometimes a bit confusing. You acutually need to have a binary label to do it. The second class needs to have 0 examples.
~Martin
Dortmund, Germany
I do not think that the problem is with the transformation. I modified my workflow, but it still does not work. I got a message about bug report. Here is my xml:
Thank you for your suggestion. I've tried to leave one of the directories with the examples empty, unfortunately that did not help. I still get a bug report (see my previous post).