Understanding Neural Networks using .NET

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Identity Management - Login © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Payroll and HR Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Co- location Mass Market Managed Hosting ISV Hosting.
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: OLE Notes Migration Utility
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: SmartList Usability Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
WinHEC /22/2017 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Connect with life Connect with life
NEXT: Overview – Sharing skills & code.
demo Receive Inventory Export Parse and Normalize.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Suggested Item Enhancements – Sales Script and Additional Information © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: Employee Self Service Timecard Entry © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
Feature: Void Historical/Open Transaction Updates © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
 Boris Jabes Program Manager Lead Microsoft Corporation TL13.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

MIX 09 4/17/2018 4:41 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Возможности Excel 2010, о которых следует знать
HTML5 Platform from Web to Apps
Building modern web applications with Visual Studio and Web Essentials
Title of Presentation 11/22/2018 3:34 PM
Neural Networks for IT Professionals
Baseline: How Are We Doing Now?
Build /2/ The future of Azure devops: Building and managing cloud applications lifecycle across your teams Bradley Millington Program.
Title of Presentation 12/2/2018 3:48 PM
Blending the web with Windows
IE11’s Developer Tools, F12, just got nicer (again)
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
4/27/17, Bell #8 What amount of net pay has been earned this period?
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
PENSACOLA ENERGY WORK PLAN OCTOBER 10, 2016
Jason Zander Unplugged
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
5/24/2019 6:44 PM 1/8/18 Bell #10 In a world governed by the gods, is there any room for human will? Do human choices make a difference? EXPLAIN © 2007.
Windows Desktop Development: A Panel Discussion
日本初公開!? Vista の新機能を実演 とっちゃん わんくま同盟 7/23/2019 9:09 AM
Title of Presentation 7/24/2019 8:53 PM
Presentation transcript:

Understanding Neural Networks using .NET Build 2014 7/1/2018 3-643 Understanding Neural Networks using .NET Friday, April 4, 2014 10:30 AM – 11:30 AM Room 3024 James McCaffrey Microsoft Research © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Agenda What is a neural network? Feed-forward and activation Training and free parameters Error and accuracy Over-fitting Dropout The raw C# approach The canned application approach The commercial API approach A vision for the (very near) future Neural networks behind the scenes (speech recognition) References and resources

What is a Neural Network? training data independent variables / predictors / attributes / features / X-values “the thing to classify (predict)” / dependent variable / Y

Age 35 3.5 input hidden output Income 49,000 4.9 0.23 Political 0.0 Republican 0.62 Education High 1.0 0.15 Sex M -1.0

Feed-Forward and Activation 1.0 1). (0.1)(4.0) + (0.2)(-5.0) + (0.3)(6.0) = 1.2 2). 1.2 + 2.0 = 3.2 3). Activation(3.2) = 0.73 4). Local output = 0.73 0.10 W0 = 4.0 b = 2.0 W3 = 2.0 0.73 0.20 W1 = -5.0 0.73 Technical Note: most NN literature treats the bias as a special weight that has a dummy input which is always a 1.0 value 0.30 W2 = 6.0

Four Most Common Activation Functions Logistic Sigmoid Output between [0, 1] y = 1.0 / (1.0 + e–x) Hyperbolic Tangent Output between [-1, +1] y = tanh(x) = (ex – e-x) / (ex + e-x) Heaviside Step Output either 0 or 1 if (x < 0) then y = 0 else if (x >= 0) then y = 1 Softmax Outputs between [0, 1] and sum to 1.0 y = (e-xi) / Σ (e-xj)

Training and Free Parameters Number of weights and bias values to determine = (ni * nh) + (nh * no) + (nh + no) Ex: ni = 10, nh = 20, no = 3 (10 * 20) + (20 * 3) + (20 + 3) = 283 Back-propagation Fastest (relatively) technique By far most common Requires “learning rate” and “momentum” Genetic Algorithm Slowest technique Sometimes highly effective Requires “population size”, “mutation rate”, “max generations”, “selection probability” Particle Swarm Optimization Good compromise Requires “number particles”, “max iterations”, “cognitive weight”, “social weight”

Error and Accuracy Mean squared error: (0.8 - 1)2 + (0.1 - 0)2 + (0.1 - 0)2 + (0.3 - 0)2 + (0.4 - 0)2 + (0.3 - 1)2 / 3 = 0.273 B: (0.3 - 0)2 + (0.5 - 1)2 + (0.2 - 0)2 + (0.5 - 1)2 + (0.4 - 0)2 + (0.1 - 0)2 + (0.4 - 0)2 + (0.5 - 0)2 + (0.1 - 1)2 / 3 = 0.733 Mean cross entropy error: A: -( ln(0.1) * 0 + ln(0.9) * 1 + ln(0.0) * 0 ) + . . . / 3 = 0.511 B: -( ln(0.3) * 0 + ln(0.5) * 1 + ln(0.2) * 0 ) + . . . / 3 = 1.230

Avoiding Model Over-Fitting What is it? Symptom: Model is great on predicting existing data, but fails miserably on new data Roulette example: red, red, black, red, red, black, red, red, black, red, red, ?? A serious problem for all classification/prediction techniques, not just neural networks Five Most Common Techniques 1. K-fold cross validation 2. Use lots of training data 3. Train-Validate-Test (early stop when error on validate set begins to increase) 4. Repeated sub-sampling validation 5. Jittering – deliberately adding noise data to make over-fitting more difficult Quite a few exotic techniques also available (weight decay, Bayesian learning, etc.)

Dropout

Approach 1 – Raw C#

Approach 2 – Canned Application

Approach 3 – Commercial (or Open Source) API Set

A Vision for the Future Iris Data Iris Table Train Test NN Classifier Toolbox Data Readers Hidden nodes: 7 Data Converters Iris Table Loss function: MSE Data Tables Data Normalizers Train: Back-propagation Data Encoders Train Test Exit error: 0.050 Binary Classifiers Learn rate: 0.010 Neural Networks NN Classifier Model Evaluators Momentum: 0.025 Evaluate

Neural Networks behind the Scenes using System; using Microsoft.Speech.Synthesis; // x86 version using Microsoft.Speech.Recognition; using System.Globalization; namespace Build2014SpeechDemo { class Program static SpeechSynthesizer ss = new SpeechSynthesizer(); static SpeechRecognitionEngine sre; static bool done = false; static void Main(string[] args) try { ss.SetOutputToDefaultAudioDevice(); ss.Speak("Hello");

Resources Concepts: ftp://ftp.sas.com/pub/neural/FAQ.html#questions Weka: http://www.cs.waikato.ac.nz/ml/weka/ Custom C#: http://www.quaetrix.com/Build2014.html (case sensitive) Speech: http://www.quaetrix.com/SpeechDemo.html (case sensitive)

Thank You! Understanding Neural Networks using .NET Session 3-643 Understanding Neural Networks using .NET 2014 Build Conference April 2-4, 2014 San Francisco, CA James McCaffrey Microsoft Research jammc@microsoft.com

Your Feedback is Important Build 2014 7/1/2018 Your Feedback is Important Fill out an evaluation of this session and help shape future events. Scan the QR code to evaluate this session on your mobile device. You’ll also be entered into a daily prize drawing! © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

© 2014 Microsoft Corporation. All rights reserved © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.