cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
Alma1
Level III

Hi,

 

I am trying to use SVM on my data. I have found an ADDin but dont know how I should get the R-code. I follow all the steps in the video but dont understand from where R-code is coming ( step no.8) can any one help? would the R--code be the same for any type of data? I have R installed on my computer.

 

https://community.jmp.com/t5/JMP-Add-Ins/The-JMP-to-R-Add-In-Builder/ta-p/43879

 

thanks

14 REPLIES 14
cwillden
Super User (Alumni)

Re: SVM

Hi @Alma1,

The video shows you how to create the add-in as a demonstration of the JMP to R add-in builder, but you don't need to do any of that if you just want to use the SVM add-in they provide.  The R-code is already embedded in the add-in and is generic for any data where you can select appropriate columns in a JMP data table for the roles in the SVM add-in.  Just download the SVM add-in and open it in JMP to install it.  It will then be available from the add-ins menu.

-- Cameron Willden
Alma1
Level III

Re: SVM

Many thanks I will try and inform you of the result.
Alma1
Level III

Re: SVM

 

hi Willden 

Many thanks for your detailed explanation I tried what you advised after choosing X-Axis, Y-Axis and Factor from my data I get unknown error and I dont know what is the problem. I am trying to separate plenty of milk samples according to their origin using milk composition parameters. I dont know if I am choosing the right columns for X-Axis, Y-Axis and Factor. could you please help

cwillden
Super User (Alumni)

Re: SVM

I never use R in JMP, so I'm probably not a good person to help diagnose any issues there.

However, instead of trying to do an SVM in R, you could do a Neural Net in JMP.  Neural Nets can do anything an SVM can do pretty much, the only real advantage of an SVM is speed in the fitting process.  My guess that the only reason JMP doesn't have SVMs built-in is because of their relative redundancy with NNs.

When using the NN, choose some number of hidden units between the number of milk composition parameters and the number of milk samples you have in your training set.  More is generally better.  If you have base JMP, you can only do 1 hidden layer.  If you have JMP Pro, you can do 2 layers with various activation functions.  I don't think you'll need more than 1 hidden layer.

-- Cameron Willden
Alma1
Level III

Re: SVM

Willden thanks for your advice I have used AAN but I was told that SVM gives more clear separation that is why I am after SVM. 

 

Regards

Re: SVM

There are many classifiers available today, including SVM and ANN, each with their own strengths and assumptions. Performance varies depending on the situation and how well suited each classifier is to a particular set of conditions. I don't think it is possible to claim that one classifier is superior in every domain or case. Much of the success of the SAS Enterprise Miner is due to the wide range of models and algorithms that it provides. You can explore and compare many different approaches with it before deciding on the best one. That advantage is the motivation for the recent addition of new features like the Formula Depot and the Model Comparison platform to JMP Pro.

As Dan explained in the comments about the original blog post about the JMP to R Add-in Builder, this project, while impressive as far as it goes, was not complete before the summer intern, Julia, left SAS and returned to school.

Caveat: JMP scripts, add-ins, and applications found in the JMP Community are wonderful extensions to JMP but they are not supported, even the ones developed by staff. They are provided for your use 'as is.'

If you cannot wait for the next version of this add-in (no promises!) then you might see Help > Scripting Guide for information and examples about scripting JMP to work with R. If you write R scripts now then you might be able to use JSL. It is straight-forward to connect to R, submit R scripts, and receive R results with JMP. The add-in is convenient but not necessary for this connection.

Re: SVM

The SVM add-in is intended to be a simple example to illustrate how to use the JMP to R Add-in Builder. The SVM add-in example requires two continuous predictors to classify a two-level categorical response. SVM has much broader capabilities. You can read about the package here.

Exercising the general functionality of the svm() function in the R package e1071 to accommodate other cases (different number and kind of predictors, classification or regression, and so on) would require writing an R script and a JMP script.

Alma1
Level III

Re: SVM

Hi Cwillden

 

I have done what you mentioned but still it does not work

cwillden
Super User (Alumni)

Re: SVM

If you are willing to share your data (or at least make it anonymized), we could probably better advise.  Do you have JMP Pro or base JMP?  Base JMP has very limited capabilities in its neural net platform; so if you do not have Pro, NN may not provide an adequate solution.

-- Cameron Willden