Andrea Martorana Tusa. Failure prediction for manifacturing industry

Similar documents
Andrea Martorana Tusa. T-SQL Advanced: Grouping and Windowing

SQL Saturday Cork Welcome to Cork. Andrea Martorana Tusa T-SQL advanced: Grouping and Windowing

Andrea Martorana Tusa. Customizing SQL Server 2016 Mobile Report Publisher

Boost your Analytics with ML for SQL Nerds

millions of SQL Server users worldwide, this feature broadens enormously concepts behind the model; how relationships are handled and what are the

Boost your Analytics with Machine Learning for SQL Nerds. Julie mssqlgirl.com

Data and AI LATAM 2018

Indira Bandari. Predictive Analytics using R in SQL Server

Tomaž Kaštrun. Data Science for Beginners

Cortana Intelligence Suite; Where the Magic Happens

As a reference, please find a version of the Machine Learning Process described in the diagram below.

Modeling. Preparation. Operationalization. Profile Explore. Model Testing & Validation. Feature & Algorithm Selection. Transform Cleanse Denormalize

Build a system health check for Db2 using IBM Machine Learning for z/os

Slice Intelligence!

Evaluating Classifiers

Take P, R or U. and solve your data quality problems Oliver Engels & Tillmann Eitelberg, OH22

Microsoft, Open Source, R: You Gotta be Kidding Me!

Overview of Data Services and Streaming Data Solution with Azure

Analytics and Visualization

SQL Server 2016 R Integration for database administrators

SOFTWARE DEVELOPMENT: DATA SCIENCE

DirectQuery vs Vertipaq Modes in SSAS Tabular Model

After completing this course, participants will be able to:

Event: PASS SQL Saturday - DC 2018 Presenter: Jon Tupitza, CTO Architect

70-466: Implementing Data Models and Reports with Microsoft SQL Server

Cortana Analytics : with Raspberry Pi and Weather Sensor

Evaluating Classifiers

Recently Updated Dumps from PassLeader with VCE and PDF (Question 1 - Question 15)

Implementing Data Models and Reports with Microsoft SQL Server (466)

Introducing Microsoft SQL Server 2016 R Services. Julian Lee Advanced Analytics Lead Global Black Belt Asia Timezone

SQL Server Machine Learning Marek Chmel & Vladimir Muzny

Phillip Labry Sr. BI Engineer IT development for over 25 years Developer, DBA, BI Consultant Experience with Manufacturing, Telecom, Banking, Retail,

7 Techniques for Data Dimensionality Reduction


USERS CONFERENCE Copyright 2016 OSIsoft, LLC

Querying Data with Transact-SQL

Ivy s Business Analytics Foundation Certification Details (Module I + II+ III + IV + V)

17/05/2017. What we ll cover. Who is Greg? Why PaaS and SaaS? What we re not discussing: IaaS

Querying Data with Transact-SQL

Azure Data Factory VS. SSIS. Reza Rad, Consultant, RADACAD

Course Outline. Querying Data with Transact-SQL Course 20761B: 5 days Instructor Led

Performance Troubleshooting Made Easier

Microsoft Querying Data with Transact-SQL - Performance Course

APPLICATION OF SOFTMAX REGRESSION AND ITS VALIDATION FOR SPECTRAL-BASED LAND COVER MAPPING

CS 229 Project Report:

Querying Data with Transact-SQL

Implementing Data Models and Reports with Microsoft SQL Server Exam Summary Syllabus Questions

Evaluation Measures. Sebastian Pölsterl. April 28, Computer Aided Medical Procedures Technische Universität München

ETL Best Practices and Techniques. Marc Beacom, Managing Partner, Datalere

Microsoft vision for a new era

Implementing Data Models and Reports with Microsoft SQL Server 2012

My name is Brian Pottle. I will be your guide for the next 45 minutes of interactive lectures and review on this lesson.

##SQLSatMadrid. Project [Vélib by Cortana]

Querying Data with Transact-SQL

EMEA USERS CONFERENCE BERLIN, GERMANY. Copyright 2016 OSIsoft, LLC

SSAS Multidimensional vs. SSAS Tabular Which one do I choose?

Deploying, Managing and Reusing R Models in an Enterprise Environment

Predictive Analysis: Evaluation and Experimentation. Heejun Kim

Querying Data with Transact-SQL

Data Science Course Content

Where Does R Fit Into Your SQL Server Stack? Stacia Varga blog.datainspirations.com

Duration Level Technology Delivery Method Training Credits. Classroom ILT 5 Days Intermediate SQL Server

Azure SQL Database. Indika Dalugama. Data platform solution architect Microsoft datalake.lk

COURSE 20466D: IMPLEMENTING DATA MODELS AND REPORTS WITH MICROSOFT SQL SERVER

