DEV Community

Cover image for Machine learning
Kelvin
Kelvin

Posted on

Machine learning

Machine learning is a branch of Artificial Intelligence that focuses on building systems that can learn from data and improve their performance over time without being explicitly programmed.

TYPES OF MACHINE LEARNING.

  1. Supervised learning.
  2. Unsupervised learning.
  3. Reinforcement learning.

Supervised learning.

Supervised learning is a type of machine learning where a model learns from labelled data.

Unsupervised learning.

Unsupervised learning is a type of machine learning where the model works with unlabelled data.
Instead of predicting a known output, the model tries to discover hidden patterns, structures, or relationships in the data on its own.

Reinforcement learning.

Reinforcement learning is a type of machine learning where a model learns by interacting with an environment and receiving rewards or penalties based on its actions.
Instead of learning from labelled data or finding patterns, it learns through trial and error.

Supervised learning.

  1. Regression - is a type of supervised learning used to predict continuous numerical values.
  2. Classification - Classification is a type of supervised learning where the goal is to predict categories (classes) instead of numbers.

Regression.

How models learn in regression.

  1. The model starts with random values for y = mx + c ### Example: Predicting house prices. y = mx + c price(y) = 100(m) * size(x) + 5000(c) 5000 is the base price if x = 0
  2. The model compares predictions with actual prices using loss function. error = (prediction price - actual price)
  3. The model adjusts the formula to reduce the error using gradient descent. price = 150 * size + 30000
  4. The model repeats until error is minimized. price = 200 * size + 10000

Supervised learning workflow.

  1. Collect data.
  2. Prepare data - Cleaning, pre-processing, visualization.
  3. Split data into train and test sets.
  4. Choose the algorithm to use.
  5. Training the model - learning patterns from training data.
  6. Make predictions on the test data.
  7. Evaluate the model's performance.
  8. Tune and improve the model.
  9. Deploy - use on new data.

Top comments (0)