-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
104 lines (99 loc) · 5.48 KB
/
ui.R
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# ui.R - User interface for the data exploration and classifier construction tool
library(ggplot2)
library(glmnet)
library(magrittr)
shinyUI(navbarPage("Exploratory binary classifier construction",
# upload panel
tabPanel(actionButton("uploadButton" , label = h5("Upload and view data")),
sidebarLayout(
sidebarPanel(fileInput('dataset', 'Upload dataset with at least one binary response:',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv',
'.tsv'
)
),
tags$hr(),
checkboxInput('header', 'Header', TRUE),
radioButtons('sep', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
','),
radioButtons('quote', 'Quote',
c(None='',
'Double Quote'='"',
'Single Quote'="'"),
'"'),
tags$hr(),
uiOutput("response")
),
mainPanel(
h3("Data summary"),
uiOutput("tosummarize"),
verbatimTextOutput("summary"),
hr(),
h3("Data"),
dataTableOutput('contents')
)
)
),
# construction panel
tabPanel(actionButton("constructionButton" , label = h5("Classifier construction")),
fluidRow(
column(2,
h3("Select model varables"),
hr(),
selectizeInput("classifier",
h4("Select classifier"),
choices = list("Penalized logistic regression" = "logit",
"Penalized linear regression" = "linear")),
sliderInput("penalty", "Set L1 penalty parameter", min = 0, max = 0, value = 0,sep="", round = -3,step = 0.001),
actionButton("setoptimal", "Reset to optimal penalty")
),
column(3,
actionButton("fitButton", label = h3("Fit model")),
br(), br(), br(),
uiOutput("maineffects"),
uiOutput("interactions")
),
column(2,
h3("Boundary visualization"),
hr(),
uiOutput("vismargins")
),
column(4,
actionButton("boundaryButton", label = h3("Plot boundary"))
)
),
fluidRow(
column(5,
hr(),
h4("Correlation between main effects and model errors"),
plotOutput("mainEffectsPlot", width = "100%", height = "300px"),
h4("Correlation between interactions and model errors"),
plotOutput("interactionplot")
),
column(7,
hr(),
plotOutput("boundaryplot")
)
)
),
tabPanel(actionButton("performanceButton", label = h5("Classifier performance")),
fluidRow(
column(6,
h3("Cross-validation results"),
hr(),
plotOutput("cvplot")
),
column(6,
h3("Receiver operating characteristic curve"),
hr(),
plotOutput("rocplot"))
)
)
))