Jump to content

Example: Difference between revisions

2,534 bytes removed ,  19 February 2023
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
{{see also|Machine learning terms}}
==Introduction==
==Introduction==
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 [[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]].
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 [[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?==
==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.
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.


==How are examples used in machine learning?==
[[Category:Terms]] [[Category:Machine learning terms]]
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.
 
The process of using examples to train a machine learning model typically involves several steps, including:
 
1. Data collection: Gathering a large dataset of input-output pairs that is representative of the problem domain.
 
2. Data preprocessing: Cleaning, transforming, and normalizing the input and output data to make it suitable for machine learning algorithms.
 
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.
 
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