Spinner logo OtasAI


Did You Know?

Data Preparation - Categorical data tool


In the realm of machine learning, data preparation is a critical step that often determines the success of your model. OtasML, a visual machine learning tool, streamlines this process by offering an intuitive data preparation module. Among the various features available, the Categorical Data page stands out, providing users with powerful encoding tools to handle categorical variables. This page includes options for One-Hot Encoding, Label Encoding, and Ordinal Encoding, allowing users to transform their data efficiently and effectively. Let’s delve into what each of these encoding techniques entails and how OtasML facilitates their use.

One-Hot Encoding

One-Hot Encoding is a technique that converts categorical variables into a series of binary vectors. Each category in the original variable is represented as a separate binary column, with a value of 1 indicating the presence of the category and 0 indicating its absence. This method is particularly useful when dealing with non-ordinal categorical data where there is no intrinsic order among the categories.

For example, consider a categorical variable representing colors: Red, Green, and Blue. One-Hot Encoding would transform this variable into three separate columns: "Is_Red", "Is_Green", and "Is_Blue".


  • Prevents the model from assuming any ordinal relationship between categories.
  • Works well with algorithms that cannot handle categorical inputs directly.


  • Can lead to a large number of columns if the categorical variable has many levels.

In OtasML, users can select One-Hot Encoding, configure the relevant settings, and preview the transformed data before applying the changes. This ensures that users can see how their data will look and adjust their configuration as needed.

Label Encoding

Label Encoding assigns a unique integer to each category in the categorical variable. This method is straightforward and efficient, converting categories into numerical values that can be used directly by many machine learning algorithms.

For instance, the colors Red, Green, and Blue might be encoded as 0, 1, and 2, respectively.


  • Simple and quick to implement.
  • Reduces the dimensionality of the data compared to One-Hot Encoding.


  • Imposes an ordinal relationship that might not exist, potentially misleading some algorithms.

OtasML allows users to choose Label Encoding, set up the encoding scheme, and preview the changes. This preview feature helps in understanding the impact of the encoding before it is finalized.

Ordinal Encoding

Ordinal Encoding is used when the categorical variable has a clear, ordered relationship. This method assigns integers to the categories based on their order. For example, in a variable representing size: Small, Medium, and Large, Ordinal Encoding might map these to 0, 1, and 2, respectively.


  • Preserves the ordinal nature of the data, which can be important for certain models.
  • More compact representation than One-Hot Encoding.


  • Can mislead models that are not designed to handle ordinal relationships properly.

In OtasML, users can opt for Ordinal Encoding, configure the order of categories, and preview the results. This ensures that the encoding aligns with the inherent order of the data before the configuration is saved.

Using the Categorical Data tool in OtasML

The Categorical Data page in OtasML is designed to be user-friendly and highly functional. Here’s a step-by-step overview of how to use it:

  1. Select Encoding Type: Choose from One-Hot Encoding, Label Encoding, or Ordinal Encoding based on the nature of your categorical data.
  2. Configure Settings: Set up the specific parameters for the selected encoding type. For example, define the order of categories for Ordinal Encoding or the columns to be created for One-Hot Encoding.
  3. Preview Transformation: View a preview of the encoded data. This allows you to verify the changes and make any necessary adjustments.
  4. Save Configuration: Once satisfied with the preview, save the configuration. This step ensures that your original data remains unaffected. The system will apply the saved configuration during the model training process, using the transformed data.


By providing these powerful encoding tools and an easy-to-use interface, OtasML makes data preparation simpler and more efficient. Users can focus on building robust machine learning models without worrying about the intricacies of data transformation. Whether you are a beginner or an experienced data scientist, the Categorical Data page in OtasML equips you with the capabilities to handle categorical variables with ease and precision.


A+ A-