Python With Data Science

MICROSOFT BUSINESS INTELLIGENCE (MSBI: SSIS, SSRS and SSAS)

"Charting the Course... MOC C: Querying Data with Transact-SQL. Course Summary

Data Science. Data Analyst. Data Scientist. Data Architect

10778A: Implementing Data Models and Reports with Microsoft SQL Server 2012

TFS for SQL/BI Developers. Dave Fackler Business Intelligence

Tutorials Case studies

R For Sql Developers. Kiran Math

Play with Python: An intro to Data Science

20761C: Querying Data with Transact-SQL

MIT Samberg Center Cambridge, MA, USA. May 30 th June 2 nd, by C. Rea, R.S. Granetz MIT Plasma Science and Fusion Center, Cambridge, MA, USA

Business Club. Decision Trees

Citizen Data Scientist is the new Data Analyst

Welcome to the IBM IIS Tech Talk

Filtering Bug Reports for Fix-Time Analysis

Use of Synthetic Data in Testing Administrative Records Systems

EPL451: Data Mining on the Web Lab 5

Machine learning algorithms for datasets popularity prediction

First Look Showcase. Expanding our prevention, detection and response solutions. Marco Rottigni Chief Technical Security Officer, Qualys, Inc.

Querying Data with Transact-SQL

Cornerstone 7. DoE, Six Sigma, and EDA

20761B: QUERYING DATA WITH TRANSACT-SQL

OSIsoft Cloud Services Core Infrastructure for Developing Partner Applications

MSBI. Business Intelligence Contents. Data warehousing Fundamentals

Function Algorithms: Linear Regression, Logistic Regression

Oliver Engels & Tillmann Eitelberg. Big Data! Big Quality?

First Look Showcase. Expanding our prevention, detection and response solutions. Sumedh Thakar Chief Product Officer, Qualys, Inc.

Week 1 Unit 1: Introduction to Data Science

Implementing Operational Analytics Using Big Data Technologies to Detect and Predict Sensor Anomalies

20466C - Version: 1. Implementing Data Models and Reports with Microsoft SQL Server

Weka ( )

HPE ALM Standardization as a Precursor for Data Warehousing March 7, 2017

Learning Objectives for Data Concept and Visualization

What s New in Spotfire DXP 1.1. Spotfire Product Management January 2007

DATA MINING AND MACHINE LEARNING. Lecture 6: Data preprocessing and model selection Lecturer: Simone Scardapane

Reza Rad. Power Query and M Beyond Limits

Transcription:

Andrea Martorana Tusa Failure prediction for manifacturing industry

Event Sponsors Expo Sponsors Expo Light Sponsors

Speaker Info First name: Andrea. Last name: Martorana Tusa. Italian, working by Widex a danish company which manufactures hearing aids, as BI Specialist. Previously worked for 15 years as BI developer in an italian bank. Focused on database development, datawarehousing, cube development, reporting, data analysis, etc. Speaker at SQL Saturdays, and other community-driven events in Europe, (MS Cloud Summit, SQL Konferenz, SQL Nexus, SQL Days, Dataminds Connect...). Speaker in webinars for PASS Italian VC, DW/BI VC. Author for sqlservercentral.com, sqlshack.com, UGISS (User Group Italiano SQL Server).

Agenda R in SQL Server 2016 R for predictive maintenance Predicting failure. Build predictive models Scoring Output of R in SSMS, SSRS R in Power BI for data analysis and visualization

SQL Server Machine Learning Services SQL Server Machine Learning Services is an engine embedded into a SQL Server database, to deliver advanced analytics calculations and perfom data science operations. SQL Server Machine Learning Services is available from SQL Server 2017. Into the 2016 release it has been introducted the ability to execute R scripts. From 2017 release SQL Server can execute Python code too.

R R is the most common open source programming language for data analysis and statistics.

R in SQL Server Available from 2016 release. Two flavors. Options available during installation: R Services (In-Database) integrated directly into SQL Server engine. Microsoft R Server a standalone R server installed alongside with the database but externally. In addition there is a community edition Microsoft R Open and a community client Microsoft R Client.

R in SQL Server Scalability and performance Any R script is executed by calling a stored procedure, and the results are returned as tabular results directly to SQL Server, making it easy to generate or consume analytics from any application that can send a query to SQL Server. Performance optimization is based on scalability and parallelization. Two packages especially are available for handling resource governance inside SQL Server: RevoScaleR a set of functions for processing, analyzing, querying data with fast perfomances and scalability. RevoPemarR for writing custom parallel algorithms.

R in SQL Server Execute R script within SQL Server R scripts are invoked by a new system stored procedure sp_execute_external_script to embed R (or Python) code into a format suitable for SQL Server. The stored procedure executes the scripts and retrieves the outcome. Some parameters are passed to the sp in order to define, language, context, input data, etc

R in SQL Server EXEC sp_execute_external_script @language =N'R', @script=n'outputdataset<-inputdataset', @input_data_1 =N'SELECT 1 AS hello' WITH RESULT SETS (([hello] int not null)); GO Language declaration R script Input data Resultset from R The above R script generates the following outcome

R in SQL Server EXEC sp_execute_external_script @language =N'R', @script=n'outputdataset<-inputdataset', @input_data_1 =N'SELECT 1 AS hello' WITH RESULT SETS (([hello] int not null)); N.B.! All the output from R to SQL Server, must return the data as a data.frame! Any other type of object that you generate in your script must be converted to a data frame if you want to output it as part of the stored procedure results.

Predictive maintenance for manifacturing industry Predictive modeling is the process of using advanced statistics and probability algorithms to predict outcomes, based on a pretrained and built model or function. * Predictive maintenance solutions can provide key performance indicators about health state and lifecycle for products in manifacturing industries. Some use cases could be: Aircraft component failure Wind turbine failure Circuit breaker failure And, of course.. Hearing aids * Tomaz Kastrun, Julie Koesmarno. SQL Server 2017 Machine Learning Services with R. Packt Publisher

Predictive maintenance for manifacturing industry R & SQL Server can be used together for building a predictive model to address your business needs. For example, we want to predict the probability of failure for a bicycle component produced by the company Adventure Works. A predictive maintenance solution helps reducing repair costs and increasing the lifecycle of our cycles. These models also give insights on correlations among data, helping to reveal patterns or outliers in the production process.

Predictive maintenance for manifacturing industry Tipical problems addressed by a predictive maintenance solution: Predict Time to Failure (TTF) for a device Predict which component has the highest likelihood to fail Predict if an asset will fail in different time windows

Predictive model for R in SQL Server A predictive model for R in SQL Server is made of the following steps: Data collection Data preparation Prepare a model (for example for regression) Train the model Perform scoring and predictions Visualization output

Data collection The common data elements for failure and predictive maintenance calculations are: Failure data history Maintenance history Device conditions and usage, for example data collected by sensors Device technical specifications

Data preparation Before getting into any type of analytical process, usually some operations must be performed on data in order to have it the way we need: cleansing, normalization, pre-processing, aggregation, mapping

Prepare a Model A model is based on R statistical and analytical functions to explore data and relationships between two or more variables. Usually the first relationship to be investigated is linear regression, i.e. the nature of relationship between two variables. It serves to estimate the Remaining Useful Life (RUL) of an asset. Other common models are: Binary classification. The task of classifying the elements of a given set into two groups (predicting which group each one belongs to) on the basis of a classification rule. Multi-class classification. The task of classifying elements of a given set into three or more classes. Receiver Operating Characteristic (ROC). A curve created by plotting the true positive rate against the false positive rate at various threshold settings. It is used to calculate the accuracy of a test.

Train a Model A model must learn by data. Training a model means makes it smart enough to elaborate predictions by passing datasets in the same format of the test one. To achieve the task, tipically a percentage of the dataset is used for training/test/validation. The ratio between test and production data varies according to your business model, experience, data quality. It could be 60/40, 70/30, etc A good practice is to test more than one model and analyze the returned values to choose the one that performs best. Once the model is set up and trained, it s convenient to save it as stored procedure and store the data in a table for further reuse.

Prediction and scoring Once the model is set up it s possible to start with predictions. Call a stored procedure passing parameters and get predicted values. Values are numbers which can be expressed as score, a real number between 0 and 1. By default, scoring values above 0.5 are labelled positive and below negative. But the threshold can be modified according to our needs, experience, sensibility

Demo Linear regression model in R studio Descriptive statistics with R in SSMS Linear regression model with R in SSMS Multivariate analysis Analysis of Variance Binary and multi class models Plotting output in Reporting Services Models and output in Power BI

Example of architecture for a predictive maintenance solution Continuous cycle of: - data ingestion - feature generation - prediction - visualization

Q&A Thanks

References Tomaz Kastrun, Julie Koesmarno. SQL Server 2017 Machine Learning Services with R. Packt https://docs.microsoft.com/en-us/sql/advanced-analytics/what-is-sql-server-machine-learning?view=sql-server-2017 https://docs.microsoft.com/en-us/azure/machine-learning/team-data-science-process/cortana-analytics-playbook-predictivemaintenance https://gallery.azure.ai/tutorial/predictive-maintenance-template-with-sql-server-r-services-1 https://github.com/microsoft/sql-server-r-services-samples/blob/master/predictivemaintenance/sqlr/readme.md