Android Machine Learning

Hello, Habr! I present to you heed translation of an article from APC magazine .

Machine learning and data mining are the practical developments of AI, thanks to which applications of various topics appear, ranging from aeronautics to zoology. These processes are most often performed in the cloud, on a PC or laptop, much less often in a smartphone.

However, recently a new free application called “DataLearner” has appeared on Google Play, with which you can extract data. It does not require external resources and access with superuser privileges.

Smartphone Computing Resources


Many people mistakenly believe that machine learning and data mining requires a lot of cloud computing resources, or at least a powerful computer. However, ultimately it comes down to the size of the data being analyzed and the type of machine learning that you want to apply.

Computer training has its own difficulty levels. If you imagine that such a recently emerging deep learning technique as the convolutional neural network (CNN) is a car with a high power density, then other techniques, such as the decision tree and many other “forest” training methods, are hot “hatchbacks”. They show excellent results, fast and easy, even with limited computing capabilities of the CPU.

Data processing application


Google recently released TensorFlow Lite. This application is for smartphones and the Internet of things, designed for in-depth training of physical objects. However, DataLearner went the other way. It supports traditional classification algorithms such as NaïveBayes and Random Fores. All of them will be stored on your phone and not require the participation of a third party to gain access to them.

DataLearner combines the core components of the Weka open source data mining application with new computer learning algorithms developed by Charles Sturt University in Australia. The application is autonomous, i.e. Does not require cloud computing or Internet connection for normal operation. The program does not request access with superuser privileges, does not collect information about you (except for the data that Google receives from the boot files on Google Play) and is supported on all devices running Android 4.0 and higher. It is easy to manage thanks to a simple user interface consisting of three main screens.

When the application starts, a loading screen appears where you can download CSV or ARFF data packets. They can be saved locally or in downloads. For CSV format, a header line is needed. After loading, you will see general information about the data, including types and number of parameters, as well as class attributes.

Choose your algorithm


If you swipe the screen to the left, a window opens where you can choose one of 40 algorithms for pattern recognition in the data packet. Information retrieval - in essence, this is the allocation of patterns in data and the relationships between various attributes and attributes. There is no perfect algorithm, and therefore DataLearner provides you with a wide range of choices. In addition to the large number of algorithms from the developers of the Weka application, the list contains several new methods created by the staff of Charles Sturt University, for example, ForestPA, SysFor and SPAARC.

Run your algorithm


Here the fun begins.

You don’t have to do anything except press the 'Run' button. DataLearner will do the rest. First, he will build a model of your data, i.e. correlates attributes with each other.
The class attribute defines the grouped list to which each data packet belongs. For example, a standard demo version of a data package provides weather indicators such as temperature, humidity, wind direction, and rainfall over the past few days. And you extract the data to find out if there are any patterns in how these weather indicators relate to whether it was rainy or not that day.

The application then cross-checks the rule set or “model” created using a method called “10-pass cross-validation” to find out what its predictive capabilities are. As a result, you get a mathematical analysis, the main result of which is the percentage of accuracy. It will appear at the top of the screen.

Click the 'View details / matrix' button at the bottom of the screen and you will get more detailed information about the model and how it works. Here, information about patterns will be presented in a more visual form.

You also need to remember the amount of data loaded for processing: despite the vaunted performance of mobile processors, you should not expect the same speed from them as with AWS or Google Cloud. Also, do not wait for you to be able to upload traffic data from Facebook over the past ten years from Facebook, and the program will process them for ... no, it will never process them. Nevertheless, there are many applications with more modest sources of information, for the processing of which the smartphone would be perfect.

Pocket calculator


DataLearner will not replace cloud-based machine learning soon, but that is not its purpose. Instead, the application is a fully portable solution that fits in your pocket and does not require a power cord or an Internet cable. The application can be downloaded for free from Google Play . GPL3 licensed source code is also available on GitHub .

Source: https://habr.com/ru/post/undefined/


All Articles