GithubHelp home page GithubHelp logo

rlugojr / sql-server-r-services-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/sql-server-r-services-samples

0.0 2.0 0.0 135.79 MB

Advanced analytics samples and templates using SQL Server R Services

SQLPL 10.44% PowerShell 20.61% R 61.46% PLpgSQL 6.49% Batchfile 0.17% PLSQL 0.83%

sql-server-r-services-samples's Introduction

#Machine Learning Templates with SQL Server 2016 R Services

In these examples, we will demonstrate how to develop and deploy end-to-end advanced analytics solutions with SQL Server 2016 R Services.

Develop models in R IDE. SQL Server 2016 R services allows Data Scientists to develop solutions in an R IDE (such as RStudio, Visual Studio R Tools) with Open Source R or Microsoft R Server, using data residing in SQL Server, and computing done in-database.

Operationalize models in SQL. Once the model development is completed, the model (data processing, feature engineering, training, saved models, and production scoring) can be deployed to SQL Server using T-SQL Stored Procedures, which can be run within SQL environment (such as SQL Server Management Studio) or called by applications to make predictions.

Machine Learning Templates. We have developed a number of templates for solving specific machine learning problems with SQL Server R Services. These templates provides a higher starting point and aims to enable users to quickly build and deploy solutions. Each template includes the following components:

  • Predefined data schema applicable to the specific domain
  • Domain specific data processing and feature engineering steps
  • Preselected *training *algorithms fit to the specific domain
  • Domain specific evaluation metrics where applicable
  • Prediction (scoring) in production.

The available templates are listed below. Please check back often, as there will be new templates added periodically.

  • Predictive Maintenance. Predict machine failures.
  • Customer Churn Prediction. Predict when a customer churn happens.
  • Online Purchase Fraud Detection. Predict if an online purchase transactions is fraudulent.
  • Energy Demand Forecasting. Forecast electricity demand of multiple regions.
  • Retail Forecasting Forecast the product sales for a retail store.
  • Campaign Management Predict when and how to contact potential customers.

Templates with SQL Server R Services. In these templates, we show the two version of implementations:

  • Development Code in R IDE
  • Operationalization In SQL

The following is the directory structure for each template:

  • Data This contains the provided sample data for each application.
  • R This contains the R development code (Microsoft R Server). It runs in R IDE, with computation being done in-database (by setting compute context to SQL Server).
  • SQLR This contains the Stored SQL procedures from data processing to model deployment. It runs in SQL environment. A Powershell script is provided to invoke the modeling steps end-to-end.

Performance Turning. This folds provide a few tips on how to improve performance of running R script in SQL Server compute context.

NOTE: Please don't use "Download ZIP" to get this repository, as it will change the line endings in the data file. Use "git clone" to get a local copy of this repository.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

sql-server-r-services-samples's People

Contributors

danielleodean avatar hlums avatar jaymathe avatar kganesan-ms avatar msftgits avatar olgaliak avatar raghoshmsft avatar saroufimc1 avatar sdgilley avatar xue001 avatar zhixingr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.