There are many different types of Machine Learning systems base on each criterion.
This criterion has 4 main types: supervised, unsupervised, semi-supervised, and reinforcement learning.
As the name indicates, supervised learning has the presence of a supervisor as a teacher. We train our program using data that is “well labeled” — data is tagged with the correct answer.
Classification is a typical supervised learning task. One example is the spam filter. In the training set, every email was tagged with its class (spam or not). …
After few years of hearing about Machine Learning, today, I decided to start the first baby step to learn about Machine Learning. It is not because of the hot trend of machine learning at the moment when everyone talks about it. The main reason is one of my side projects may need to apply some data science in the future. And I also curious about Machine Learning for a while. So why not start?
Fortunately, I found good resources to start, and I really enjoy them. What I found below is taken from the books and courses that I follow.
In 2017, Android Architecture Components was released by Google, helps Android Developer build robust, maintain, stable app. Livedata is a part in the collections of libraries introduced in Android Architecture Components.
According to Android Document:
LiveData is an observable data holder class. Unlike a regular observable, LiveData is lifecycle-aware, meaning it respects the lifecycle of other app components, such as activities, fragments, or services. This awareness ensures LiveData only updates app component observers that are in an active lifecycle state.
If you have worked with RxJava/RxKotlin before, you will find it easy to understand LiveData.
One typical case to use…
Pattern Searching is very popular and important problem in computer science. We usually use it every day, like search a text in a browser, or in an editor. We can simply define the problem as:
Given two string txt and pattern. Find the first occurrence of pattern in txt.
There are some algorithms can resolve this problem. Knuth-Morris-Pratt algorithm (Aka KMP Algorithm) is one of these algorithms. …
Fetching data from IO and then display it on the screen is a very very common task in creating software. In the Android world, there are many ways we can use to archive this task. We can use RxJava, Asyntask, etc. But, have you ever consider how these things work under the hood, how background thread in Android can make a change in the view which is only updated in the main thread?
The answer is Android using its component mainly include Looper, MessageQueue, Handler, Runnable to manage workload in each Thread. …
According to Java docs, here is the definition of Thread
A thread is a thread of execution in a program. The Java Virtual Machine allows an application to have multiple threads of execution running concurrently.
Actually, there is a direct mapping between a JVM thread and an OS thread. Every thread has its own priority. The more prioritized, the earlier thread’s execution be performed. We also can set priority to the thread by using
thread.setPriority(priority) note that
priority is in [1, 10]
Thread mainly have 5 state
In our project, we are normally using a SingleActivity for the huge scope. That activity contains sequence custom view which represents for each screen. In some screen that owns very big scope, we break it as multiples custom views.
There is so much benefit of using SingleActivity in your huge scope. But belong with the benefit we also get some problem need to be solved. One of them is how can we handle the onActivityResult when onActivityResult is only triggered in the Activity (we don’t use Fragment).
There was a couple of solution come up to us when we think…
Activity is an application component which provides UI for user and the users can interactive with it. Each activity has a lifecycle. Activity’s lifecycle is controlled by mainly 7 callback methods. And after each method, the activity’s state will be changed.
Depend on how activity interactive with the user, it can be in one of 4 states listed below.
Writing for remembering