superml icon indicating copy to clipboard operation
superml copied to clipboard

GrideSearchCV() with lssvm

Open Navien2 opened this issue 1 year ago • 6 comments

Kindly , I tried use this package with LSSVM , but could not do it, please could you help ? Can I add the lssvm file to this project from :

add lssvm to this part of the code available_trainers = c("XGBTrainer", "RFTrainer", "NBTrainer"),

https://github.com/cran/kernlab/blob/master/R/lssvm.R ??

Navien2 avatar Sep 29 '23 15:09 Navien2

Can I add the lssvm file to this project.

Navien2 avatar Sep 29 '23 15:09 Navien2

@Navien2 Why not use that package directly? I am trying to understand your usecase to add it to this project?

saraswatmks avatar Oct 02 '23 19:10 saraswatmks

You have the GridesearchCV() code in R in this part in Github: https://github.com/saraswatmks/superml/blob/master/R/GridSearch.R but your code does not work with ( LSSVM( least square support vector machine) no such classifier file in your code files .

I have LSSVM code in R from https://github.com/cran/kernlab/blob/master/R/lssvm.R i add it to your code files but had errors ???? Please could you help me with it

Navien2 avatar Oct 04 '23 16:10 Navien2

@Navien2 Ok, I'll try to add it this week to this package. Will update you soon. Regards.

saraswatmks avatar Oct 08 '23 19:10 saraswatmks

@Navien2 could you provide me a working example of lssvm model? I tried the following code but it throws error.

library(kernlab)

iris <- unique(iris)

rbf <- rbfdot(0.5)

k <- kernelMatrix(rbf, as.matrix(iris[,-5]))

klir <- lssvm(k, iris[, 5], type='classification', kernel='matrix')

# Error in type(ret) <- match.arg(type, c("classification", "regression")) : 
#     could not find function "type<-"


saraswatmks avatar Oct 10 '23 04:10 saraswatmks

Dear Manish, I hope you are doing well. could you fix the issue with LSSVM ? best

On Tue, Oct 10, 2023 at 7:58 AM Manish Saraswat @.***> wrote:

@Navien2 https://github.com/Navien2 could you provide me a working example of lssvm model? I tried the following code but it throws error.

library(kernlab)

iris <- unique(iris)

rbf <- rbfdot(0.5)

k <- kernelMatrix(rbf, as.matrix(iris[,-5]))

klir <- lssvm(k, iris[, 5], type='classification', kernel='matrix')

Error in type(ret) <- match.arg(type, c("classification", "regression")) :

could not find function "type<-"

— Reply to this email directly, view it on GitHub https://github.com/saraswatmks/superml/issues/58#issuecomment-1754372505, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGI2VKZA7Z3PIF733VUFAA3X6TIWPAVCNFSM6AAAAAA5MTOM56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJUGM3TENJQGU . You are receiving this because you were mentioned.Message ID: @.***>

Navien2 avatar Nov 20 '23 07:11 Navien2