-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The predict function is giving the same values for any test case #14
Comments
Hi Have you tried to do exactly the same with the original libsvm library? Are the results any different? If you could post here the results you get with it that would help a lot! Thanks |
Hi, Thanks very much for the quick reply.. I have not tried the original libsvm library. I have tried it on R and it gave varying results. I have even tried with the fat dataset published in libsvm site. ==
|
I have tested the same fat files on R also..Below are the commands and the final result.. fatTest<-read.csv("C:\Code\WearableVitals\src/assets/bp/testfat.csv") |
I find it suspicious that the nu parameter is an Array. Can you try with a number instead. Unlike other libraries you cannot grid-search hyperparameters in libsvm-js. |
Actually you are using the epsilon regression so shouldn't matter. I'll try to have at a look at it soon. |
I have tried without the array, without any parameters and with various
options and it has no effect.
I also tried all the types of classifiers and regression types, with each
of the type the prediction is different but it is the the same prediction
for any input.
Even of I give all 1s as the test input the prediction is still same.
Thanks very much for looking into it.
…On Mar 21, 2018 20:44, "Daniel Kostro" ***@***.***> wrote:
I find it suspicious that the nu parameter is an Array. Can you try with a
number instead. Unlike other libraries you cannot grid-search
hyperparameters in libsvm-js.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#14 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADVpBQtM694EGxW-u5-EaOIy0oCywCKlks5tgm5fgaJpZM4SyCoc>
.
|
Hello I'm closing this issue. Feel free to reopen if something still seems wrong. |
Wonderful..Thanks so much. Sorry for my ignorance in these matters. I spent
a lot of time learning about these techniques but missed the modification
of epsilon part.
Thanks
Ramesh
…On Fri, Mar 23, 2018 at 12:50 PM, Daniel Kostro ***@***.***> wrote:
Hello
Your epsilon value is too high. I tried with 0.001 and it gives something
that looks similar to your R result. Have look at
https://mljs.github.io/libsvm/#/SVR to see how the epsilon value affects
the regression.
I'm closing this issue. Feel free to reopen if something still seems wrong.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#14 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADVpBYgSN8cjc1eMeh9RB_X18NVaCmY7ks5thKJagaJpZM4SyCoc>
.
--
Ramesh Guntha
|
Hello, I would really appreciate your help. I am not sure if there are any other parameters I am not considering. R - Commands (Linear Kernal with Esplion=0.001)
libsvm-js (Linear Kernal with Esplion=0.001)
Results: R - Commands (Linear Kernal with Esplion=1.5)
libsvm-js (Linear Kernal with Esplion=1.5)Results: |
@rguntha Also note that according to the libsvm website, the R package is based on version 3.17 whereas libsvm-js is based on 3.22, so output may slightly differ. Hope that will fix your issue. I'm closing again, feel free to reopen if you still have issues. |
@stropitek Please note that libsvm takes a very long time for these computations, may because the very large number of iterations (10 million, as mention in the results in previous comment). It would be great if you can rerun my test files attached earlier in the thread (trainaims.csv and testaims.csv) Thanks very much for your continued help. |
Looking in the R documentation, I read:
Indeed SVM does not work well if the data is not scaled. In libsvm-js, data is not scaled by default, you have to do it yourself. |
@stropitek The results are exactly matching with R. Thanks very much for your help |
Please help me...
I am working on blood pressure prediction using the SVM regression methods. I have tried both the Epsilon and Nu regression types. I also have tried with various values of gamma, nu, cost and epsilon values.
=======================================================
The Problem:
I am getting the same predictions no matter what input data I am giving..
=======================================================
Code:
=======================================================
Logs:
trying binaryen method: native-wasm
asynchronously preparing wasm
binaryen method succeeded.
done!
*
optimization finished, #iter = 8
nu = 0.925000
obj = -146.760000, rho = -121.500000
nSV = 16, nBSV = 14
*
optimization finished, #iter = 8
nu = 1.000000
obj = -97.400000, rho = -68.000000
nSV = 16, nBSV = 16
2,42,84.8456,0.5617,0.1455,0.7072,3.97E+04,536.6846,-143.0407,146.9154,164.2148,130.1103
[ 121.5, 68 ]
2,29,87.7407,0.543,0.1408,0.6838,8.10E+04,1.20E+03,-297.5299,297.771,345.1783,252.506
[ 121.5, 68 ]
1,28,75.1024,0.64,0.1589,0.7989,4.41E+04,552.0304,-133.7681,172.2191,189.3553,156.166
[ 121.5, 68 ]
2,28,77.4648,0.6695,0.1051,0.7745,4.50E+04,869.1954,-137.7776,127.5441,138.6392,117.5474
[ 121.5, 68 ]
1,25,96.8411,0.5049,0.1147,0.6196,1.37E+05,2.39E+03,-540.3023,557.6924,533.8753,582.0348
[ 121.5, 68 ]
=======================================================
Input Data
Input data can be found in the attached zip folder. The training data file contains 16 rows. The last two columns are the two label values. The testing file contains 5 rows. From the logs you can see that they are producing same values.
trainaims.zip
The text was updated successfully, but these errors were encountered: