SlideShare una empresa de Scribd logo
Machine Learning con SQL Server
www.triggerdb.com
http://blog.triggerdb.com/maxi
BIOGRAPHY POINT THREE
Especialista en Data Platform con mas de 15 años de experiencia en
trabajos de (tuning – seguridad – migraciones – Desarrollo – BI – Alta
disponibilidad – Big data y Machine Learning
Maximiliano Accotto
BIOGRAPHY POINT ONE
Owner TriggerDB Consulting SRL | www.triggerdb.com
BIOGRAPHY POINT TWO
Microsoft MVP Data Platform desde el año 2005, miembro de SQLPass
Argentina y speaker para Microsoft en diferentes eventos desde el
año 2005
https://twitter.com/maxiaccotto
https://www.linkedin.com/in/maxiaccotto/
Acerca de TriggerDB Consulting
Nacimos en Argentina en el año 2005, desde entonces estamos ayudando a distintas organizaciones en el mundo en el
manejo y entrenamiento de las plataformas de datos de Microsoft (SQL Server, PowerBI, Azure, Big Data,etc) con la meta
de traspasarles a nuestros clientes los conocimientos adquiridos día a día.
Somos Microsoft Partner certificados en Data platform / Data Analytics y PowerBI
Líneas de Contacto www.triggerdb.com
Info@triggerdb.com
https://www.facebook.com/triggerdb/
¿Que es machine Learning?
Es una rama de la inteligencia artificial cuyo objetivo es desarrollar
técnicas que permitan a las computadoras aprender.
Regular Database + App Intelligence Database + App
Application +
Intelligence
Database
Application
Intelligence
+ Database
VS
¿Porque ML en SQL Server?
Eliminar el movimiento de datos
Operación ML scripts y modelos
Performance y escalabilidad Enterprise
SQL Transformations
Relational data
Analytics library
Ahora
Attribute Selection
sp_execute_external_script
‘R code’
Attribute Selection Tool
C++/R
Segmentation Tool
C++/R
Segmentation
sp_execute_external_script
‘R code’
Scoring
sp_execute_external_script
‘R code’
Data
tables
SQL Server
SQL Server
Stored
Proc
Data
tables
Antes
SQL Server Machine Learning Services
• SQL Server 2016
• R support (3.2.2 version)
• Microsoft R Server
• SQL Server 2017
• Scoring native en TSQL usando PREDICT function (+Linux
support)
• EXTERNAL LIBRARY DDL para el manejo de paquetes R
• Ejecucion en batch para la entrada de datos
• Soporte para R (3.3.3 version)
• Soporte para Python (Anaconda 3.5.2)
Machine Learning Server
• Soporte Multi-plataforma
• Windows, Linux, Hadoop, SQL Server
• Microsoft R Server
• RevoScaleR, MicrosoftML, olapR, sqlrutils packages
• Uso de Web services para operar.
• Microsoft Machine Learning Server
• Soporte de R & Python
• revoscalepy, microsoftml python libraries
• rxExecBy
Comparación ScaleR Performance
 US flight data for 20 years
 Linear Regression on Arrival Delay
 Run on 4 core laptop, 16GB RAM & 500GB SSD
Any R/Python
IDE
Data Scientist
Workstation
Script
Results
Execution
1
3
Data Scientists - Exploración de Datos y Desarrollo de Modelos
SQL Server
2
R/Python Runtime
Machine Learning
Services
train <- RxSqlServerData(query,
connectionString, computeContext)
rxLogit(formula, train)
Application exec sp_execute_external_script
@language = ‘Python’
, @script =
-- Python code --
The stored procedure
contains R or Python code
and executes in-database
Application Developer - Operacionalización de
modelos
Stored Proc call
Results
1
3
Execution
SQL Server
2
R/Python Runtime
Machine Learning
Services
Trabajo del DBA: Habilitar ML en SQL
Server
Enable External scripts
– Exec sp_configure ‘external
scripts enabled’, 1
– RCONFIGURE
SQL Server 2016
O superior
SP_execute_external_script
EXEC sp_execute_external_script
@language = N’R’,
@script = N’[Codigo]’,
@input_data_1 = N’[SQL input]’
[ , @input_data_1_name = N‘InputDataSet’ ]
[ , @output_data_1_name = N’OutputDataSet’ ]
[ , @params = N’parameter’ ]
WITH RESULT SETS (([SQL output]));
input_data_1_name and
output_data_1_name are optional
and default to InputDataSet and
OutputDataSet respectively
Operationalized R
EXEC sp_execute_external_script
@language = N’R’,
@script = N’[R code goes here]’,
@input_data_1 = N’[SQL input]’
[ , @input_data_1_name = N‘InputDataSet’ ]
[ , @output_data_1_name = N’OutputDataSet’ ]
[ , @params = N’parameter’ ]
WITH RESULT SETS (([SQL output]));
If output is a model or plot,
specify varbinary(max) in
WITH RESULT SETS
Tipos de salida
1. Dataset
• Standard resultset of rows and columns
• Data types will vary
2. Plot
• Static images
• Binary
3. Model
• Trained models such as linear regression, naïve bayes, etc.
• Binary
Output a Dataset
Output a Plot
Output a Model
Realtime Predictions usando Scoring nativo
• PREDICT function
• No depende de R o Python runtime
• Habilitado on SQL Server tanto en Windows como Linux
• Uso
• Single or small number of rows scoring
• Highly concurrent scoring scenarios
• Predict during INSERT, UPDATE, MERGE statements
• Requirements
• Models built using RevoScaleR or revoscalepy
• rxLinMod, rxLogit, rxBTrees, rxDTree, rxDForest
• Serialized using rxSerializeModel (R) or rx_serialize_model (Python)
PREDICT syntax
1,000,000 predictions per second
https://blogs.technet.microsoft.com/dataplatforminsider/2016/10/11/1000000-predictions-per-
second/
Links de interés
https://microsoft.github.io/sql-ml-tutorials/
https://blogs.msdn.microsoft.com/mlserver/
https://blogs.technet.microsoft.com/machinelearning/
Próximos eventos
Curso online SQL Server performance Tuning (agosto 2018)
http://www.triggerdb.com/event/curso-a-distancia-performance-y-tuning-sql-server/
Curso online PowerBI (septiembre 2018)
http://www.triggerdb.com/event/curso-powerbi-a-distancia/
Muchas gracias
Triggerdb.com
info@triggerdb.com
Publicidad

Más contenido relacionado

Similar a Machine Learning en SQL Server (20)

Microsoft machine learning
Microsoft machine learningMicrosoft machine learning
Microsoft machine learning
Maximiliano Accotto
 
Caracteristicas de dbms_SQL SERVER 2008
Caracteristicas de dbms_SQL SERVER 2008Caracteristicas de dbms_SQL SERVER 2008
Caracteristicas de dbms_SQL SERVER 2008
Stalin Eduardo Tusa Vitar
 
Contrastación Sql 2005 y 2008
Contrastación Sql 2005 y 2008Contrastación Sql 2005 y 2008
Contrastación Sql 2005 y 2008
Luis Vázquez
 
Evolucion de PostgreSQL hasta 9.4
Evolucion de PostgreSQL hasta 9.4Evolucion de PostgreSQL hasta 9.4
Evolucion de PostgreSQL hasta 9.4
Anthony Sotolongo
 
Escribiendo código T-SQL eficientemente
Escribiendo código T-SQL eficientementeEscribiendo código T-SQL eficientemente
Escribiendo código T-SQL eficientemente
Joseph Lopez
 
GOOGLE SPREADSHEET avanzado para análisis y reporting SEO
GOOGLE SPREADSHEET avanzado para análisis y reporting SEOGOOGLE SPREADSHEET avanzado para análisis y reporting SEO
GOOGLE SPREADSHEET avanzado para análisis y reporting SEO
José B. Moreno Suárez
 
BD_EQ1_INVESTIGACION_APORTACION_SQLSERVER2008EXPRESS_TODOS
BD_EQ1_INVESTIGACION_APORTACION_SQLSERVER2008EXPRESS_TODOSBD_EQ1_INVESTIGACION_APORTACION_SQLSERVER2008EXPRESS_TODOS
BD_EQ1_INVESTIGACION_APORTACION_SQLSERVER2008EXPRESS_TODOS
guestfd36060
 
Tarea 1 bd
Tarea 1 bdTarea 1 bd
Tarea 1 bd
alimeth27
 
Introduction to Machine Learning with Azure
Introduction to Machine Learning with AzureIntroduction to Machine Learning with Azure
Introduction to Machine Learning with Azure
Alan Koo
 
Polybase y su uso en la integración de almacenes de datos
Polybase y su uso en la integración de almacenes de datosPolybase y su uso en la integración de almacenes de datos
Polybase y su uso en la integración de almacenes de datos
SpanishPASSVC
 
Global Azure Bootcamp 2016 Bogota SQL2016 dba IaaS PaaS v4
Global Azure Bootcamp 2016 Bogota SQL2016 dba IaaS PaaS v4Global Azure Bootcamp 2016 Bogota SQL2016 dba IaaS PaaS v4
Global Azure Bootcamp 2016 Bogota SQL2016 dba IaaS PaaS v4
Julián Castiblanco
 
24 HOP edición Español - Patrones de escalalidad en microsoft azure sql datab...
24 HOP edición Español - Patrones de escalalidad en microsoft azure sql datab...24 HOP edición Español - Patrones de escalalidad en microsoft azure sql datab...
24 HOP edición Español - Patrones de escalalidad en microsoft azure sql datab...
SpanishPASSVC
 
SEMANA 1 Introduccion.pptx
SEMANA 1 Introduccion.pptxSEMANA 1 Introduccion.pptx
SEMANA 1 Introduccion.pptx
LiuPholRamosFernndez
 
Estimacion agil proyectos Software Scrum
Estimacion agil proyectos Software ScrumEstimacion agil proyectos Software Scrum
Estimacion agil proyectos Software Scrum
Juan Carlos Herrera Manterola
 
Estimacion agil proyectos Software Scrum
Estimacion agil proyectos Software ScrumEstimacion agil proyectos Software Scrum
Estimacion agil proyectos Software Scrum
Juan Carlos Herrera Manterola
 
ETL: Logging y auditoría en SSIS
ETL: Logging y auditoría en SSISETL: Logging y auditoría en SSIS
ETL: Logging y auditoría en SSIS
SolidQ
 
Conviértete en un PowerDBA con PowerShell
Conviértete en un PowerDBA con PowerShellConviértete en un PowerDBA con PowerShell
Conviértete en un PowerDBA con PowerShell
Enrique Puig
 
GAIBT LaPaz - Serverless Machine Learning.pptx
GAIBT LaPaz - Serverless Machine Learning.pptxGAIBT LaPaz - Serverless Machine Learning.pptx
GAIBT LaPaz - Serverless Machine Learning.pptx
Luis Beltran
 
Novedades sql server 2008 para developers
Novedades sql server 2008 para developersNovedades sql server 2008 para developers
Novedades sql server 2008 para developers
Enrique Catala Bañuls
 
slides-sql_30c44e4f-cb57-473d-bc66-4b2ba79b72a1.pptx
slides-sql_30c44e4f-cb57-473d-bc66-4b2ba79b72a1.pptxslides-sql_30c44e4f-cb57-473d-bc66-4b2ba79b72a1.pptx
slides-sql_30c44e4f-cb57-473d-bc66-4b2ba79b72a1.pptx
AdrianAntonio29
 
Contrastación Sql 2005 y 2008
Contrastación Sql 2005 y 2008Contrastación Sql 2005 y 2008
Contrastación Sql 2005 y 2008
Luis Vázquez
 
Evolucion de PostgreSQL hasta 9.4
Evolucion de PostgreSQL hasta 9.4Evolucion de PostgreSQL hasta 9.4
Evolucion de PostgreSQL hasta 9.4
Anthony Sotolongo
 
Escribiendo código T-SQL eficientemente
Escribiendo código T-SQL eficientementeEscribiendo código T-SQL eficientemente
Escribiendo código T-SQL eficientemente
Joseph Lopez
 
GOOGLE SPREADSHEET avanzado para análisis y reporting SEO
GOOGLE SPREADSHEET avanzado para análisis y reporting SEOGOOGLE SPREADSHEET avanzado para análisis y reporting SEO
GOOGLE SPREADSHEET avanzado para análisis y reporting SEO
José B. Moreno Suárez
 
BD_EQ1_INVESTIGACION_APORTACION_SQLSERVER2008EXPRESS_TODOS
BD_EQ1_INVESTIGACION_APORTACION_SQLSERVER2008EXPRESS_TODOSBD_EQ1_INVESTIGACION_APORTACION_SQLSERVER2008EXPRESS_TODOS
BD_EQ1_INVESTIGACION_APORTACION_SQLSERVER2008EXPRESS_TODOS
guestfd36060
 
Introduction to Machine Learning with Azure
Introduction to Machine Learning with AzureIntroduction to Machine Learning with Azure
Introduction to Machine Learning with Azure
Alan Koo
 
Polybase y su uso en la integración de almacenes de datos
Polybase y su uso en la integración de almacenes de datosPolybase y su uso en la integración de almacenes de datos
Polybase y su uso en la integración de almacenes de datos
SpanishPASSVC
 
Global Azure Bootcamp 2016 Bogota SQL2016 dba IaaS PaaS v4
Global Azure Bootcamp 2016 Bogota SQL2016 dba IaaS PaaS v4Global Azure Bootcamp 2016 Bogota SQL2016 dba IaaS PaaS v4
Global Azure Bootcamp 2016 Bogota SQL2016 dba IaaS PaaS v4
Julián Castiblanco
 
24 HOP edición Español - Patrones de escalalidad en microsoft azure sql datab...
24 HOP edición Español - Patrones de escalalidad en microsoft azure sql datab...24 HOP edición Español - Patrones de escalalidad en microsoft azure sql datab...
24 HOP edición Español - Patrones de escalalidad en microsoft azure sql datab...
SpanishPASSVC
 
ETL: Logging y auditoría en SSIS
ETL: Logging y auditoría en SSISETL: Logging y auditoría en SSIS
ETL: Logging y auditoría en SSIS
SolidQ
 
Conviértete en un PowerDBA con PowerShell
Conviértete en un PowerDBA con PowerShellConviértete en un PowerDBA con PowerShell
Conviértete en un PowerDBA con PowerShell
Enrique Puig
 
GAIBT LaPaz - Serverless Machine Learning.pptx
GAIBT LaPaz - Serverless Machine Learning.pptxGAIBT LaPaz - Serverless Machine Learning.pptx
GAIBT LaPaz - Serverless Machine Learning.pptx
Luis Beltran
 
Novedades sql server 2008 para developers
Novedades sql server 2008 para developersNovedades sql server 2008 para developers
Novedades sql server 2008 para developers
Enrique Catala Bañuls
 
slides-sql_30c44e4f-cb57-473d-bc66-4b2ba79b72a1.pptx
slides-sql_30c44e4f-cb57-473d-bc66-4b2ba79b72a1.pptxslides-sql_30c44e4f-cb57-473d-bc66-4b2ba79b72a1.pptx
slides-sql_30c44e4f-cb57-473d-bc66-4b2ba79b72a1.pptx
AdrianAntonio29
 

Más de Maximiliano Accotto (20)

SQL Server 2019 Big Data Cluster
SQL Server 2019 Big Data ClusterSQL Server 2019 Big Data Cluster
SQL Server 2019 Big Data Cluster
Maximiliano Accotto
 
Modernizando plataforma de bi
Modernizando plataforma de biModernizando plataforma de bi
Modernizando plataforma de bi
Maximiliano Accotto
 
Sql server machine learning
Sql server machine learningSql server machine learning
Sql server machine learning
Maximiliano Accotto
 
Solucion de BI en Azure
Solucion de BI en AzureSolucion de BI en Azure
Solucion de BI en Azure
Maximiliano Accotto
 
Seguridad en sql server 2016 y 2017
Seguridad en sql server 2016 y 2017Seguridad en sql server 2016 y 2017
Seguridad en sql server 2016 y 2017
Maximiliano Accotto
 
Seguridad en sql server 2016 y 2017
Seguridad en sql server 2016 y 2017Seguridad en sql server 2016 y 2017
Seguridad en sql server 2016 y 2017
Maximiliano Accotto
 
Sql 2016 2017 full
Sql 2016   2017 fullSql 2016   2017 full
Sql 2016 2017 full
Maximiliano Accotto
 
SQL on linux
SQL on linuxSQL on linux
SQL on linux
Maximiliano Accotto
 
Sql 2017 net raf
Sql 2017  net rafSql 2017  net raf
Sql 2017 net raf
Maximiliano Accotto
 
Net conf uy 2017 sql 2017
Net conf uy 2017   sql 2017Net conf uy 2017   sql 2017
Net conf uy 2017 sql 2017
Maximiliano Accotto
 
Machine Learning en SQL Server
Machine Learning en SQL ServerMachine Learning en SQL Server
Machine Learning en SQL Server
Maximiliano Accotto
 
SQL on Azure
SQL on AzureSQL on Azure
SQL on Azure
Maximiliano Accotto
 
Bootcamp 2017 - SQL Server on Linux
Bootcamp 2017 - SQL Server on LinuxBootcamp 2017 - SQL Server on Linux
Bootcamp 2017 - SQL Server on Linux
Maximiliano Accotto
 
SQL Linux - Instalación
SQL Linux - Instalación SQL Linux - Instalación
SQL Linux - Instalación
Maximiliano Accotto
 
Feliz 2016 ppt
Feliz 2016 pptFeliz 2016 ppt
Feliz 2016 ppt
Maximiliano Accotto
 
Auditoria performance SQL Server
Auditoria performance SQL ServerAuditoria performance SQL Server
Auditoria performance SQL Server
Maximiliano Accotto
 
Workshop sql
Workshop sqlWorkshop sql
Workshop sql
Maximiliano Accotto
 
Sql 2016
Sql 2016Sql 2016
Sql 2016
Maximiliano Accotto
 
TriggerDB Brochure
TriggerDB BrochureTriggerDB Brochure
TriggerDB Brochure
Maximiliano Accotto
 
Dba tuning
Dba tuningDba tuning
Dba tuning
Maximiliano Accotto
 
Publicidad

Último (20)

Presentación Propuesta de proyecto Minimalista Turquesa.pdf
Presentación Propuesta de proyecto Minimalista Turquesa.pdfPresentación Propuesta de proyecto Minimalista Turquesa.pdf
Presentación Propuesta de proyecto Minimalista Turquesa.pdf
qvqxgpdmn9
 
Informe derrame de agua 01documento en word
Informe derrame de agua 01documento en wordInforme derrame de agua 01documento en word
Informe derrame de agua 01documento en word
FederRengifoGarro
 
LA HISTORIA DESDE 1962 a 1963 en el VATICANO
LA HISTORIA DESDE 1962 a 1963 en el VATICANOLA HISTORIA DESDE 1962 a 1963 en el VATICANO
LA HISTORIA DESDE 1962 a 1963 en el VATICANO
aleprade
 
Diferencias entre Eucariotas y procariotas.pptx
Diferencias entre Eucariotas y procariotas.pptxDiferencias entre Eucariotas y procariotas.pptx
Diferencias entre Eucariotas y procariotas.pptx
RodriguezDanielaAna
 
Ingresos por grupo racial ajustado a PPA (1992,2025,2030,2035 y 2050).pdf
Ingresos por grupo racial ajustado a PPA (1992,2025,2030,2035 y 2050).pdfIngresos por grupo racial ajustado a PPA (1992,2025,2030,2035 y 2050).pdf
Ingresos por grupo racial ajustado a PPA (1992,2025,2030,2035 y 2050).pdf
JC Díaz Herrera
 
PIB PPA por ingreso en zonas geográficas en porcentaje global (2025).pdf
PIB PPA por ingreso en zonas geográficas en porcentaje global (2025).pdfPIB PPA por ingreso en zonas geográficas en porcentaje global (2025).pdf
PIB PPA por ingreso en zonas geográficas en porcentaje global (2025).pdf
JC Díaz Herrera
 
CARIES Y OTRAS ENFERMEDADES SEGUN CODIGO CIE 10.pptx
CARIES Y OTRAS ENFERMEDADES SEGUN CODIGO CIE 10.pptxCARIES Y OTRAS ENFERMEDADES SEGUN CODIGO CIE 10.pptx
CARIES Y OTRAS ENFERMEDADES SEGUN CODIGO CIE 10.pptx
josuepm025
 
LAIVE S.A. - y optimizacion del potencial
LAIVE S.A. -  y optimizacion del potencialLAIVE S.A. -  y optimizacion del potencial
LAIVE S.A. - y optimizacion del potencial
MarjhoriAlexiaOrihue1
 
Análisis y comparaciones de Páginas Web.pptx
Análisis y comparaciones de Páginas Web.pptxAnálisis y comparaciones de Páginas Web.pptx
Análisis y comparaciones de Páginas Web.pptx
igorgomez2021
 
Presentación introducción a la hoja de cálculo
Presentación introducción a la hoja de cálculoPresentación introducción a la hoja de cálculo
Presentación introducción a la hoja de cálculo
Deyna German San Martín
 
MEZCLAS Y METODOS DE SEPARACIÓN DE MEZCLAS.pptx
MEZCLAS Y METODOS DE SEPARACIÓN DE MEZCLAS.pptxMEZCLAS Y METODOS DE SEPARACIÓN DE MEZCLAS.pptx
MEZCLAS Y METODOS DE SEPARACIÓN DE MEZCLAS.pptx
yokolocolove1
 
ANALISIS_TERRENO_FINAL moche area de 30.102m2
ANALISIS_TERRENO_FINAL moche area de 30.102m2ANALISIS_TERRENO_FINAL moche area de 30.102m2
ANALISIS_TERRENO_FINAL moche area de 30.102m2
bjgamers18
 
contextos_socialesssssssssssssssssssssss
contextos_socialessssssssssssssssssssssscontextos_socialesssssssssssssssssssssss
contextos_socialesssssssssssssssssssssss
enoa454
 
plantilla para tesis de arquitectura ---
plantilla para tesis de arquitectura ---plantilla para tesis de arquitectura ---
plantilla para tesis de arquitectura ---
marianavargasdiestra
 
Semana_08.pptx. Análisis sobre los ácidos esteres
Semana_08.pptx. Análisis sobre los ácidos esteresSemana_08.pptx. Análisis sobre los ácidos esteres
Semana_08.pptx. Análisis sobre los ácidos esteres
ddanerycordero
 
PIB PPA por ingreso en zonas geográficas en porcentaje global (650 y 1250).pdf
PIB PPA por ingreso en zonas geográficas en porcentaje global (650 y 1250).pdfPIB PPA por ingreso en zonas geográficas en porcentaje global (650 y 1250).pdf
PIB PPA por ingreso en zonas geográficas en porcentaje global (650 y 1250).pdf
JC Díaz Herrera
 
Guia para la elaboracion de un estudio de riesgo
Guia para la elaboracion de un estudio de riesgoGuia para la elaboracion de un estudio de riesgo
Guia para la elaboracion de un estudio de riesgo
kikReina
 
Miedo escénico, como controlarlo para alcanzar el éxito
Miedo escénico, como controlarlo para alcanzar el éxitoMiedo escénico, como controlarlo para alcanzar el éxito
Miedo escénico, como controlarlo para alcanzar el éxito
MarycristTrejo
 
amenorrea_gori.pptx..........yyhhhhhhhhhh
amenorrea_gori.pptx..........yyhhhhhhhhhhamenorrea_gori.pptx..........yyhhhhhhhhhh
amenorrea_gori.pptx..........yyhhhhhhhhhh
garciajhennyfer85
 
Proceso de flujos de administracion de abastecimiento
Proceso de flujos de administracion de abastecimientoProceso de flujos de administracion de abastecimiento
Proceso de flujos de administracion de abastecimiento
abigailgreassemillas
 
Presentación Propuesta de proyecto Minimalista Turquesa.pdf
Presentación Propuesta de proyecto Minimalista Turquesa.pdfPresentación Propuesta de proyecto Minimalista Turquesa.pdf
Presentación Propuesta de proyecto Minimalista Turquesa.pdf
qvqxgpdmn9
 
Informe derrame de agua 01documento en word
Informe derrame de agua 01documento en wordInforme derrame de agua 01documento en word
Informe derrame de agua 01documento en word
FederRengifoGarro
 
LA HISTORIA DESDE 1962 a 1963 en el VATICANO
LA HISTORIA DESDE 1962 a 1963 en el VATICANOLA HISTORIA DESDE 1962 a 1963 en el VATICANO
LA HISTORIA DESDE 1962 a 1963 en el VATICANO
aleprade
 
Diferencias entre Eucariotas y procariotas.pptx
Diferencias entre Eucariotas y procariotas.pptxDiferencias entre Eucariotas y procariotas.pptx
Diferencias entre Eucariotas y procariotas.pptx
RodriguezDanielaAna
 
Ingresos por grupo racial ajustado a PPA (1992,2025,2030,2035 y 2050).pdf
Ingresos por grupo racial ajustado a PPA (1992,2025,2030,2035 y 2050).pdfIngresos por grupo racial ajustado a PPA (1992,2025,2030,2035 y 2050).pdf
Ingresos por grupo racial ajustado a PPA (1992,2025,2030,2035 y 2050).pdf
JC Díaz Herrera
 
PIB PPA por ingreso en zonas geográficas en porcentaje global (2025).pdf
PIB PPA por ingreso en zonas geográficas en porcentaje global (2025).pdfPIB PPA por ingreso en zonas geográficas en porcentaje global (2025).pdf
PIB PPA por ingreso en zonas geográficas en porcentaje global (2025).pdf
JC Díaz Herrera
 
CARIES Y OTRAS ENFERMEDADES SEGUN CODIGO CIE 10.pptx
CARIES Y OTRAS ENFERMEDADES SEGUN CODIGO CIE 10.pptxCARIES Y OTRAS ENFERMEDADES SEGUN CODIGO CIE 10.pptx
CARIES Y OTRAS ENFERMEDADES SEGUN CODIGO CIE 10.pptx
josuepm025
 
LAIVE S.A. - y optimizacion del potencial
LAIVE S.A. -  y optimizacion del potencialLAIVE S.A. -  y optimizacion del potencial
LAIVE S.A. - y optimizacion del potencial
MarjhoriAlexiaOrihue1
 
Análisis y comparaciones de Páginas Web.pptx
Análisis y comparaciones de Páginas Web.pptxAnálisis y comparaciones de Páginas Web.pptx
Análisis y comparaciones de Páginas Web.pptx
igorgomez2021
 
Presentación introducción a la hoja de cálculo
Presentación introducción a la hoja de cálculoPresentación introducción a la hoja de cálculo
Presentación introducción a la hoja de cálculo
Deyna German San Martín
 
MEZCLAS Y METODOS DE SEPARACIÓN DE MEZCLAS.pptx
MEZCLAS Y METODOS DE SEPARACIÓN DE MEZCLAS.pptxMEZCLAS Y METODOS DE SEPARACIÓN DE MEZCLAS.pptx
MEZCLAS Y METODOS DE SEPARACIÓN DE MEZCLAS.pptx
yokolocolove1
 
ANALISIS_TERRENO_FINAL moche area de 30.102m2
ANALISIS_TERRENO_FINAL moche area de 30.102m2ANALISIS_TERRENO_FINAL moche area de 30.102m2
ANALISIS_TERRENO_FINAL moche area de 30.102m2
bjgamers18
 
contextos_socialesssssssssssssssssssssss
contextos_socialessssssssssssssssssssssscontextos_socialesssssssssssssssssssssss
contextos_socialesssssssssssssssssssssss
enoa454
 
plantilla para tesis de arquitectura ---
plantilla para tesis de arquitectura ---plantilla para tesis de arquitectura ---
plantilla para tesis de arquitectura ---
marianavargasdiestra
 
Semana_08.pptx. Análisis sobre los ácidos esteres
Semana_08.pptx. Análisis sobre los ácidos esteresSemana_08.pptx. Análisis sobre los ácidos esteres
Semana_08.pptx. Análisis sobre los ácidos esteres
ddanerycordero
 
PIB PPA por ingreso en zonas geográficas en porcentaje global (650 y 1250).pdf
PIB PPA por ingreso en zonas geográficas en porcentaje global (650 y 1250).pdfPIB PPA por ingreso en zonas geográficas en porcentaje global (650 y 1250).pdf
PIB PPA por ingreso en zonas geográficas en porcentaje global (650 y 1250).pdf
JC Díaz Herrera
 
Guia para la elaboracion de un estudio de riesgo
Guia para la elaboracion de un estudio de riesgoGuia para la elaboracion de un estudio de riesgo
Guia para la elaboracion de un estudio de riesgo
kikReina
 
Miedo escénico, como controlarlo para alcanzar el éxito
Miedo escénico, como controlarlo para alcanzar el éxitoMiedo escénico, como controlarlo para alcanzar el éxito
Miedo escénico, como controlarlo para alcanzar el éxito
MarycristTrejo
 
amenorrea_gori.pptx..........yyhhhhhhhhhh
amenorrea_gori.pptx..........yyhhhhhhhhhhamenorrea_gori.pptx..........yyhhhhhhhhhh
amenorrea_gori.pptx..........yyhhhhhhhhhh
garciajhennyfer85
 
Proceso de flujos de administracion de abastecimiento
Proceso de flujos de administracion de abastecimientoProceso de flujos de administracion de abastecimiento
Proceso de flujos de administracion de abastecimiento
abigailgreassemillas
 
Publicidad

Machine Learning en SQL Server

  • 1. Machine Learning con SQL Server www.triggerdb.com http://blog.triggerdb.com/maxi
  • 2. BIOGRAPHY POINT THREE Especialista en Data Platform con mas de 15 años de experiencia en trabajos de (tuning – seguridad – migraciones – Desarrollo – BI – Alta disponibilidad – Big data y Machine Learning Maximiliano Accotto BIOGRAPHY POINT ONE Owner TriggerDB Consulting SRL | www.triggerdb.com BIOGRAPHY POINT TWO Microsoft MVP Data Platform desde el año 2005, miembro de SQLPass Argentina y speaker para Microsoft en diferentes eventos desde el año 2005 https://twitter.com/maxiaccotto https://www.linkedin.com/in/maxiaccotto/
  • 3. Acerca de TriggerDB Consulting Nacimos en Argentina en el año 2005, desde entonces estamos ayudando a distintas organizaciones en el mundo en el manejo y entrenamiento de las plataformas de datos de Microsoft (SQL Server, PowerBI, Azure, Big Data,etc) con la meta de traspasarles a nuestros clientes los conocimientos adquiridos día a día. Somos Microsoft Partner certificados en Data platform / Data Analytics y PowerBI Líneas de Contacto www.triggerdb.com [email protected] https://www.facebook.com/triggerdb/
  • 4. ¿Que es machine Learning? Es una rama de la inteligencia artificial cuyo objetivo es desarrollar técnicas que permitan a las computadoras aprender.
  • 5. Regular Database + App Intelligence Database + App Application + Intelligence Database Application Intelligence + Database VS
  • 6. ¿Porque ML en SQL Server? Eliminar el movimiento de datos Operación ML scripts y modelos Performance y escalabilidad Enterprise SQL Transformations Relational data Analytics library
  • 7. Ahora Attribute Selection sp_execute_external_script ‘R code’ Attribute Selection Tool C++/R Segmentation Tool C++/R Segmentation sp_execute_external_script ‘R code’ Scoring sp_execute_external_script ‘R code’ Data tables SQL Server SQL Server Stored Proc Data tables Antes
  • 8. SQL Server Machine Learning Services • SQL Server 2016 • R support (3.2.2 version) • Microsoft R Server • SQL Server 2017 • Scoring native en TSQL usando PREDICT function (+Linux support) • EXTERNAL LIBRARY DDL para el manejo de paquetes R • Ejecucion en batch para la entrada de datos • Soporte para R (3.3.3 version) • Soporte para Python (Anaconda 3.5.2)
  • 9. Machine Learning Server • Soporte Multi-plataforma • Windows, Linux, Hadoop, SQL Server • Microsoft R Server • RevoScaleR, MicrosoftML, olapR, sqlrutils packages • Uso de Web services para operar. • Microsoft Machine Learning Server • Soporte de R & Python • revoscalepy, microsoftml python libraries • rxExecBy
  • 10. Comparación ScaleR Performance  US flight data for 20 years  Linear Regression on Arrival Delay  Run on 4 core laptop, 16GB RAM & 500GB SSD
  • 11. Any R/Python IDE Data Scientist Workstation Script Results Execution 1 3 Data Scientists - Exploración de Datos y Desarrollo de Modelos SQL Server 2 R/Python Runtime Machine Learning Services train <- RxSqlServerData(query, connectionString, computeContext) rxLogit(formula, train)
  • 12. Application exec sp_execute_external_script @language = ‘Python’ , @script = -- Python code -- The stored procedure contains R or Python code and executes in-database Application Developer - Operacionalización de modelos Stored Proc call Results 1 3 Execution SQL Server 2 R/Python Runtime Machine Learning Services
  • 13. Trabajo del DBA: Habilitar ML en SQL Server Enable External scripts – Exec sp_configure ‘external scripts enabled’, 1 – RCONFIGURE SQL Server 2016 O superior
  • 14. SP_execute_external_script EXEC sp_execute_external_script @language = N’R’, @script = N’[Codigo]’, @input_data_1 = N’[SQL input]’ [ , @input_data_1_name = N‘InputDataSet’ ] [ , @output_data_1_name = N’OutputDataSet’ ] [ , @params = N’parameter’ ] WITH RESULT SETS (([SQL output])); input_data_1_name and output_data_1_name are optional and default to InputDataSet and OutputDataSet respectively
  • 15. Operationalized R EXEC sp_execute_external_script @language = N’R’, @script = N’[R code goes here]’, @input_data_1 = N’[SQL input]’ [ , @input_data_1_name = N‘InputDataSet’ ] [ , @output_data_1_name = N’OutputDataSet’ ] [ , @params = N’parameter’ ] WITH RESULT SETS (([SQL output])); If output is a model or plot, specify varbinary(max) in WITH RESULT SETS
  • 16. Tipos de salida 1. Dataset • Standard resultset of rows and columns • Data types will vary 2. Plot • Static images • Binary 3. Model • Trained models such as linear regression, naïve bayes, etc. • Binary
  • 20. Realtime Predictions usando Scoring nativo • PREDICT function • No depende de R o Python runtime • Habilitado on SQL Server tanto en Windows como Linux • Uso • Single or small number of rows scoring • Highly concurrent scoring scenarios • Predict during INSERT, UPDATE, MERGE statements • Requirements • Models built using RevoScaleR or revoscalepy • rxLinMod, rxLogit, rxBTrees, rxDTree, rxDForest • Serialized using rxSerializeModel (R) or rx_serialize_model (Python)
  • 22. 1,000,000 predictions per second https://blogs.technet.microsoft.com/dataplatforminsider/2016/10/11/1000000-predictions-per- second/
  • 24. Próximos eventos Curso online SQL Server performance Tuning (agosto 2018) http://www.triggerdb.com/event/curso-a-distancia-performance-y-tuning-sql-server/ Curso online PowerBI (septiembre 2018) http://www.triggerdb.com/event/curso-powerbi-a-distancia/

Notas del editor

  • #6: 5
  • #11: Microsoft R Server has no data size limits in relation to size of available RAM. When open source R operates on data sets that exceed RAM it will fail. In contrast Microsoft R Server scales linearly well beyond RAM limits and parallel algorithms are much faster. The figure on the left shows the results of a benchmark test comparing the performance of OSR and a ScaleR algorithm. as can be seen on the fgure, When OSR operates on data sets that exceed RAM (about 300K observations in a dataframe), it will fail.  On the other hand it can be seen from the plot that ScaleR has no data size limit in relation to the size of the RAM. The ScaleR algorithm is seen to scales linearly well beyond the limits of the RAM (over 5M observations in a dataframe) and the parallel algorithms are much faster. The table on the right highlights the massive speed boost Microsoft R Server provides when running a linear regression algorithm on 20 years of US flight data. You will also notice that data sets exceeding the 16GB of available RAM failed with memory errors when running the calculations using Open R.
  • #12: Microsoft Tech Summit FY17
  • #13: Microsoft Data Amp