Machine Learning Features
- Overview
A machine learning (ML) feature is an individual input variable or attribute a model uses to make predictions, while the target is the output the model predicts.
1. Core Concepts
- Features vs. Target: Features are the inputs (such as square footage, bedrooms, or location), and the target (or label) is the outcome you want to predict (such as house price).
- Feature Vectors: Models often process inputs as numeric or symbolic lists (vectors) where each element represents a feature value, such as [R, G, B] color values or vector embeddings.
- Feature Types: Common types include numerical features (like age, height, or income) and categorical features (like color, category labels, or zip codes). Non-numeric data like text, images, or behavioral logs must be converted into numerical representations for algorithms to process.
2. Feature Engineering and Selection:
- Creating & Transforming: Feature engineering builds or reshapes inputs from raw data using domain knowledge and math—such as extracting the day of the week or month from a timestamp, calculating remaining contract time, or flagging missing values.
- Feature Selection: Algorithms or statistical methods (such as filter, wrapper, or embedded methods, or dimensionality reduction like PCA) narrow down features to keep the most informative ones and reduce noise or overfitting.
- Data Leakage Risk: Avoid including features that leak future or post-event information (such as an actual arrival timestamp when predicting arrival time) that will not be available at prediction time.
- Features
A feature is an individual measurable property, attribute, or input variable of data that a machine learning (ML) model uses to learn patterns and make predictions.
In AI, a "feature" refers to a measurable property or characteristic of data that is used as input for a machine learning (ML) model, essentially acting as a key attribute that the model analyzes to make predictions or classifications; it's a specific piece of information extracted from raw data that helps the AI understand and learn patterns within the data.
1. AI features highlights:
- Input for models: Features are the inputs that are fed into a ML algorithm to train and make predictions.
- Data transformation: Raw data often needs to be processed and transformed into meaningful features before being used by an AI model.
- Feature engineering: The process of selecting, creating, and modifying features to optimize the performance of a machine learning (ML) model is called feature engineering.
- Direct vs. Derived: Features can come directly from raw data (such as age, temperature, or parcel size) or be derived from existing records (such as prior delivery counts or time remaining on a contract).
- Feature Engineering: Raw data often needs transformation—such as extracting the year or month from a timestamp or converting text or images into numeric representations—so algorithms can process it effectively. Deep learning (DL) models can automate parts of this representation learning across layers, though input quality still matters.
- Feature Selection: Keeping only relevant, informative features improves model accuracy, reduces noise, and lowers computational overhead. You can explore filter, wrapper, embedded, and unsupervised methods in IBM's guide on feature selection.
- Feature Examples
A feature is an individual measurable property within a recorded dataset. In ML and statistics, features are often called “variables” or “attributes.” Relevant features have a correlation or bearing (called feature importance) on a model's use case.
In a patient medical data set, for example, features can be age, gender, blood pressure, cholesterol levels, and other observed characteristics associated with the patient.
Features can be single variables, derived variables, or combined attributes constructed from underlying data elements. For example, based on measurements of blood pressure, cholesterol levels, and other influencing factors, we can create an "engineered" feature that is categorical and used to identify a group of observations into a risk category for stroke or heart disease.
Other examples,
- In text analysis: Words, phrases, sentiment scores
- In customer data: Age, purchase history, location
- in predicting house price: square footage, number of bedrooms, location, and year built.
- In image recognition: Pixel color values, edge detection, shape characteristics, and texture
[More to come ...]

