Trainer (Regression)

Overview

You can use this Snap to build the model for a regression dataset. In the Snap's settings, you can select the target field in the dataset, algorithm, and configure parameters for the selected algorithm.


Trainer (Regression) Snap dialog

Prerequisites

  • The data from upstream Snap must be in tabular format (no nested structure).
  • This Snap automatically derives the schema (field names and types) from the first document. Therefore, the first document must not have any missing values.

Limitations and known issues

None.

Snap views

View Description Examples of upstream and downstream Snaps
Input

The Snap accepts atmost one input view.

Output

The Snap produces atmost one output views:

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:

  • Stop Pipeline Execution Stops the current pipeline execution when an error occurs.
  • Discard Error Data and Continue Ignores the error, discards that record, and continues with the remaining records.
  • Route Error Data to Error View Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap settings

Legend:
  • Expression icon (): JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.
  • SnapGPT (): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
  • Suggestion icon (): Populates a list of values dynamically based on your Account configuration.
  • Upload : Uploads files. Learn more.
Learn more about the icons in the Snap settings dialog.
Field / field set Type Description
Label String

Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline.

Default value: Trainer (Regression)

Example: Regression training
Label field String/Suggestion Required.Specify the target or class field of the dataset that the model will use during the training process. This field represents the expected output values that the model learns to predict based on the input data. During inference, the model predicts this field as its output.

Default value: N/A

Example: $class
Algorithm String Required. Enter the classification algorithm that builds the model.

Default value: Decision Tree

Example: Naive Bayes
Options String/Expression

Specify the parameters to configure the selected algorithm. These options may include hyperparameters or specific settings that influence the algorithm's behavior.

Default value: N/A

Example: max_depth=5, criterion="gini"/>

Readable Checkbox When selected, the output model is made more interpretable, focusing on readability for end-users.

Default status: Deselected

Snap execution Dropdown list Select one of the three modes in which the Snap executes.
Available options are:
  • Validate & Execute. Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only. Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled. Disables the Snap and all Snaps that are downstream from it.
Tip: To choose the best possible algorithm for your dataset, use the Cross Validator (Regression) Snap to perform k-fold cross validation on the dataset. The algorithm that produces the best accuracy is likely to be the one most suitable for your dataset. Apply the same algorithm for your dataset in the Trainer (Regression) Snap to build the model.