-
Notifications
You must be signed in to change notification settings - Fork 8
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
survivalsm function fails using another dataset #6
Comments
Hi,
I tried it myself with this example using the following code:
survivalsvm(Surv(time, status) ~ karno + age, veteran, gamma.mu = 0.1)
and obtained this output:
survivalsvm result
Call:
survivalsvm(Surv(time, status) ~ karno + age, veteran, gamma.mu = 0.1)
Survival svm approach : regression
Type of Kernel : lin_kernel
Optimization solver used : quadprog
Number of support vectors retained : 15
survivalsvm version : 0.0.5
So it is not easier to figure out what could the raison in your case. May be it would be nice to send us more details about it.
Regards
Cesaire
… On 2. Aug 2019, at 23:04, certara-ShengnanHuang ***@***.***> wrote:
Hi @mnwright <https://github.com/mnwright>,
Thanks for sharing this package and I've been trying to use it on my own dataset. However, when using the code like this: survsvm.reg1 <- survivalsvm(Surv(follow_up, event) ~ AGE.bl+PTGENDER+PTEDUCAT , data = study1, type = "regression", gamma.mu = 1, opt.meth = "quadprog", kernel = "add_kernel")
Error shows up a this:
<https://user-images.githubusercontent.com/50929185/62398613-3780bc80-b547-11e9-8708-f96248cef140.png>
There are definitely observations in the dataset study1, and follow_up and event are all num.
Could you please let me know where goes wrong? Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#6?email_source=notifications&email_token=AGJ42MHJV4DYZHOD4MKXGATQCSOMNA5CNFSM4IJBA4T2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HDETOHA>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AGJ42MCSOKTM7M3VVP6KQMDQCSOMNANCNFSM4IJBA4TQ>.
|
HI Certara,
Survival SVM does not predict harzard or any survival probability, but survival ranks. So C-Index as presented in our paper (Support Vector Machines for Survival Analysis with R - The R Journalhttps://journal.r-project.org/archive/2018/RJ.../RJ-2018-005.pdf <https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=2ahUKEwj4oIXK0-3jAhVBhqQKHYMHB8oQFjAAegQIBRAC&url=https%3A%2F%2Fjournal.r-project.org%2Farchive%2F2018%2FRJ-2018-005%2FRJ-2018-005.pdf&usg=AOvVaw3KelwnvXdZ920Db6Tm5Rfx>) should be the more appropriate performance measure between survival sim and others model like Cox or random survival forest.
Best regards
Cesaire
… On 5. Aug 2019, at 21:02, certara-ShengnanHuang ***@***.***> wrote:
Hi Cesaire,
Thanks for your reply. I think I found the reason why. The function only accepts covariates as a factor or continuous variable.
I used this function and get the predicted out as the predicted event time. Have you ever tried to plot the predicted KM vs. the raw KM on the dataset? I try using this formula:
survsvm.reg <- survivalsvm(Surv(diagtime, status) ~ ., data = veteran, type = "regression", gamma.mu = 1, opt.meth = "quadprog", kernel = "add_kernel") survsvm.ptrain <- predict(object = survsvm.reg, newdata = veteran)
And then plot the predicted and the raw KM for veteran dataset as follow, you could see they are significantly different:
<https://user-images.githubusercontent.com/50929185/62487927-13b0b700-b791-11e9-86e6-3d3dce72d360.png>
I also calculated the Brier score, only 0.04 - a really good sign for model performance, which contradicts a little with the KM curve. Is this result reasonable for your package?
Regards,
Shengnan
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#6?email_source=notifications&email_token=AGJ42MDDZMTRAMPOKUAIHDDQDB2L7A5CNFSM4IJBA4T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3SYJLY#issuecomment-518358191>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AGJ42MHHG56SUX52QSNTR6LQDB2L7ANCNFSM4IJBA4TQ>.
|
Hi Cesaire, Thanks for the explanation, it really makes sense now. Best regards, |
Hi Certara,
Unfortunately no. It doesn’t make sense to compute brier score on survivalsvm output.
Best
Cesaire
… On 6. Aug 2019, at 15:24, certara-ShengnanHuang ***@***.***> wrote:
Hi Cesaire,
Thanks for the explanation, it really makes sense now.
C-index is really useful and the Brier score is also popular for performance measure between different models. Is there a way to calculate the Brier score for your survival SVM?
Thanks a lot!
Best regards,
Shengnan
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#6?email_source=notifications&email_token=AGJ42MBJET6FXGVVCPKF3KTQDF3RZA5CNFSM4IJBA4T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3VD4ZY#issuecomment-518667879>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AGJ42MG2D27GQKLH36D2XVDQDF3RZANCNFSM4IJBA4TQ>.
|
Hi Cesaire, That is a pity... Thanks for your reply. Best, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @mnwright,
Thanks for sharing this package and I've been trying to use it on my own dataset. However, when using the code like this:
survsvm.reg1 <- survivalsvm(Surv(follow_up, event) ~ AGE.bl+PTGENDER+PTEDUCAT , data = study1, type = "regression", gamma.mu = 1, opt.meth = "quadprog", kernel = "add_kernel")
An error shows up:
There are definitely observations in the dataset
study1
, andfollow_up
andevent
are allnum
.Could you please let me know where goes wrong? Thanks!
The text was updated successfully, but these errors were encountered: