DEV Community

allan-pg
allan-pg

Posted on

Beginners guide to Machine Learning

Have you ever thought when you search for a product online, now you start getting recommendation's of similar products on websites like amazon? When typing something on your phone, your keyboard has word suggestions of the word you are about to type? All this has been made possible by the application of Machine Learning.

Machine Learning is a way of teaching computers to make predictions without having to program it for every single task.
Machine Learning is a subset of Artificial intelligence(AI)

Your friend started out in car sales and he has made thousands of dollars. As a data scientist he has offered you to be his business partner. He supplies the money and you will make models to predict how much the cars are to be sold. As a data scientist you ask your friend which criteria they used to predict price of a car and you identify they used prices from the past to predict the price of a car.

Machine Learning allows you to predict prices in the same way but in a more accurate manner. We will be using Decision Trees for a clear explanation because they are easier to understand. Your friend was using the below decision tree model to predict future prices.

Decision Tree Model

This model only divides cars in two categories. The biggest disadvantage of this model is does not capture most factors affecting the price of cars. For example age of the car, make and model, mileage, accident history if any, the condition of the car and etc. You can use a more deeper tree to include more factors.

Decision Tree

The above model has now included more factors first is the car manual or automatic and what is its engine capacity. These factors are refereed to as features in your model and the price we are predicting is the prediction target

Steps to building and using a Machine learning model

  • Data Collection: You will need to gather data you will need to build your model. For example pictures, past data on car sales for our case.
  • Define: Find out What type of model bests suites what you need to achieve.
  • Fit: Train the model by showing it your data and letting it learn.
  • Predict: The model makes predictions, and you tell it whether it's right or wrong. Over time, it gets better.
  • Evaluate: Determine how accurate the model's predictions are.

Applications of Machine Learning

  • Recommendations: Based on your recent search history for example on YouTube, You will have videos being recommended to you based on your search history.
  • Spam Filtering of messages: On your message app you have a spam folder that contains all messages that have been filtered out as spams.
  • Detecting fraudulent activities: Banks are now using machine learning to help curb tax evasions and detect fraudulent transactions. If your bank account transacts an average of $3,000 per month then if it starts transacting over $50,000 then that raises an eye brow.
  • Transport: A more practical example google map can help you choose the best alternative route based on traffic jam, distance which can help reduce the time you will take and the amount of fuel needed.

Conclusion

Machine Learning is used to interpret patterns in your data for a better decision making and prediction. Machine Learning allows you to feed your algorithm large amounts of data and it analyzes the data for better decision making. Instead of humans writing code for every action, we show the computer lots of examples, and it learns from those.

Top comments (0)