Convert Target for binary classification

This transform converts the values in the target column into binary classification. This transforms a categorical target variable with more than two categories into a binary variable with two categories, typically 0 and 1.

tags: [“EDA”]

Parameters

The table gives a brief description about each parameter in Convert Target for binary classification transform.

Name:

By default, the transform name is populated. You can also add a custom name for the transform.

Input Dataset:

The file name of the input dataset. You can select the dataset that was uploaded from the drop-down list to be filtered based on the given column value.(Required: True, Multiple: False)

Output Dataset:

The file name with which the output dataset is created after converting the target column into binary variables (which should be 0 or 1). The positive class is assigned with the binary value of 0 and negative class with 1. (Required: True, Multiple: False)

Column:

The target column which should be divided into categories and transformed into a binary variable. (Required: True, Multiple: False, Datatypes: [“STRING”], Options: [“FIELDS”], Datasets: [“df”])

Sample input for Convert Target for binary classification transform:

../../../_images/targetconvert_input.png

The output after running the Convert Target for binary classification transform on the dataset appears as below:

../../../_images/targetconvert_output.png

How to use it in Notebook

The following is the code snippet you must use in the Jupyter Notebook editor to run the Convert Target for binary classification transform:

Requirements

pandas