Skip to main content

How to teach Machines?

 So, how to make machines learn?

 

We've learned in previous blogs why to teach machine? and what is machine learning?

If you haven't read them take a good look before jumping here!

Machine Learning begins with data. Data is the most important thing in ML. We need a lot of data to train a machine learning model. In general we divide data in two parts but google suggest that you should divide it in three parts!

So, why to divide data in three different parts? The first part is used to train the model, second is used for testing the model and the last data set is used for validation before production!

  • Training data is the the 70% of your data from which you teach your ML model. On the basis of this training the model learns to establish an algorithm by itself and use it for prediction making.

  • Testing data which is 25% of data and used to check whether the model is sufficient to give prediction to an unknown data and by which we learn about accuracy of the model.

  • Validation data is the ultimate test of our ML model before getting into production. While using it we can conclude that our model is ready for the real world data.
Many models perform great till testing data but fails in validation because of over-training the model! The over-trained model is a term used for a model that is over-trained to make an accurate prediction. This over training make model limited to that data and due to which it can't make prediction on new data!

In data we have two parts labels and features. 

  • Labels are input data that we provide to machine and on basis of which it'll predict the outcome.
  • Feature is the outcome, which your ML model will predict using the labels.
I've a question for you! What will be the labels and features for a ML model which is use to predict a house price?

Comments

Popular posts from this blog

Face Detection and Recognition Model

 Let's begin! The base model for Face Detection and Recognition.  It uses face recognition library, which has face encodings to detect and recognize different faces. I've created a class where we can initialize it with the image path and label which save it's encoding then from predict function we check whether the encodings is same or not! If the encodings is same we return the image with label name. Else we return the image with default label Unknown .

Face Detection and Recognition API

 Let's begin! Face Detection and Recognition API.  I've used the same  model  as discussed in previous blog and used FastAPI framework to create the API and Uvicorn for the server to run it on Google Colab.  The API has four request: Index (GET) : Homepage of API Upload (POST) : User can upload the image and label to be used as dataset. Target (POST) : Target image on which prediction has to be done.  Prediction (GET) : Get the prediction. The purpose of this project was to understand the creation of a ML API and how to use it and it's use is restricted for educational purpose only.

Predicting whether the room is clean or messy from a Flutter based app.

It's an application made using Flutter, Dart and TensorflowLite which can be used to predict the cleanliness of the room. The app consist of an A.I. model which has been trained to classify the room as messy or clean. The model has been compressed and added to the app with TensorFlowLite and it works offline. The app allows user to pick a image (Room Image) by clicking on the gallery button and thus provide the image to model to classify as clean or messy. It can be downloaded by the following link for android devices. CleanVsMessy