-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.R
More file actions
46 lines (45 loc) · 1.36 KB
/
Copy pathui.R
File metadata and controls
46 lines (45 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
library(shiny)
shinyUI(fluidPage(tabsetPanel(
tabPanel('LASSO Regression',
sidebarLayout(
sidebarPanel(
br(),
sliderInput('lambda_lasso', HTML('<h3>Tuning Parameter λ:</h3>'),
min = 0, max = 2, value = 0.5, step = 0.05),
br(),
withMathJax(helpText("The LASSO minimizes: $$\\|\\mathbf{y - X\\beta}\\|^2_2 + \\lambda\\|\\beta\\|_1$$"))
),
mainPanel(
plotOutput('lassoplot')
)
)
),
tabPanel('Ridge Regression',
sidebarLayout(
sidebarPanel(
br(),
sliderInput('lambda_ridge', HTML('<h3>Tuning Parameter λ:</h3>'),
min = 0, max = 50, value = 5, step = 0.05),
br(),
withMathJax(helpText("Ridge regression minimizes: $$\\|\\mathbf{y - X\\beta}\\|^2_2 + \\lambda\\|\\beta\\|_2^2$$"))
),
mainPanel(
plotOutput('ridgeplot')
)
)
),
tabPanel('Smoothing Spline',
sidebarLayout(
sidebarPanel(
br(),
sliderInput('gam_spar', HTML('<h3>Tuning Parameter (scaled version of λ):</h3>'),
min = 0, max = 1.2, value = 0.5, step = 0.01),
br(),
withMathJax(helpText("The GAM minimizes: $$\\|\\mathbf{y} - f(\\mathbf{x})\\|^2_2 + \\lambda\\int (f'')^2$$"))
),
mainPanel(
plotOutput('smoothplot')
)
)
)
)))