Marco Guado
September 15, 2016
The Shiny application to be developed is based on the final project (1) presented in machine learning course. This project is to implement a model to predict what the best routine to perform an exercise with weights.
(1) url Project used machine learning [final] (http://htmlpreview.github.io/?https://github.com/magzupao/machine_learning/blob/master/project_machine_learning_magz.html)
(2) Resources Final Project: repository
Our initial model consists of 5 measurements recorded by sensors placed; wrist, forearm and arm several people. Where A is better and E is the worst routine.
Classification:
A
B
C
D
E
It was recorded for each user samples were grouped in a matrix composed of data of 160 variables and 19622 records.
After processing (data cleaning) the model, we have a data matrix consisting of 53 variables and records 19622. where we have:
52 -> variables predictors
1 -> variable discriminant
Based on the analysis model where we have quantitative and qualitative variables can solve a case prediction algorithm using the Random Forest.
Our model with a value of tree = 30 —> 100 is stable, and has a very low tracking error, which is reliable.
##
## Call:
## randomForest(formula = classe ~ ., data = new_df_training, ntree = 30, mtry = 6, replace = T)
## Type of random forest: classification
## Number of trees: 30
## No. of variables tried at each split: 6
##
## OOB estimate of error rate: 0.68%
## Confusion matrix:
## A B C D E class.error
## A 5572 7 0 1 0 0.001433692
## B 24 3754 16 0 3 0.011324730
## C 1 19 3395 7 0 0.007890123
## D 3 3 36 3172 2 0.013681592
## E 0 1 3 7 3596 0.003049626
.