medizininformatik-initiative / Projectathon6-miracum1

5 stars 4 forks source link

Error for SVM model #11

Closed pdi-uk closed 1 year ago

pdi-uk commented 1 year ago

No fit can be found for the SVM model and the script stops:

- Training1460: C=0.25, sigma=0.1
+ Training1460: C=0.50, sigma=0.1
model fit failed for Training1460: C=0.50, sigma=0.1 Error in .local(x, ...) :
  No Support Vectors found. You may want to change your parameters

- Training1460: C=0.50, sigma=0.1
+ Training1460: C=1.00, sigma=0.1
model fit failed for Training1460: C=1.00, sigma=0.1 Error in .local(x, ...) :
  No Support Vectors found. You may want to change your parameters

- Training1460: C=1.00, sigma=0.1
Aggregating results
Something is wrong; all the RMSE metric values are missing:
      RMSE        Rsquared        MAE
 Min.   : NA   Min.   : NA   Min.   : NA
 1st Qu.: NA   1st Qu.: NA   1st Qu.: NA
 Median : NA   Median : NA   Median : NA
 Mean   :NaN   Mean   :NaN   Mean   :NaN
 3rd Qu.: NA   3rd Qu.: NA   3rd Qu.: NA
 Max.   : NA   Max.   : NA   Max.   : NA
 NA's   :3     NA's   :3     NA's   :3
Fehler: Stopping

Maybe the script should jump to the next model instead?

mematt commented 1 year ago

We did not encounter this issue on our data set with the given tuning grid (C, sigma). Seemingly there are no support vectors found to fit the boundary.

We will update the code and incorporate / switch to linear kernel SVMs.

In the meantime, I have wrapped RSME <- into try() to include a fail safe to continue execution should the model fit fail.

NandhiniS08 commented 1 year ago

The error is fixed in the latest commit