You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NEWS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# sasctl (development version)
1
+
# sasctl 0.7.0
2
2
3
3
* Fixed correct release retrieval when using `session` to connect to Viya 2020.x
4
4
* Added `codegen` function in experimental state. Works for simple `lm`, `glm` models and [tidymodels](https://www.tidymodels.org/)`workflow` with regression or classification model mode`
Copy file name to clipboardExpand all lines: vignettes/xgb-tidymodel.Rmd
+41-11Lines changed: 41 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ knitr::opts_chunk$set(
14
14
)
15
15
```
16
16
17
-
R-sasctl has tools to help you create all the necessary files to upload an R model successfully to SAS Viya Model Manager and be able to take advantage of the many .
17
+
R-sasctl has tools to help you create all the necessary files to upload an R model successfully to SAS Viya Model Manager and be able to take advantage of its many features.
18
18
19
19
## Simple data preparation
20
20
@@ -126,6 +126,8 @@ Scoring codes are required to run R and Python models in SAS Model Manager, `sas
126
126
127
127
You will notice that the scoring code has many `EM_*` and `P_<<target>><<level>>` variables. They're not required, but it makes very consistent on how models made in SAS Viya UI are created. Making it easier to mix these models.
@@ -139,24 +141,52 @@ We can use the `inputs` to generate alternate input variables. In this case it i
139
141
code <- codegen(xgb_fitted,
140
142
path = paste0(path, "scoreCode.R"),
141
143
inputs = colnames(hmeq)[-1],
144
+
referenceLevel = 1,
142
145
rds = modelrda)
143
146
code
144
147
```
145
148
146
-
Now we create some additional files which are required to configure SAS Model Manager when uploading the files. For the variables specifically, should match the inputs from the model and outputs (outputs may be needed to match what comes out the scoring code)
149
+
### Testing the scoring code
150
+
151
+
```{r test_code}
152
+
153
+
## getting the .rda Path to be called in the function
154
+
## this is simulating what Viya passes to R when calling it
Now we create some additional files which are required to configure SAS Model Manager when uploading the files. For the variables specifically, should match the inputs from the model and outputs. We can use the result from the scoring code test from the previous chunck. Otherwise you can create a `data.frame` with the expected outputs and pass it.
0 commit comments