# Which Type of Data Is Used in Machine Learning?

//

Larry Thompson

## Which Type of Data Is Used in Machine Learning?

Machine learning algorithms are designed to learn from data and make predictions or take actions based on that data. It is essential to understand the different types of data used in machine learning to effectively train and deploy
models.

In this article, we will explore the various types of data commonly employed in machine learning projects.

### Numerical Data

Numerical data consists of numbers and is the most common type used in machine learning. This type of data can be
further divided into two subcategories: discrete and continuous.

• Discrete numerical data: This type of data represents whole numbers or integers. Examples include the
number of items sold, customer ratings on a scale from 1 to 5, or the count of occurrences.
• Continuous numerical data: Continuous numerical data represents values that can take any numeric value within a
range. Examples include temperature measurements, time intervals, or stock prices.

### Categorical Data

Categorical data represents characteristics or attributes that belong to specific categories. This type of data is
commonly used when dealing with non-numeric information such as colors, product categories, or customer segments.

Categorical data can be further divided into two subcategories: nominal and ordinal.

• Nominal categorical data: Nominal data does not have an inherent order or ranking between categories. Examples
include gender (male/female), city names, or product brands.
• Ordinal categorical data: Ordinal data has an intrinsic order or ranking between categories.

Examples include
survey responses like “strongly agree,” “agree,” “neutral,” “disagree,” and “strongly disagree. “

### Text Data

Text data is a type of unstructured data that consists of sentences, paragraphs, or documents. It is commonly used in
natural language processing (NLP) tasks such as sentiment analysis, document classification, or text generation.

Preprocessing techniques such as tokenization and vectorization are often applied to convert text data into a numeric
representation suitable for machine learning algorithms.

### Image Data

Image data is another form of unstructured data that represents visual information. It is widely used in computer vision
tasks such as object detection, image recognition, or image segmentation.

Images are typically represented as arrays of
pixel values, and various techniques such as convolutional neural networks (CNNs) are employed to process and analyze
image data.

### Time Series Data

Time series data represents observations collected at different points in time. It is commonly used in forecasting,
anomaly detection, or trend analysis applications.

Examples of time series data include stock prices over time,
temperature recordings over months, or website traffic per hour.

## In Conclusion

Machine learning algorithms can work with various types of data, including numerical, categorical, text, image,
and time series data. Understanding the nature of the input data is crucial for selecting appropriate models and
preprocessing techniques to achieve accurate and meaningful results in machine learning projects.