Update model configuration

models_patch(id, table_name = NULL, database_id = NULL,
  credential_id = NULL, model_name = NULL, description = NULL,
  interaction_terms = NULL, box_cox_transformation = NULL,
  model_type_id = NULL, primary_key = NULL,
  dependent_variable = NULL, dependent_variable_order = NULL,
  excluded_columns = NULL, limiting_sql = NULL,
  active_build_id = NULL, cross_validation_parameters = NULL,
  number_of_folds = NULL, notifications = NULL, schedule = NULL,
  parent_id = NULL, time_zone = NULL)



integer required. The ID of the model.


string optional. The qualified name of the table containing the training set from which to build the model.


integer optional. The ID of the database holding the training set table used to build the model.


integer optional. The ID of the credential used to read the target table. Defaults to the user's default credential.


string optional. The name of the model.


string optional. A description of the model.


boolean optional. Whether to search for interaction terms.


boolean optional. Whether to transform data so that it assumes a normal distribution. Valid only with continuous models.


integer optional. The ID of the model's type.


string optional. The unique ID (primary key) of the training dataset.


string optional. The dependent variable of the training dataset.


array optional. The order of dependent variables, especially useful for Ordinal Modeling.


array optional. A list of columns which will be considered ineligible to be independent variables.


string optional. A custom SQL WHERE clause used to filter the rows used to build the model. (e.g., "id > 105").


integer optional. The ID of the current active build, the build used to score predictions.


list optional. Cross validation parameter grid for tree methods, e.g. "n_estimators": [100, 200, 500], "learning_rate": [0.01, 0.1], "max_depth": [2, 3].


integer optional. Number of folds for cross validation. Default value is 5.


list optional. A list containing the following elements:

  • urls array, URLs to receive a POST request at job completion

  • successEmailSubject string, Custom subject line for success e-mail.

  • successEmailBody string, Custom body text for success e-mail, written in Markdown.

  • successEmailAddresses array, Addresses to notify by e-mail when the job completes successfully.

  • successEmailFromName string, Name from which success emails are sent; defaults to "Civis."

  • successEmailReplyTo string, Address for replies to success emails; defaults to the author of the job.

  • failureEmailAddresses array, Addresses to notify by e-mail when the job fails.

  • stallWarningMinutes integer, Stall warning emails will be sent after this amount of minutes.

  • successOn boolean, If success email notifications are on.

  • failureOn boolean, If failure email notifications are on.


list optional. A list containing the following elements:

  • scheduled boolean, If the item is scheduled.

  • scheduledDays array, Day based on numeric value starting at 0 for Sunday.

  • scheduledHours array, Hours of the day it is scheduled on.

  • scheduledMinutes array, Minutes of the day it is scheduled on.

  • scheduledRunsPerHour integer, Alternative to scheduled minutes, number of times to run per hour.


integer optional. The ID of the parent job that will trigger this model.


string optional. The time zone of this model.


An empty HTTP response