File tree Expand file tree Collapse file tree 6 files changed +86
-15
lines changed Expand file tree Collapse file tree 6 files changed +86
-15
lines changed Original file line number Diff line number Diff line change @@ -50,4 +50,5 @@ Suggests:
5050 rpart,
5151 MASS,
5252 nlme,
53- modeldata
53+ modeldata,
54+ liquidSVM
Original file line number Diff line number Diff line change 11# parsnip 0.1.1
22
3+ ## New Features
4+
5+ * ` liquidSVM ` was added as an engine for ` svm_rbf() ` (#300 )
6+
7+ ## Fixes
8+
9+ * The error message for missing packages was fixed (#289 and #292 )
10+
11+
312## Other Changes
413
514* S3 dispatch for ` tidy() ` was broken on R 4.0.
615
7- * The error message for missing packages was fixed (#289 and #292 )
816
917# parsnip 0.0.5
1018
Original file line number Diff line number Diff line change 3636# ' \item \pkg{R}: `"liquidSVM"`
3737# ' }
3838# '
39- # ' Note that models created using the `liquidSVM` engine cannot be saved like
40- # ' conventional R objects. The `fit` slot of the `model_fit` object has to be
41- # ' saved separately using the `liquidSVM::write.liquidSVM()` function. Likewise
42- # ' to restore a model, the `fit` slot has to be replaced with the model that is
43- # ' read using the `liquidSVM::read.liquidSVM()` function.
4439# '
4540# ' @includeRmd man/rmd/svm-rbf.Rmd details
4641# '
Original file line number Diff line number Diff line change @@ -243,9 +243,12 @@ set_pred(
243243 type = " prob" ,
244244 value = list (
245245 pre = function (x , object ) {
246- if (object $ fit $ predict.prob == FALSE )
247- stop(" `svm` model does not appear to use class probabilities. Was " ,
248- " the model fit with `predict.prob = TRUE`?" , call. = FALSE )
246+ if (! object $ fit $ predict.prob ) {
247+ rlang :: abort(
248+ paste0(" `svm` model does not appear to use class probabilities. Was " ,
249+ " the model fit with `predict.prob = TRUE`?" )
250+ )
251+ }
249252 x
250253 },
251254 post = function (result , object ) {
Original file line number Diff line number Diff line change @@ -19,6 +19,32 @@ svm_rbf() %>%
1919 translate()
2020```
2121
22+ ## liquidSVM
23+
24+ ``` {r liquidSVM-reg}
25+ svm_rbf() %>%
26+ set_engine("liquidSVM") %>%
27+ set_mode("regression") %>%
28+ translate()
29+ ```
30+
31+ ``` {r liquidSVM-cls}
32+ svm_rbf() %>%
33+ set_engine("liquidSVM") %>%
34+ set_mode("classification") %>%
35+ translate()
36+ ```
37+
38+ Note that models created using the ` liquidSVM ` engine cannot be saved like
39+ conventional R objects. The ` fit ` slot of the ` model_fit ` object has to be saved
40+ separately using the ` liquidSVM::write.liquidSVM() ` function. Likewise to restore
41+ a model, the ` fit ` slot has to be replaced with the model that is read using the
42+ ` liquidSVM::read.liquidSVM() ` function.
43+
44+ ` liquidSVM ` parameterizes the kernel parameter differently than ` kernlab ` . To
45+ translate between engines, ` sigma = 1/gammas^2 ` . Users will be specifying
46+ ` sigma ` and the function translates the value to ` gamma ` .
47+
2248## Parameter translations
2349
2450The standardized parameter names in parsnip can be mapped to their original
You can’t perform that action at this time.
0 commit comments