gebeurtenis
31 mrt, 23 - 2 apr, 23
De grootste SQL-, Fabric- en Power BI-leerevenement. 31 maart – 2 april. Gebruik code FABINSIDER om $ 400 te besparen.
Zorg dat u zich vandaag nog registreertDeze browser wordt niet meer ondersteund.
Upgrade naar Microsoft Edge om te profiteren van de nieuwste functies, beveiligingsupdates en technische ondersteuning.
Applies to:
SQL Server 2016 (13.x) only
R Services is a feature in SQL Server 2016 that gives the ability to run R scripts with relational data. You can use open-source packages and frameworks, and the Microsoft R packages for predictive analytics and machine learning. The scripts are executed in-database without moving data outside SQL Server or over the network. This article explains the basics of SQL Server R Services.
Notitie
R Services was renamed to Machine Learning Services in SQL Server 2017 and later, and supports both Python and R.
SQL Server R Services lets you execute R scripts in-database. You can use it to prepare and clean data, do feature engineering, and train, evaluate, and deploy machine learning models within a database. The feature runs your scripts where the data resides and eliminates transfer of the data across the network to another server.
Base distributions of R are included in R Services. You can use open-source packages and frameworks in addition to the Microsoft packages RevoScaleR, MicrosoftML, [olapR]../r/ref-r-olapr.md), and sqlrutils for R.
R Services uses an extensibility framework to run R scripts in SQL Server. Learn more about how this works:
You can use R Services to build and training machine learning and deep learning models within SQL Server. You can also deploy existing models to R Services and use relational data for predictions.
Examples of the type of predictions that you can use SQL Server R Services for, include:
Prediction type | Example |
---|---|
Classification/Categorization | Automatically divide customer feedback into positive and negative categories |
Regression/Predict continuous values | Predict the price of houses based on size and location |
Anomaly Detection | Detect fraudulent banking transactions |
Recommendations | Suggest products that online shoppers may want to buy, based on their previous purchases |
There are two ways to execute R scripts in R Services:
The most common way is to use the T-SQL stored procedure sp_execute_external_script.
You can also use your preferred R client and write scripts that push the execution (referred to as a remote compute context) to a remote SQL Server. See how to set up a data science client R development for more information.
The following lists the versions of the R runtime that are included in SQL Server 2016 R Services.
SQL Server version | Default R runtime versions |
---|---|
SQL Server 2016 RTM - SP2 CU13 | 3.2.2 |
SQL Server 2016 SP2 CU14 and later | 3.2.2 and 3.5.2 |
Cumulative Update (CU) 14 for SQL Server 2016 Service Pack (SP) 2 and later include newer R runtimes. For more information, see Change the default language runtime version.
For other versions of R, or to run Python, use Machine Learning Services for SQL Server 2017 and later.
You can use open-source packages and frameworks, in addition to Microsoft's enterprise packages. Most common open-source R packages are pre-installed in R Services. The following R packages from Microsoft are also included:
Package | Description |
---|---|
RevoScaleR | The primary package for scalable R. Data transformations and manipulation, statistical summarization, visualization, and many forms of modeling. Additionally, functions in this package automatically distribute workloads across available cores for parallel processing. |
MicrosoftML (R) | Adds machine learning algorithms to create custom models for text analysis, image analysis, and sentiment analysis. |
olapR | R functions used for MDX queries against a SQL Server Analysis Services OLAP cube. |
sqlrutils | A mechanism to use R scripts in a T-SQL stored procedure, register that stored procedure with a database, and run the stored procedure from an R development environment. |
Microsoft R Open (retired) | Microsoft R Open (MRO) was the enhanced distribution of R from Microsoft. |
Configure your development tools. You can use:
Write your first R script
gebeurtenis
31 mrt, 23 - 2 apr, 23
De grootste SQL-, Fabric- en Power BI-leerevenement. 31 maart – 2 april. Gebruik code FABINSIDER om $ 400 te besparen.
Zorg dat u zich vandaag nog registreertTraining
Module
Gegevens verkennen en analyseren met R - Training
In deze module verkent, analyseert en visualiseert u gegevens met behulp van de programmeertaal R.
Certificering
Microsoft Gecertificeerd: Azure Data Scientist Associate - Certifications
Beheer gegevensopname en -voorbereiding, modeltraining en implementatie en bewaking van machine learning-oplossingen met Python, Azure Machine Learning en MLflow.
Documentatie
Python- en R-runtimes bijwerken (binding) - SQL Server Machine Learning Services
Upgrade Python- en R-runtimes in SQL Server Machine Learning Services of SQL Server R Services met behulp van sqlbindr.exe om verbinding te maken met Machine Learning Server.