Run a simple SVM model

ReJayReJay Member Posts: 5 Newbie
edited December 2019 in Help


I run the decision model and knn model using the same layout,but the SVM model fail.
Tagged:

Answers

  • ReJayReJay Member Posts: 5 Newbie
     It shows me that rapidminer (LibSVM) cannot handle polynominal attributes.
  • varunm1varunm1 Moderator, Member Posts: 1,207 Unicorn
    Hello @ReJay

    SVM algorithms cannot work on attributes with Nominal (Categorical) variables. They only work on numerical data. In case of nominal, you can convert them to numerical using "nominal to numerical" and run SVM. I am not sure about your data properties so I cannot comment if it is a good idea to convert nominal attributes to numerical.

    Hope this helps.

    Regards
    Varun
    Regards,
    Varun
    https://www.varunmandalapu.com/

    Be Safe. Follow precautions and Maintain Social Distancing

  • ReJayReJay Member Posts: 5 Newbie
    Thank you for your answering(I don't know how to @ you :'( )


    My data is number.
    I read it on hive. If the reason is the name of table?


  • varunm1varunm1 Moderator, Member Posts: 1,207 Unicorn
    Are all your fields numeric (numbers)? I think you might have some categorical variables (nominal attributes) n your dataset which is causing this issue. If you want us to check please follow the below steps.

    Please export your process (.rmp file) using FILE --> Export Process from rapidminer and attach your dataset file (Excel, CSV etc.) and the exported process in this thread? It will help us to check and inform more details.
    Regards,
    Varun
    https://www.varunmandalapu.com/

    Be Safe. Follow precautions and Maintain Social Distancing

  • ReJayReJay Member Posts: 5 Newbie
    Ok, you are so kind! thank you for help again.
  • varunm1varunm1 Moderator, Member Posts: 1,207 Unicorn
    Hello @ReJay

    Thanks for attaching the files. I checked your data in RM and can confirm that all columns are numbers. The new error I saw is related to the label (output) column Y. This iY column is also read as a numeric value. As you are trying to do a classification problem (based on SVM kernel type) I added numerical to nominal operator that converts the numerical Y column into nominal. Now the process works.

    Import the attached process into your RM by using FILE --> Import process and attach your dataset and run it.

    Hope this helps. Let us know if you need more information.
    Regards,
    Varun
    https://www.varunmandalapu.com/

    Be Safe. Follow precautions and Maintain Social Distancing

  • ReJayReJay Member Posts: 5 Newbie

    I change "Y" to "y" in Set Role when it send error. But  the NtP send error. 
  • varunm1varunm1 Moderator, Member Posts: 1,207 Unicorn
    If it is already nominal you don't need to change it using numeric to nominal. Just disable the nominal to numeric and try running it. In my case, it is read as numeric so I changed it to nominal.
    Regards,
    Varun
    https://www.varunmandalapu.com/

    Be Safe. Follow precautions and Maintain Social Distancing

Sign In or Register to comment.