Features and labels in AI

Ranjeet Jangra
4 min readJan 27, 2024

--

Photo by Mnz on Unsplash

Features and labels in AI

  1. Features: these are the variables or attributes that the machine learning model uses to make predictions or decisions.

2. Labels: these are the outcomes or the “answers” that the model aims to predict. In supervised learning, these are provided as part of the training data.

Feature engineering

Feature engineering is the process of selecting, transforming, creating, or aggregating raw data attributes (known as “features”) into a format that is better suited for machine learning algorithms to model.

In other words, feature engineering aims to create a more effective representation of data to improve the performance of machine learning models.

The quality and effectiveness of your features can have a significant impact on the quality of your model’s predictions or classifications.

Effective feature engineering can often make the difference between a mediocre model and a highly accurate one.

Feature engineering benefits:

  • model performance: improved features often lead to better model performance in terms of accuracy, precision, recall, or other metrics.
  • computational efficiency: irrelevant or redundant features can increase the computational complexity of training a model. Effective feature engineering can make models faster to train.
  • interpretability: well-chosen features can make a model easier to understand and interpret, which is critical in many business settings for making data-driven decisions.
  • generalization: good features can help a model generalize better from the training data to unseen data.

Components of feature engineering

  1. Feature selection: choosing the most relevant features from the original dataset that are most relevant to the problem you’re trying to solve.
  2. Feature extraction: Combining multiple raw features to create new features that can better represent the underlying problem. For example, if you have the features “length” and “width,” you might create a new feature, “area,” by multiplying the two.
  3. Feature transformation: Applying mathematical functions to features to better distribute the data or highlight relationships between features. Examples include log transformations.
  4. Feature scaling: standardizing the range of independent variables to make it easier for algorithms to interpret them. Common methods include min-max scaling, standardization, and normalization.
  5. Feature encoding: converting categorical variables into a format that can be fed into machine learning models, such as one-hot encoding or label encoding.
  6. Handling missing values: deciding how to treat missing values in features, either by imputation, removal, or some form of placeholder value.
  7. Temporal features: Iif dealing with time-series data, creating new features that capture relevant time-dependent patterns like seasonality.
  8. Domain-specific features: features that are created based on specific knowledge of the domain or problem, which may not be immediately obvious from the raw data.

Representation of feature engineering

Feature Engineering Types

Data correlation

Data Correlation is a way to understand the relationship between multiple variables and attributes in your dataset. Using Correlation, you can get some insights such as:

  • One or multiple attributes depend on another attribute or a cause for another attribute.
  • One or multiple attributes are associated with other attributes.

Thanks .

Ranjeet Jangra

Network and Cloud Automation Professional with 15 years of experience in Development | Testing | Deployment | Support | Automation on various Technologies like IP-Routing, Cloud, Programming, Containers, Kubernetes, Telemetry, Orchestration, Network-Programmability, YANG, TextFSM, Jinja, RestAPI , Terraform , AWS , Ansible , Cisco NSO , observability and so on .
https://www.linkedin.com/in/ranjeetjangra/

--

--

Ranjeet Jangra

Network Automation Professional with 10+ years of experience in Development|Testing|Deployment|Support|Automation .