Shan
September 9th, 2016
The Objective of the project is to perform user friendly data analysis on web and develop predictive models.The app may be viewed at https://shan4224.shinyapps.io/Project/
The .csv data can be uploaded . We first visualize the summary of data.
Sepal.Length Sepal.Width Petal.Length Petal.Width
Min. :4.300 Min. :2.000 Min. :1.000 Min. :0.100
1st Qu.:5.100 1st Qu.:2.800 1st Qu.:1.600 1st Qu.:0.300
Median :5.800 Median :3.000 Median :4.350 Median :1.300
Mean :5.843 Mean :3.057 Mean :3.758 Mean :1.199
3rd Qu.:6.400 3rd Qu.:3.300 3rd Qu.:5.100 3rd Qu.:1.800
Max. :7.900 Max. :4.400 Max. :6.900 Max. :2.500
Species
setosa :50
versicolor:50
virginica :50
Then we understand the relation among various variables of data through plots.
We select a train data in the left side panel of the app. We select a dependent variable and fit a predictive model using tree algorithms.
n= 150
node), split, n, loss, yval, (yprob)
* denotes terminal node
1) root 150 100 setosa (0.33333333 0.33333333 0.33333333)
2) Petal.Length< 2.45 50 0 setosa (1.00000000 0.00000000 0.00000000) *
3) Petal.Length>=2.45 100 50 versicolor (0.00000000 0.50000000 0.50000000)
6) Petal.Width< 1.75 54 5 versicolor (0.00000000 0.90740741 0.09259259) *
7) Petal.Width>=1.75 46 1 virginica (0.00000000 0.02173913 0.97826087) *
We may select any test data in leftside panel of the app. We predict the dependent variable for test data.
Prediction for last six observations.
setosa versicolor virginica
145 0 0.02173913 0.9782609
146 0 0.02173913 0.9782609
147 0 0.02173913 0.9782609
148 0 0.02173913 0.9782609
149 0 0.02173913 0.9782609
150 0 0.02173913 0.9782609