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:
50
50
rpart,
51
51
MASS,
52
52
nlme,
53
- modeldata
53
+ modeldata,
54
+ liquidSVM
Original file line number Diff line number Diff line change 1
1
# parsnip 0.1.1
2
2
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
+
3
12
## Other Changes
4
13
5
14
* S3 dispatch for ` tidy() ` was broken on R 4.0.
6
15
7
- * The error message for missing packages was fixed (#289 and #292 )
8
16
9
17
# parsnip 0.0.5
10
18
Original file line number Diff line number Diff line change 36
36
# ' \item \pkg{R}: `"liquidSVM"`
37
37
# ' }
38
38
# '
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.
44
39
# '
45
40
# ' @includeRmd man/rmd/svm-rbf.Rmd details
46
41
# '
Original file line number Diff line number Diff line change @@ -243,9 +243,12 @@ set_pred(
243
243
type = " prob" ,
244
244
value = list (
245
245
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
+ }
249
252
x
250
253
},
251
254
post = function (result , object ) {
Original file line number Diff line number Diff line change @@ -19,6 +19,32 @@ svm_rbf() %>%
19
19
translate()
20
20
```
21
21
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
+
22
48
## Parameter translations
23
49
24
50
The standardized parameter names in parsnip can be mapped to their original
You can’t perform that action at this time.
0 commit comments