Markku Maijala
2024-05-20
This Shiny application is based on the built in R data set “iris”. The application will predict Iris type based on user input on sepal length and width and petal length and width. For the prediction machine learning is used based on a tree model. Cross validation is used when creating and testing the model. The model accuracy is show in the application.
This famous (Fisher’s or Anderson’s) iris data set gives the measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica.
The iris data set contains the following data.
## 'data.frame': 150 obs. of 5 variables:
## $ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ...
## $ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ...
## $ Petal.Length: num 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 ...
## $ Petal.Width : num 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0.1 ...
## $ Species : Factor w/ 3 levels "setosa","versicolor",..: 1 1 1 1 1 1 1 1 1 1 ...
The application can be accesssed from this link: https://marmai.shinyapps.io/assweek4/
The code for ui.R and server.R id found on github. https://github.com/marmai123/Developing-Data-Products-Assignment_Week4
Plesase copy link to browser if link is not working through RPubs.