1. You can visualize the hand signs by using image() function. For example, the code below plots images of signs with indexes 1, 156, 1435 and 10000. Select any letter (in the training set they are labeled by a number) and plot 16 images of signs representing that particular letter (use 4x4 grid). Discuss data variability and its impact on the classifier training.
Adding more examples, adds diversity. It decreases the generalization error because your model becomes more general by virtue of being trained on more examples.
2. Fit LDA to train dataset and report accuracy for test dataset (perhaps a better way to do this is to visualize, because of large number of classes). Class accuracy is equal to the correct predictions devided by the number of test elements of that particular class.
3. Reduce number of features, for example, by taking only half of them (you can do this with train[,c(1,seq(2,785,2))]). Fit LDA and report back test accuracies - what do you observe? Can you reduce the number of features even more and increase LDA accuracy? Explain why this increase in accuracy by reducing the number of features may work? In you discussion include the calculation of number of unknown parameters in LDA classifier.
Answer:
Acurasy of test data set - 0.5050195
Acurasy increased
Reduction of the features
Accurasy
2
0.5050195
3
0.5528444
4
0.4875906
5
0.5868656
6
0.5807306
7
0.3733965
8
0.4986057
9
0.4974902
10
0.5612103
11
0.5188232
12
0.5327663
13
0.5121305
14
0.2593419
15
0.524261
16
0.5209147
We can see that maximum accuracy achieved when we remove 5 features.
Adding irrelevant predictors can worsen performance on new data - increased variance of the prediction (over fitting). This is because you end up fitting to noise and dilute the "true signal".
4. Fit QDA and report accuracies for each class in test set
Acurasy of test data set - 0.6574177
Acurasy of each class
5.
Reduction of the features
Accurasy
2
0.6483547
3
0.7023146
4
0.5599554
5
0.6939487
6
0.6795873
7
0.4482711
8
0.5771054
9
0.5419688
10
0.6095929
11
0.5046012
12
0.5195204
13
0.4914947
14
0.3232013
15
0.5800335
16
0.5340212
We can see that maximum accuracy achieved when we remove 3 features.
We can see that QDA achieved better accuracy then LDA, because it allows...
Šį darbą sudaro 1244 žodžiai, tikrai rasi tai, ko ieškai!
★ Klientai rekomenduoja
Šį rašto darbą rekomenduoja mūsų klientai. Ką tai reiškia?
Mūsų svetainėje pateikiama dešimtys tūkstančių skirtingų rašto darbų, kuriuos įkėlė daugybė moksleivių ir studentų su skirtingais gabumais. Būtent šis rašto darbas yra patikrintas specialistų ir rekomenduojamas kitų klientų, kurie po atsisiuntimo įvertino šį mokslo darbą teigiamai. Todėl galite būti tikri, kad šis pasirinkimas geriausias!
Norint atsisiųsti šį darbą spausk ☞ Peržiūrėti darbą mygtuką!
Mūsų mokslo darbų bazėje yra daugybė įvairių mokslo darbų, todėl tikrai atrasi sau tinkamą!
Panašūs darbai
Atsisiuntei rašto darbą ir neradai jame reikalingos informacijos? Pakeisime jį kitu nemokamai.
Pirkdamas daugiau nei vieną darbą, nuo sekančių darbų gausi 25% nuolaidą.
Išsirink norimus rašto darbus ir gauk juos akimirksniu po sėkmingo apmokėjimo!