AboutSQL Server, Analytics, .Net, Machine Learning, R, Python Archives
About Me
Mitch Wheat has been working as a professional programmer since 1984, graduating with a honours degree in Mathematics from Warwick University, UK in 1986. He moved to Perth in 1995, having worked in software houses in London and Rotterdam. He has worked in the areas of mining, electronics, research, defence, financial, GIS, telecommunications, engineering, and information management. Mitch has worked mainly with Microsoft technologies (since Windows version 3.0) but has also used UNIX. He holds the following Microsoft certifications: MCPD (Web and Windows) using C# and SQL Server MCITP (Admin and Developer). His preferred development environment is C#, .Net Framework and SQL Server. Mitch has worked as an independent consultant for the last 10 years, and is currently involved with helping teams improve their Software Development Life Cycle. His areas of special interest lie in performance tuning |
Tuesday, December 27, 2016R: Evaluating a classifier using standard performance evaluation metricsThe Azure ML team have released a useful Custom R Evaluator script for computing standard classifier performance metrics. The module expects as input a dataset containing the actual and predicted class labels (i.e. a confusion matrix). The R code is available at GitHub. Example output: $ConfusionMatrix
Predicted
Actual a b c
a 27 2 5
b 1 24 2
c 1 5 33
$Metrics
a b c
Accuracy 0.8400000 0.8400000 0.8400000
Precision 0.9310345 0.7741935 0.8250000
Recall 0.7941176 0.8888889 0.8461538
F1 0.8571429 0.8275862 0.8354430
MacroAvgPrecision 0.8434093 0.8434093 0.8434093
MacroAvgRecall 0.8430535 0.8430535 0.8430535
MacroAvgF1 0.8400574 0.8400574 0.8400574
AvgAccuracy 0.8933333 0.8933333 0.8933333
MicroAvgPrecision 0.8400000 0.8400000 0.8400000
MicroAvgRecall 0.8400000 0.8400000 0.8400000
MicroAvgF1 0.8400000 0.8400000 0.8400000
MajorityClassAccuracy 0.3900000 0.3900000 0.3900000
MajorityClassPrecision 0.0000000 0.0000000 0.3900000
MajorityClassRecall 0.0000000 0.0000000 1.0000000
MajorityClassF1 0.0000000 0.0000000 0.5611511
Kappa 0.7581986 0.7581986 0.7581986
RandomGuessAccuracy 0.3333333 0.3333333 0.3333333
RandomGuessPrecision 0.3400000 0.2700000 0.3900000
RandomGuessRecall 0.3333333 0.3333333 0.3333333
RandomGuessF1 0.3366337 0.2983425 0.3594470
RandomWeightedGuessAccuracy 0.3406000 0.3406000 0.3406000
RandomWeightedGuessPrecision 0.3400000 0.2700000 0.3900000
RandomWeightedGuessRecall 0.3400000 0.2700000 0.3900000
RandomWeightedGuessF1 0.3400000 0.2700000 0.3900000 |
ContactMSN, Email: mitch døt wheat at gmail.com LinksFavorites
Blogs |