Welcome to Using R with DataRobot!

cancel
Showing results for 
Search instead for 
Did you mean: 

Welcome to Using R with DataRobot!

(Article updated November 2020)

This page will help you get started with using the datarobot R client package to interact with DataRobot. You can import data, build models, evaluate metrics, and make predictions right from the R console.

There are several advantages to interacting with DataRobot programmatically:

  • You can set up a series of tasks and walk away while DataRobot and R do the rest.
  • You can get more customized analyses by combining the power of R with the various outputs you can get from DataRobot.
  • You can more easily reproduce prior results with code.

You can find the full documentation of the datarobot R client package here.

Code samples

You can access code samples on our public DataRobot CommunityGitHub. This section lists the currently available samples and provides links to the related GitHub locations.

For data scientists, there are two main code repositories for getting started: API Examples and Tutorials. The contents of both are listed below, but please visit the repos to get the latest details.

Usage

For each respective guide, follow the instructions the related .ipynb or .Rmd file.

Please pay attention to the different DataRobot API Endpoints.

The API endpoint you specify for accessing DataRobot is dependent on the deployment environment, as follows:

The DataRobot API Endpoint is used to connect your IDE to DataRobot.

API Examples for Data Scientists—R

This repository contains R Markdown guides for achieving specific tasks using the API.

Advanced Tuning

  • Advanced Tuning: How to do advanced tuning. R
  • Date/time Partitioning: How to do date/time partitioning. R

Compliance Documentation

  • Getting Compliance Documentation: How to get Compliance Documentation documents. R

Feature Lists Manipulation

  • Advanced Feature Selection: How to do advanced feature selection using all of the models created during a run of DataRobot Autopilot. R
  • Feature Lists Manipulation: How to create and manipulate custom feature lists and use them for training. R
  • Transforming Feature Type: How to transform feature types. R

Initiating Projects

  • Starting a Binary Classification Project: How to initiate a DataRobot project for a Binary Classification target. R
  • Starting a Multiclass Project: How to initiate a DataRobot project for a Multiclass Classification target. R
  • Starting a Project with Selected Blueprints: How to initiate a DataRobot project manually where the end user has the option to choose which models/blueprints to initiate. R
  • Starting a Regression Project: How to initiate a DataRobot project for a numerical target. R
  • Starting a Time Series Project: How to initiate a DataRobot project for a time series problem. This R Markdown guide also covers calendars and feature settings for time series projects. R

Making Predictions

  • Getting Predictions and Prediction Explanations: How to get predictions and prediction explanations out of a trained model. R
  • Prediction Explanation Clustering: How to create clusters of prediction explanations to better understand patterns in your data. R

Model Evaluation

  • Getting Confusion Chart: How to get the Confusion Matrix Chart. R
  • Getting Feature Impact: How to get the Feature Impact scores. R
  • Getting Lift Chart: How to get the Lift Chart. R
  • Getting Partial Dependence: How to get partial dependence. R
  • Getting ROC Curve: How to get the ROC Curve data. R
  • Getting Word Cloud: How to pull the word cloud data. R

Model Management

  • Model Management and Monitoring: How to manage models through the API. This includes deployment, replacement, deletion, and monitoring capabilities. R

Tutorials for Data Scientists—R

This repository contains various end-to-end use case examples using the DataRobot API. Each use case directory contains usage instructions for its own use.

Classification

  • Predict Hospital Readmissions: Predict which patients are likely to be readmitted within 30 days after being discharged using binary classification. Install the software, find your API token, choose the best model, get the evaluation metrics, and make predictions. R
  • Lead Scoring Bank Marketing: Predict which customers are likely to purchase a product or service in response to a bank telemarketing campaign. Upload data, create a project, get and plot the ROC curve and Feature Impact. Get the holdout predictions. R

DRU

API Training: The DataRobot API Training is targeted at data scientists and motivated individuals with at least basic coding skills who want to take automation with DataRobot to the next level. R

Start by carefully reading the "API Training - Introductory Notebook" . R This notebook will help you learn the basics and provide a concrete overview for the API. Afterwards, go within the /exercises folder and start downloading and solving the exercises.

The list of exercises is as follows:

  • Exercise 1 Feature Selection Curves R
  • Exercise 2. Advanced Feature Manipulation R
  • Exercise 3. Model Documentation R
  • Exercise 4. Beyond AutoPilot R
  • Exercise 5. Model Factory R
  • Exercise 6. Continuous Model Training R
  • Exercise 7. Using a Database R

Model Factories

  • Classification Model Factory: Create a model factory for a binary classification problem using our readmissions dataset. Predict the likelihood of patient readmission. Build a single project and find the best model. Then, build more projects based on admission ID. Find the best model for each subproject. Make this model ready for deployment. R
  • Time Series Model Factory: Create a time series model factory using our store sales multiseries dataset. Set up a time series multiseries project. Get the best model and its performance. Cluster the data and create plots over time. Create a project for each cluster and evaluate the results. R

Time Series

  • Forecasting US COVID-19 Cases Using Time Series: Create an AutoTS model on historical data taken from the US, France, and Spain. Clean and prepare the data. Create the time series project and build models. Forecast 10 days ahead for each country and write the results to a CSV file. R

Visual AI

  • Detecting Droids with DataRobot: Create a Visual AI project to classify images of droids and create a custom shiny application. Build file paths to images and set up folders for VisualAI. Import that data in the platform and create image classification models. Get evaluation metrics and plot them with ggplot. Create a deployment using the prediction server. Make a shiny app that hits the deployment. R

The following video shows an example walkthrough of the R client.

Labels (4)
Version history
Revision #:
29 of 29
Last update:
a week ago
Updated by:
 
Contributors