Skip to content

Instantly share code, notes, and snippets.

@jtleek
Created April 21, 2017 01:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtleek/76b76559a3096d983f26c7dd1d8a08be to your computer and use it in GitHub Desktop.
Save jtleek/76b76559a3096d983f26c7dd1d8a08be to your computer and use it in GitHub Desktop.
Flexdashboard, its alive!
---
title: "Tabset Column"
runtime: shiny
output: flexdashboard::flex_dashboard
---
```{r setup, include=FALSE}
library(flexdashboard)
library(ggnet)
library(network)
library(shiny)
library(RSkittleBrewer)
source("./plot_nnet.R")
```
Two nodes
======================
Column
-------------------------------------
### Neural Network
```{r}
trop = RSkittleBrewer("tropical")
nodes_per_layer = c(2,2,2,1)
layer_shape = c(19,17,15,19)
connection_type=c("s","s","f")
stride_length= c(2,2.2)
layer_color=trop[c(2,3,4,2)]
renderPlot({
out = 3*input$w1 + input$b1 + 3*input$w2 + input$b2
node_values = c(3/3,3/3,input$w1,input$w2,input$b1,input$b2,out/8)
node_labels = round(node_values,1)
plot_net(nodes_per_layer,
layer_shape,
connection_type,
stride_length,
layer_color,
node_values,
node_labels)
})
```
Column {.tabset}
-------------------------------------
### Controls
```{r}
sliderInput("w1", "w1:", 0,1,0.5)
sliderInput("b1", "b1:", 0,1,0.5)
sliderInput("w2", "w2:", 0,1,0.5)
sliderInput("b2", "b2:", 0,1,0.5)
```
### Description
```{r}
```
Linked nodes
======================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment