Search code examples
androidandroid-studiomachine-learningdata-miningprediction

how to use ML Models in android application


my graduation project is about android application using data mining techniques or ML models to predict Covid-19 from datasets (not APIs) , there will be a part for the user to search by region to know whether this region is safe or crowded with covid cases with a statistics to avoid going there, and the other part is a chatbot which takes user symptoms and predict whether this symptoms are Covid-19 or just a flu. The problem is that i was a web developer and i didn't use android studio before, and i never used ML and i don't know how to start in this project, can any one guide me how to start and give me some guidelines please? It is for a graduation project purpose. Thanks in advance.


Solution

  • Create Android Application

    If you don't have experience using Android Studio, don't worry, it is really easy. You should start with the "Create your first App" tutorial in the web of Android Developers.

    You can write your applications using Java and Kotlin. I recommend you to use Java since most tutorials of using ML in Android use Java.

    Edit: Since I first wrote this, Kotlin has gained a lot of popularity in Android development, so at this point, choose whatever you want.

    Create a ML classifier that can be used in Android

    Since you haven't specified the ML algorithms that you have to use, I'll give you two options.

    SVM (Support Vector Machines)

    The first option is to use an SVM (Support Vector Machine). This is an easy way of generating a classificator (in your case, you have to classify sets of symptoms between COVID-19 and Flu). Here is a tutorial on using SVM:

    Once you have trained the SVM, you have to export it for using in Java. Here is an explanation on how to do that:

    Neural Networks

    The second option is to use a Neural Network. If you choose this option, I recommend you to take at least the first course of the Deep Learning Specialization in Coursera by Andrew Ng. If you don't want to pay it, you can audit the course and see the videos for free:

    In this course, you'll learn to create a neural network and to train it using Keras in Python. after you have trained the neural network, you can export the generated model and convert it to tflite format (Tensorflow Lite).

    This model can then be used in Android.