Example: Difference between revisions

From AI Wiki
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{see also|Machine learning terms}}
==Introduction==
==Introduction==
Machine learning is a subfield of artificial intelligence (AI) that focuses on the development of algorithms that can learn from data and make predictions or decisions without being explicitly programmed. An important component of machine learning is the use of examples or training data, which consists of input data and the corresponding desired output. In this article, we will explain what an example is in machine learning and how it is used to train machine learning models.
In [[machine learning]], [[example]]s or [[training data]] are [[input]] data and the corresponding desired [[output]]. A single [[example]] is the values of one row of [[feature]]s and possibly a label. Examples in [[supervised learning]] fall into two general categories: labeled examples and unlabeled examples. Labeled examples comprise one or more [[feature]]s and a [[label]]. Labeled examples are used during [[training]]. On the other hand, unlabeled examples consist of features but no label. Unlabeled examples can be utilized during training and [[inference]].


==What is an example in machine learning?==
==What is an example in machine learning?==
An example in machine learning is a pair of input and output values that is used to train a machine learning model. The input value is a set of features or attributes that describe the characteristics of an object or phenomenon, and the output value is the label or class that the object or phenomenon belongs to. For example, in a spam detection system, an example would consist of an email message (input) and its corresponding label (output), which could be either "spam" or "not spam". In an image recognition system, an example would consist of an image (input) and its corresponding label (output), which could be the name of the object or scene depicted in the image.
An example in machine learning refers to a pair of input and output values used to train a model. The input value is made up of [[feature]]s or attributes that describe an object or phenomenon, while the output value serves as its [[label]] or [[class]]. For instance, spam detection systems typically take email messages (input) as their label (output), which could either be "spam" or "not spam." Similarly, image recognition systems take pictures as inputs and assign them labels describing what the image depicts. Suppose we collected a dataset of 2000 apartments with their features and prices. The features and the price of a single apartment would be an example.


==How are examples used in machine learning?==
{| class="wikitable"
Examples are used to train machine learning models by providing the model with a set of input-output pairs that it can use to learn how to make predictions or decisions on new, unseen data. During the training process, the machine learning algorithm analyzes the examples and tries to find patterns or relationships between the input and output values. The goal is to create a model that can accurately predict the output value for any new input value it encounters.
|+ 3 [[labeled example]]s
|-
! colspan="3"| Features
! colspan="1"| Label
|-
! Location
! Bedroom #
! Bathroom #
! Price
|-
| Midtown || 3 || 2 || $800,000
|-
| Uptown || 2 || 2 || $500,000
|-
| Downtown || 2 || 1 || $700,000
|-
|}


The process of using examples to train a machine learning model typically involves several steps, including:
{| class="wikitable"
|+ 3 [[unlabeled example]]s
|-
! colspan="3"| Features
|-
! Temperature
! Precipitation
! Humidity
|-
| 25 || 9 || 12
|-
| 20 || 54 || 32
|-
| 31 || 0 || 87
|-
|}


1. Data collection: Gathering a large dataset of input-output pairs that is representative of the problem domain.
==Explain Like I'm 5 (ELI5)==
An example in machine learning is a set of instructions we give the computer to learn something. For instance, if we want it to recognize different types of fruit, we could show it pictures of apples, oranges and bananas - each picture serving as an example for what the computer should search for when trying to recognize fruits.


2. Data preprocessing: Cleaning, transforming, and normalizing the input and output data to make it suitable for machine learning algorithms.
By providing the computer with multiple examples, it can begin to recognize patterns in data and even learn to recognize fruit on its own. It's like how you can recognize a dog even if you haven't seen that particular breed before because you know its look from all of your previous pictures and experiences with dogs.


3. Model selection: Choosing a suitable machine learning algorithm and its corresponding model architecture based on the problem domain and the characteristics of the data.
[[Category:Terms]] [[Category:Machine learning terms]] [[Category:not updated]]
 
4. Training: Feeding the input-output pairs into the model and adjusting its parameters to minimize the difference between the predicted and actual output values.
 
5. Evaluation: Testing the model on a separate set of input-output pairs to measure its performance and identify any areas for improvement.
 
6. Deployment: Integrating the trained model into a real-world system and using it to make predictions or decisions on new, unseen data.
 
==Example of using examples in machine learning==
To illustrate the use of examples in machine learning, let's consider the problem of predicting the price of a house based on its features, such as the number of bedrooms, the size of the lot, and the age of the house. To train a machine learning model to make accurate predictions, we would need a dataset of houses with their corresponding prices.
 
Suppose we collected a dataset of 1,000 houses with their features and prices. We would divide the dataset into a training set and a test set, with the training set containing, say, 80% of the examples and the test set containing the remaining 20%. We would then preprocess the data by, for example, scaling the features to have zero mean and unit variance, and normalizing the prices to be in the range [0, 1].
 
Next, we would choose a suitable machine learning algorithm, such as linear regression, and train the model on the training set by feeding it the input-output pairs and adjusting its parameters to minimize the mean squared error between the predicted and actual prices. After training, we would evaluate the model on the test set by measuring its mean squared error and comparing it to the performance of other models.
 
Finally, we would deploy the trained model

Latest revision as of 20:54, 17 March 2023

See also: Machine learning terms

Introduction

In machine learning, examples or training data are input data and the corresponding desired output. A single example is the values of one row of features and possibly a label. Examples in supervised learning fall into two general categories: labeled examples and unlabeled examples. Labeled examples comprise one or more features and a label. Labeled examples are used during training. On the other hand, unlabeled examples consist of features but no label. Unlabeled examples can be utilized during training and inference.

What is an example in machine learning?

An example in machine learning refers to a pair of input and output values used to train a model. The input value is made up of features or attributes that describe an object or phenomenon, while the output value serves as its label or class. For instance, spam detection systems typically take email messages (input) as their label (output), which could either be "spam" or "not spam." Similarly, image recognition systems take pictures as inputs and assign them labels describing what the image depicts. Suppose we collected a dataset of 2000 apartments with their features and prices. The features and the price of a single apartment would be an example.

3 labeled examples
Features Label
Location Bedroom # Bathroom # Price
Midtown 3 2 $800,000
Uptown 2 2 $500,000
Downtown 2 1 $700,000
3 unlabeled examples
Features
Temperature Precipitation Humidity
25 9 12
20 54 32
31 0 87

Explain Like I'm 5 (ELI5)

An example in machine learning is a set of instructions we give the computer to learn something. For instance, if we want it to recognize different types of fruit, we could show it pictures of apples, oranges and bananas - each picture serving as an example for what the computer should search for when trying to recognize fruits.

By providing the computer with multiple examples, it can begin to recognize patterns in data and even learn to recognize fruit on its own. It's like how you can recognize a dog even if you haven't seen that particular breed before because you know its look from all of your previous pictures and experiences with dogs.