Closed chengwenxuan1997 closed 1 year ago
Hi,
thanks for using survivalsvm. The package is not intended to compute variable importance.
Best wishes, Cesaire
On 12. Oct 2022, at 15:41, Eric @.**@.>> wrote:
Thanks for the powerful tools, but I was confused about how to measure the importance of each variable. Thus it was difficult to explain which variable plays the main role in the prediction,
As Maverick Meerkathttps://stackoverflow.com/users/6296435/maverick-meerkat says, the weight can be calculated as t(fit$SV) %% fit$coefs when the binary classification. So could I use a similar definition t(fit$model.fit$SV) %% fit$model.fit$Beta, as the weight of each variable?
— Reply to this email directly, view it on GitHubhttps://github.com/imbs-hl/survivalsvm/issues/8, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGJ42MH553B7SUU53P44HODWC25XJANCNFSM6AAAAAARDJWVGY. You are receiving this because you are subscribed to this thread.Message ID: @.***>
OK, thanks. But if I want to apply the trained model to new samples to divide them into high/low-risk groups, could I treat predict(fit, as.data.frame(new_data))$predicted
as a risk score and divide these samples by median value?
Thanks for the powerful tools, but I was confused about how to measure the importance of each variable. Thus it was difficult to explain which variable plays the main role in the prediction,
As Maverick Meerkat says, the weight can be calculated as
t(fit$SV)%*% fit$coefs
when the binary classification. So could I use a similar definitiont(fit$model.fit$SV) %*% fit$model.fit$Beta
as the weight of each variable? Or any other options? Thanks.