View source: R/ResidualsChart.R
GetResidualsChart | R Documentation |
Retrieve residuals chart data for a model for a data partition (see DataPartition).
GetResidualsChart(
model,
source = DataPartition$VALIDATION,
fallbackToParentInsights = FALSE
)
model |
dataRobotModel. A DataRobot model object like that returned by |
source |
character. The data partition for which data would be returned. Default is
|
fallbackToParentInsights |
logical. If TRUE, this will return the residuals chart data for the model's parent if the residuals chart is not available for the model and the model has a parent model. |
list with a single object containing residuals chart data whose name matches the source
requested. See DataPartition
for details. This object has the following components:
residualMean. Numeric: the arithmetic mean of the predicted value minus the actual value over the downsampled dataset.
coefficientOfDetermination. Numeric: aka the r-squared value. This value is calculated over the downsampled output, not the full input.
data. data.frame: The rows of chart data in [actual, predicted, residual, rowNumber]
form. If the row number was not available at the time of model creation, or if working with
DataRobot 5.2, which does not provide rowNumber in the API response, the rowNumber will be
NA.
histogram. list: Data to plot a histogram of residual values. Each object contains:
intervalStart. Numeric: Start value for an interval, inclusive.
intervalEnd. Numeric: End value for an interval, exclusive for all but the last interval.
occurrences. Integer: the number of times the predicted value fits within the interval.
## Not run:
projectId <- "59a5af20c80891534e3c2bde"
modelId <- "5996f820af07fc605e81ead4"
model <- GetModel(projectId, modelId)
GetResidualsChart(model, source = DataPartition$VALIDATION)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.