8000 Update r/2021-07-08-ml-regression.Rmd · plotly/plotly.r-docs@56ce3dc · GitHub
[go: up one dir, main page]

Skip to content

Commit 56ce3dc

Browse files
Update r/2021-07-08-ml-regression.Rmd
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
1 parent dd41162 commit 56ce3dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

r/2021-07-08-ml-regression.Rmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,13 @@ data(tips)
106106
y <- tips$tip
107107
X <- tips$total_bill
108108
109+
# Model #1
109110
knn_dist <- nearest_neighbor(neighbors = 10, weight_func = 'inv') %>%
110111
set_engine('kknn') %>%
111112
set_mode('regression') %>%
112113
fit(tip ~ total_bill, data = tips)
114+
115+
# Model #2
113116
knn_uni <- nearest_neighbor(neighbors = 10, weight_func = 'rectangular') %>%
114117
set_engine('kknn') %>%
115118
set_mode('regression') %>%

0 commit comments

Comments
 (0)
0