Practical Machine Learning with R and Python: Machine Learning in Stereo by Tinniam V Ganesh
Author:Tinniam V Ganesh [Ganesh, Tinniam V]
Language: eng
Format: azw3, pdf
Published: 2017-12-01T05:00:00+00:00
# Fit a model for 1,3,5,10 and 15 neighbors
cMat <- NULL
neighbors <-c(1,3,5,10,15)
for(i in seq_along(neighbors)){
fit =knn(train.X,test.X,train.y,k=i)
table(fit,test.y)
a<-confusionMatrix(fit,test.y)
cMat[i] <- a$overall[1]
print(a$overall[1])
}
## Accuracy
## 0.7835831
## Accuracy
## 0.8162047
## Accuracy
## 0.8089113
## Accuracy
## 0.8209787
## Accuracy
## 0.8184591
#Plot the Accuracy for each of the KNN models
df <- data.frame(neighbors,Accuracy=cMat)
ggplot(df,aes(x=neighbors,y=Accuracy)) + geom_point() +geom_line(color="blue") +
xlab("Number of neighbors") + ylab("Accuracy") +
ggtitle("KNN regression - Accuracy vs Number of Neighors (Unnormalized)")
Download
Practical Machine Learning with R and Python: Machine Learning in Stereo by Tinniam V Ganesh.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(7301)
Supercharging Productivity with Trello by Brittany Joiner(6560)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6413)
Mastering Tableau 2023 - Fourth Edition by Marleen Meier(6320)
Inkscape by Example by István Szép(6176)
Visualize Complex Processes with Microsoft Visio by David J Parker & Šenaj Lelić(5876)
Build Stunning Real-time VFX with Unreal Engine 5 by Hrishikesh Andurlekar(4869)
Design Made Easy with Inkscape by Christopher Rogers(4576)
Customizing Microsoft Teams by Gopi Kondameda(4115)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3932)
Extending Microsoft Power Apps with Power Apps Component Framework by Danish Naglekar(3709)
Business Intelligence Career Master Plan by Eduardo Chavez & Danny Moncada(3652)
Salesforce Platform Enterprise Architecture - Fourth Edition by Andrew Fawcett(3581)
Pandas Cookbook by Theodore Petrou(3562)
The Tableau Workshop by Sumit Gupta Sylvester Pinto Shweta Sankhe-Savale JC Gillet and Kenneth Michael Cherven(3363)
TCP IP by Todd Lammle(2982)
Drawing Shortcuts: Developing Quick Drawing Skills Using Today's Technology by Leggitt Jim(2910)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2857)
Work Smarter with Microsoft OneNote by Connie Clark(2842)
