Ruleset API

class datarobot.models.Ruleset(project_id=None, parent_model_id=None, model_id=None, ruleset_id=None, rule_count=None, score=None)

Represents an approximation of a model with DataRobot Prime

Attributes

id (str) the id of the ruleset
rule_count (int) the number of rules used to approximate the model
score (float) the validation score of the approximation
project_id (str) the project the approximation belongs to
parent_model_id (str) the model being approximated
model_id (str or None) the model using this ruleset (if it exists). Will be None if no such model has been trained.
request_model()

Request training for a model using this ruleset

Training a model using a ruleset is a necessary prerequisite for being able to download the code for a ruleset.

Returns:

job: Job

the job fitting the new Prime model

PrimeFile API

class datarobot.models.PrimeFile(id=None, project_id=None, parent_model_id=None, model_id=None, ruleset_id=None, language=None, is_valid=None)

Represents an executable file available for download of the code for a DataRobot Prime model

Attributes

id (str) the id of the PrimeFile
project_id (str) the id of the project this PrimeFile belongs to
parent_model_id (str) the model being approximated by this PrimeFile
model_id (str) the prime model this file represents
ruleset_id (int) the ruleset being used in this PrimeFile
language (str) the language of the code in this file - see enums.LANGUAGE for possibilities
is_valid (bool) whether the code passed basic validation
download(filepath)

Download the code and save it to a file

Parameters:

filepath: string

the location to save the file to