irisrpart_present.md

Iris Tree Plot Shiny App

author: Samuel Bozzi Baco date: June, 18, 2020 autosize: true

Shiny App Adress

This is a presentation about the Shiny App "Iris Tree Plot"

"https://samuelbozzibaco.shinyapps.io/Iris_Tree_Plot/"

The only input the user needs to do is the number of splits the tree must be fited.

Then the app plots the tree and the ROC curve for the fit.

UI Details

   sidebarLayout(
        sidebarPanel(
            sliderInput("Splits",
                        "Number of splits:",
                        min = 1,
                        max = 4,
                        value = 3,
                        step = 1,
                        ticks = FALSE)
        ),

The UI consist on a slider (varying from 1 to 4) that get the number of splits for rpart to fit tree.

mainPanel(
            tabsetPanel(type = "tabs",
                        tabPanel("Tree", plotOutput("rpartPlot")),
                        tabPanel("ROC Curve", plotOutput("roc"))

There are two results presented in a tabet format: the tree plot from rpart.plot package and a ROC curve from multiROC package.

Server Details

The server function uses a reactive function to fit the model. Than the both rpart.plot and ROC curves gplot is constructed.

mdl <- reactive({

        rpart(Species ~., data = iris, cp = -1, maxdepth = input$Splits)
    })

Github repositoty

The full code can be fount at github repository

"https://github.com/qymera0/irisrpart"


qymera0/irisrpart documentation built on June 19, 2020, 12:18 a.m.