Access blueprints with R¶
This notebook outlines how you can use R to access blueprints from either the Leaderboard or the Repository.
In DataRobot, you can find models as trained blueprints or as blueprints available for training. Trained blueprints are located on the model Leaderboard, and blueprints you may want to train are available in the model Repository.
When you run a project using a mode other than Comprehensive Autopilot, DataRobot first creates blueprints based on the characteristics of your data and puts them in the Repository. Then, it chooses a subset from these to train; when training completes, these are the blueprints you’ll find in the Leaderboard.
At times, after the Leaderboard is populated, it can be useful to train some of those blueprints that DataRobot skipped. For example, you can try a more complex Keras blueprint like Keras Residual AutoInt Classifier using Training Schedule (3 Attention Layers with 2 Heads, 2 Layers: 100, 100 Units). In some cases, you can directly access the trained model through R and retrain it with a different feature list or tune its hyperparameters.
library(datarobot) ConnectToDataRobot(endpoint = "YOUR ENDPOINT", token = "YOUR TOKEN")
Access blueprints from the Leaderboard¶
This example requires that you already have a project. The project ID is in the application's URL and is preceded by
Use the code below to find all blueprints trained for the project.
project <- GetProject(projectId) modelsInLeaderboard <- ListModels(project) modelsInLeaderboard_df <- as.data.frame(modelsInLeaderboard)
View a sample result below. The table provides information for all models built, including type of model (blueprint) and IDs for each model and related blueprint, as well as the feature lists used to build the models, the sample size, and the metric chosen for the validation set. In this case, the metric was LogLoss, so what you see here is the LogLoss.
blueprintsInRepository <- ListBlueprints(project)
This function returns a list of blueprints with their
blueprintId. These blueprints are specifically created for this project, so you’ll also get a projectId column. The API response is converted from a list to a dataframe to make it easier to interpret, as shown below