ML Templates with SQL Server R Services
In this collection, we demonstrate how to develop and deploy end-to-end advanced analytics solutions with SQL Server 2016 R Services.
In these examples, we demonstrate how to develop and deploy end-to-end advanced analytics solutions with [SQL Server 2016 R Services](https://msdn.microsoft.com/en-us/library/mt674876.aspx), which allows the following:
**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:
- **Predictive Maintenance**. Predict machine failures. The template can be found [here][1]. This is the on-prem equivalent of the same template implemented [here](https://gallery.cortanaanalytics.com/Collection/Predictive-Maintenance-Template-3) in Azure Machine Learning Studio.
- **Customer Churn**. Predict when a customer churn happens. This template can be found [here][2]
- **Online Fraud Detection**. Predict if an online purchase transactions is fraudulent. This template can be found [here][3]
- **Energy Demand Forecasting**. Forecast energy (electricity) demands. This template can be found [here][4]
- **Retail Forecasting**. Forecast sales for retail stores. This template can be found [here][5]
[1]: https://github.com/Microsoft/SQL-Server-R-Services-Samples/tree/master/PredictiveMaintenance/
[2]: https://github.com/Microsoft/SQL-Server-R-Services-Samples/tree/master/Churn
[3]: https://github.com/Microsoft/SQL-Server-R-Services-Samples/tree/master/FraudDetection
[4]: https://github.com/Microsoft/SQL-Server-R-Services-Samples/tree/master/EnergyForecasting
[5]:https://github.com/Microsoft/SQL-Server-R-Services-Samples/tree/master/RetailForecasting