-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
33 lines (29 loc) · 1.31 KB
/
app.py
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
from shiny import App, reactive, render, ui
import shinyswatch
import mccv
from generate_data import generate_data_ui, generate_data_server
from mccv_results import mccv_results_ui, mccv_results_server
app_ui = ui.page_fluid(
shinyswatch.theme.flatly(),
ui.panel_title('Monte Carlo Cross Validation'),
ui.navset_tab_card(
ui.nav('MCCV',
ui.markdown(
'''
Showcase of the mccv python package employing Monte Carlo Cross Validation (MCCV). Learn more at [mccv.nickg.bio](mccv.nickg.bio). This app was developed purely as an educational and learning resource/outlet.
Use this app to simulate data, parameterize learning with MCCV (limited to LR currently), run MCCV, and observe prediction results. Gray region in MCCV result plots indicate permutation distribution for comparison.
'''),
generate_data_ui('simulate'),
mccv_results_ui('mccv_results')
),
ui.nav_spacer(),
ui.nav_control(
ui.a("Github", href="https://github.com/ngiangre/mccvshiny", target="_blank")
)
)
)
def server(input, output, session):
mccv_obj = mccv.mccv()
generate_data_server('simulate',mccv_obj)
mccv_results_server('mccv_results',mccv_obj)
app = App(app_ui, server)