Introduction of Machine Learning

Source: Internet
Author: User
Keywords machine learning machine learning tutorial machine learning python
If you've never used machine learning, you think, isn't this programming? Or what is machine learning? First of all, we do use programming language to implement machine learning model. We use the same programming language and hardware as other fields of computer. But not every program uses machine learning. For the second question, defining machine learning precisely is as difficult as defining what mathematics is, but we try to provide some intuitive explanations in this chapter.
An example
Most of the computer programs we interact with on a daily basis can be implemented with the most basic commands. When you add a product to the shopping cart, you trigger the e-commerce program of e-commerce to insert a product ID and your user ID into a database table called shopping cart. You can do this with the most basic programming instructions before you see any real customers. If you find that you can do this, then you should not use machine learning.
Fortunately for machine learning scientists, most applications are not that easy. Think about how to respond to the word "Okay" and "Imagine Google". If you write this program in a room with only you and a code editor, what do you do? You might imagine the following procedure
if input_ command == 'Okey, Google': run_ voice_ assistant()
But what you can actually get is the raw voice signal from the microphone, probably 44000 sample points per second. What rules are needed to convert these sample points into a string? Or simply, to determine if there is a wake-up word in these signals.

Machine learning is a method of data analysis that automates analytical model building. It is a branch of artificial intelligence based on the idea that systems can learn from data.

If you're stuck with this problem, don't worry. That's why we need machine learning.

Although we don't know how to tell the machine to convert the voice signal into the corresponding string, we can. We can collect a huge data set containing a large number of voice signals, and whether each voice model corresponds to the wake-up word we want. In machine learning, instead of directly designing a system to identify wake-up words, we write a flexible program whose behavior can be changed when reading data sets. So we're not going to write a wake-up word recognizer directly, but a program that can recognize wake-up words when it provides a huge tagged data set. You can think of it as programming with data. In other words, we need to train the machine learning model with data, and the process is usually as follows:
Initialize a model that can do almost nothing;
Capture some annotated data sets (such as audio paragraph and whether it is a wake-up word or not);
Modify the model so that it can perform tasks more accurately on the captured data sets (for example, make it more accurate in judging whether these captured audio paragraphs are wake-up words);
Repeat steps 2 and 3 above until the model looks good.
Dazzling machine learning applications
The core idea behind machine learning is to design a program so that it can improve its ability to perform a certain task, rather than a program with fixed behavior. Machine learning includes the definition of various problems, provides many different algorithms, and can solve various problems in different fields. We talked about an example of supervised learning applied to language recognition.
Because machine learning provides a variety of tools that can use data to solve problems that simple rules can't or can't solve, it is widely used in search engine, unmanned driving, machine translation, medical diagnosis, spam filtering, playing games, face recognition, data matching, credit rating and image filtering.
Although these problems are various, they share a common pattern that can be solved by machine learning models. The most common way to describe these problems is through mathematics, but unlike other books on machine learning and neural networks, we focus on real data and code.
The simplest elements of machine learning
There are four elements to a successful machine learning: data, a model to transform data, a loss function to measure the quality of the model, and an algorithm to minimize the loss function by adjusting the weight of the model.
Data. The more, the better. In fact, data is at the heart of the revival of deep learning, because complex nonlinear models require more data than other machine learning. Examples of data include
Pictures: for example, a picture of your mobile phone may contain cats, dogs, dinosaurs, high school reunion or yesterday's dinner
Text: email, news and wechat chat records
Voice: audio books and phone records
Structure data: jupyter notebook (with text, pictures and code), web page, car rental bill and electricity meter
Model. Usually the data is very different from what we want in the end. For example, we want to know whether the person in the picture is happy, so we need to turn 10 million pixels into a probability value of happiness. Usually we need to apply several nonlinear functions (such as neural networks) to the data
Loss function. We need to compare the error between the output of the model and the real value. The loss function helps us decide whether Amazon's stock will be worth $1500 by the end of 2017. This function can be very different depending on whether we want a short line or a long line.
Training. Usually, there are many parameters in a model. We learn these parameters by minimizing the loss function. Unfortunately, even if we do well, there is no guarantee that we can still do well on new data that we haven't seen before.
Training error. This is the error of the model in evaluating the data set used to train the model. This is similar to the score we got on the mock paper before the exam. It has a certain direction, but it does not necessarily guarantee the true test score.
Test error. This is the error of the model on the new data that has not been seen before, which may be different from the training error (statistically called over fitting). This is similar to the model test before the exam, get high scores, but actually test up but error. (one of the authors got a high score for the real GRE test. After reciting the Red Treasure book, he really took the exam, and finally got a low score just enough. Later I realized that this was because the Red Treasure Book contained a lot of real topics.)
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.