Skip to main content

Predicting Chances of being infected by COVID-19 with a Basic ML Model

 Let's begin!


COVID-19 has really affected our life! Even the President of U.S.A. and the first lady has been tested as positive. So, our first model will be dedicated on the prediction on the chances of whom are more likely to fall for the virus!

Unlikely the traditional software engineering, we aren't providing rules and input!

Here we're giving the inputs and outputs and let the machine decide the rule!

This model is just to make you understand the basics of ML Model you can take it as Hello World of ML Model!

In this model we have used Supervised Learning!

I've used PyCharm, you can also view this model and run it on Google Colabatory where you can run your model without downloading a single software.

The keywords:

  • Features: It's the factor that affect the output. In our model the features are below:
  1. Female : If female then 1; if male then 0.
  2. Age : Age of the user.
  3. Disease : Any disease in this duration then 1 else 0.
  4. Severe : Any severe disease if yes then 1 else 0.
  5. Foreign : Visited any foreign place in this duration if yes then 1 else 0.
  • Labels: The Desired Output that our ML model will predict.
  1. Take Precautions : High chance of getting infected.
  2. Prone but maintain social distancing : Less chance of getting infected.
  • Prediction: Just change the data at the prediction function at line number 15
This is a basic model you can add more data to make it more precise and from this you can get the concept of Machine Learning!

Happy Programming!

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