client.models.get
A method of the Models endpoint.
- get(id: int) Response
Retrieve model configuration
API URL:
GET /models/{id}import civis client = civis.APIClient() response = client.models.get(...)
- Parameters:
- idint
The ID of the model.
- Returns:
civis.Response- idint
The ID of the model.
- table_namestr
The qualified name of the table containing the training set from which to build the model.
- database_idint
The ID of the database holding the training set table used to build the model.
- credential_idint
The ID of the credential used to read the target table. Defaults to the user’s default credential.
- model_namestr
The name of the model.
- descriptionstr
A description of the model.
- interaction_termsbool
Whether to search for interaction terms.
- box_cox_transformationbool
Whether to transform data so that it assumes a normal distribution. Valid only with continuous models.
- model_type_idint
The ID of the model’s type.
- primary_keystr
The unique ID (primary key) of the training dataset.
- dependent_variablestr
The dependent variable of the training dataset.
- dependent_variable_orderList[str]
The order of dependent variables, especially useful for Ordinal Modeling.
- excluded_columnsList[str]
A list of columns which will be considered ineligible to be independent variables.
- limiting_sqlstr
A custom SQL WHERE clause used to filter the rows used to build the model. (e.g., “id > 105”).
- active_build_idint
The ID of the current active build, the build used to score predictions.
- cross_validation_parameters
civis.Response Cross validation parameter grid for tree methods, e.g. {“n_estimators”: [100, 200, 500], “learning_rate”: [0.01, 0.1], “max_depth”: [2, 3]}.
- cross_validation_parameters
- number_of_foldsint
Number of folds for cross validation. Default value is 5.
- notifications
civis.Response - urlsList[str]
URLs to receive a POST request at job completion
- success_email_subjectstr
Custom subject line for success e-mail.
- success_email_bodystr
Custom body text for success e-mail, written in Markdown.
- success_email_addressesList[str]
Addresses to notify by e-mail when the job completes successfully.
- success_email_from_namestr
Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_tostr
Address for replies to success emails; defaults to the author of the job.
- failure_email_addressesList[str]
Addresses to notify by e-mail when the job fails.
- stall_warning_minutesint
Stall warning emails will be sent after this amount of minutes.
- success_onbool
If success email notifications are on. Defaults to user’s preferences.
- failure_onbool
If failure email notifications are on. Defaults to user’s preferences.
- notifications
- schedule
civis.Response - scheduledbool
If the item is scheduled.
- scheduled_daysList[int]
Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth
- scheduled_hoursList[int]
Hours of the day it is scheduled on.
- scheduled_minutesList[int]
Minutes of the day it is scheduled on.
- scheduled_runs_per_hourint
Deprecated in favor of scheduled minutes.
- scheduled_days_of_monthList[int]
Days of the month it is scheduled on, mutually exclusive with scheduledDays.
- schedule
- parent_idint
The ID of the parent job that will trigger this model.
- running_as
civis.Response - idint
The ID of this user.
- namestr
This user’s name.
- usernamestr
This user’s username.
- initialsstr
This user’s initials.
- onlinebool
Whether this user is online.
- running_as
- time_zonestr
The time zone of this model.
- last_run
civis.Response id : int
- statestr
The state of the run. One of queued, running, succeeded, failed or cancelled.
- created_atstr (time)
The time that the run was queued.
- started_atstr (time)
The time that the run started.
- finished_atstr (time)
The time that the run completed.
- errorstr
The error message for this run, if present.
- last_run
- hiddenbool
The hidden status of the item.
- user
civis.Response - idint
The ID of this user.
- namestr
This user’s name.
- usernamestr
This user’s username.
- initialsstr
This user’s initials.
- onlinebool
Whether this user is online.
- user
- created_atstr (date-time)
The time the model was created.
- updated_atstr (date-time)
The time the model was updated.
- current_build_statestr
The status of the current model build. One of “succeeded”, “failed”, “queued”, or “running,”or “idle”, if no build has been attempted.
- current_build_exceptionstr
Exception message, if applicable, of the current model build.
- buildsList[
civis.Response] A list of trained models available for making predictions.
- idint
The ID of the model build.
- namestr
The name of the model build.
- created_atstr
The time the model build was created.
- descriptionstr
A description of the model build.
- root_mean_squared_errorfloat (float)
A key metric for continuous models. Nil for other model types.
- r_squared_errorfloat (float)
A key metric for continuous models. Nil for other model types.
- roc_aucfloat (float)
A key metric for binary, multinomial, and ordinal models. Nil for other model types.
- buildsList[
- predictionsList[
civis.Response] The tables upon which the model will be applied.
- idint
The ID of the model to which to apply the prediction.
- table_namestr
The qualified name of the table on which to apply the predictive model.
- primary_keyList[str]
The primary key or composite keys of the table being predicted.
- limiting_sqlstr
A SQL WHERE clause used to scope the rows to be predicted.
- output_tablestr
The qualified name of the table to be created which will contain the model’s predictions.
- schedule
civis.Response - scheduledbool
If the item is scheduled.
- scheduled_daysList[int]
Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth
- scheduled_hoursList[int]
Hours of the day it is scheduled on.
- scheduled_minutesList[int]
Minutes of the day it is scheduled on.
- scheduled_runs_per_hourint
Deprecated in favor of scheduled minutes.
- scheduled_days_of_monthList[int]
Days of the month it is scheduled on, mutually exclusive with scheduledDays.
- schedule
- statestr
The status of the prediction. One of: “succeeded”, “failed”, “queued”, or “running,”or “idle”, if no build has been attempted.
- predictionsList[
- last_output_locationstr
The output JSON for the last build.
- archivedbool
The archival status of the requested item(s).