Machine Learning for dotNET Developer Bahrudin Hrnjica, MVP
Agenda Intro to ML Types of ML dotNET and ML-tools and libraries Demo01: ANN with C# Demo02: GP with C# .NET Tools – Acord.NET, GPdotNET Summary
Machine Learning? method of teaching computers to make predictions based on data. branch of Artificial intelligence semi-automated extraction of knowledge from data always starts from data, and the goal is knowledge extraction, involves some amount of automation in form of algorithm and computer to do the job, not fully automated, it requires many smart decisions by a human.
Data Computer Output Program Data Computer Program Output Traditional Programming Machine Learning Computer Data Output Program Computer Data Program Output
Magic? No, more like gardening Seeds = Algorithms Nutrients = Data Gardener = You Plants = Programs
Sample Applications Web search Engineering Finance E-commerce Space exploration Robotics Information extraction Social networks Debugging [Your favorite area]
ML in a Nutshell Tens of thousands of machine learning algorithms Hundreds new every year Every machine learning algorithm has three components: Representation Evaluation Optimization
Representation Chromosomes in genetics (GA/GP) Neural networks Decision trees Sets of rules / Logic programs Instances Graphical models (Bayes/Markov nets) Support vector machines Etc.
Evaluation Accuracy Precision and recall Squared error Likelihood Posterior probability Cost / Utility Margin Entropy K-L divergence Etc.
Optimization/Learners Combinatorial optimization E.g.: Greedy search Convex optimization E.g.: Gradient descent Constrained optimization E.g.: Linear programming General optimization E.g.: Genetic Algorithm E.g.: Particle Swarm Optimization
Types of Learning Supervised (inductive) learning Training data includes desired outputs Unsupervised learning Training data does not include desired outputs Semi-supervised learning Training data includes a few desired outputs
Machine learning structure Supervised learning
Machine learning structure Unsupervised learning
Training and testing Data acquisition Practical usage Universal set (unobserved) Training set (observed) Testing set (unobserved)
Training and testing Training is the process of making the system able to learn. No free lunch rule: Training set and testing set come from the same distribution Need to make some assumptions or bias
What are we seeking? Supervised: Low E-out or maximize probabilistic terms Unsupervised: Minimum quantization error, Minimum distance, MAP, MLE(maximum likelihood estimation) E-in: for training set E-out: for testing set
What are we seeking? Under-fitting VS. Over-fitting (fixed N) error (model = hypothesis + loss functions)
dotNET and ML Learning API - https://github.com/UniversityOfAppliedSciencesFrankfurt/LearningApi Accord .NET - https://github.com/accord-net/framework GPdotNET- https://github.com/bhrnjica/gpdotnet
DEMO- Simple ANN and GP C# Program IRIS DATA DEMO
Accord .NET
DEMO ACCORD .NET
LearningAPI
GPdotNET GP and ANN
Existing ML tools are difficult or impossible to integrate into a software system. Commercial and Open Source API libraries work well for some machine learning tasks but are extremely limited for neural networks. To develop neural networks using Visual Studio you must understand seven core concepts: feed- forward, activation, data encoding, error, training, free parameters, and over-fitting. Once the concepts are mastered, implementation with Visual Studio is not difficult (but not easy either).
Reference http://bhrnjica.net/gpdotnet http://accord-framework.net/ https://github.com/UniversityOfAppliedSciencesFrankfurt/LearningA pi http://www.quaetrix.com/Build2013.html C# ANN sample https://msdn.microsoft.com/en- us/magazine/mt149362?author=james+mccaffrey
HVALA NA PAŽNJI!