Answers.Body: <p>I think SmallChess makes a good point on your first question, so I want to focus on the repetition of different problems.</p>
  
  <p>I could see you meaning several different things by this:</p>
  
  <ol>
  <li><strong>Why does every machine learning course out there do MNIST/real estate values/other simple problems?</strong> If you want to learn how to solve a complex problem, you need to understand how the individual parts come together. You could jump straight to a classifier trained on 10,000 image categories using the current, most advanced techniques. However, it's much easier to see how certain algorithms work better with certain types of problems when starting with small, easy ones that can be solved in a few minutes. You can try many different sets of algorithms and hyperparameters on a problem that takes 3 minutes to train on your local computer. Then, you get a sense of what each part contributes to the whole. This will help you progress a lot faster than training a network that takes 2 weeks on multiple GPUs each time and trying to figure out what's going on. In addition, you don't have a ton of layers of complexity to try and understand. You get a feel for a simple approach and once you understand it, add complexity. It's the same with learning anything else. My physics class started with gravity and throwing a ball in the air, not with relativity.</li>
  <li><strong>Why are there so many people out there doing all these different approaches to image classification/chatbots/reinforcement learning/whatever?</strong> Machine learning is a not a solved problem. There are a set of algorithms we understand pretty well. Fitting a polynomial to a set of points doesn't really have any hidden tricks up its sleeves. There are plenty of other algorithms that we're still figuring out. Sometimes, a neural network never converges, or only converges to some limit. When you change the hyperparameters, it converges or has better accuracy or something. But sometimes, it generalizes poorly. Looking at 10 million parameters and deciding which one screwed up is hard, so people research how to solve these problems. Or, often, current "state-of-the-art" approaches really aren't at the point where improvement is rare. Every single year, they hold another competition and lots of people come up with better ways to solve it, either with new algorithms or better refinements to the ones they were already using. There are still so many things not yet understood about this field and it seems there are major discoveries constantly.</li>
  <li><strong>Why can't I just use someone else's pre-trained methods?</strong> You can! If you can find someone who has put their model out there (for instance, <a href="https://github.com/tensorflow/models" rel="nofollow noreferrer">TensorFlow</a>), you can take it and run it for yourself. Some researchers put out their already trained models and some don't, so you might get lucky. The problem is, you have to decide if the model they trained fits your needs. If you really need a visual classifier that can detect penguins, and you download one that was trained on 1,000 classes, none of which were penguins, you're out of luck. So, definitely, look for someone else who might have already done it. Just make sure that it covers what you actually need.</li>
  </ol>
  
  <p>It doesn't really fit into the above points, but I hope I can convey that machine learning is just another tool. Taking your comment about wanting to build a robot companion for a toddler, you need to decide whether it fits the problem you have. If it has some wheels for moving the base around, you could spend a ton of time building a controller with reinforcement learning. Or, you could program and implement a PID controller in a couple days. Does it need to detect the surroundings and label objects in camera images to interact with them? Then you probably need a CNN of some kind to do it accurately. Does it need to listen to the toddler's voice commands to go bring a ball back? Then, you need some way to interpret those, and it might be another machine learning algorithm. But let's say that you find several pre-trained algorithms that do the tasks you need. They still need to be linked together in whatever overall software you have. Analogously, if you were using someone else's path planning algorithm, you still need to define the goals, take the outputs and input them into the controller, and update your state estimate.</p>
  
  <p>There are lots of people hoping to figure out machine learning algorithms that can just do everything like humans do. End-to-end learning tries to go directly from input data to actions (<a href="https://arxiv.org/pdf/1604.07316.pdf" rel="nofollow noreferrer">self-driving cars</a>). Others are trying to create an artificial general intelligence that thinks and interacts with the world like we do. The point is, there are so many things that haven't been solved yet. Your robot won't be as good as a 3 year-old at many things, but that's not the point. ML gives the robot the ability to be really good at some certain thing, like figuring out where the toy it's looking at is. But it isn't a "wave your hands and it all works" solution.</p>
  
  <p><strong>tl;dr</strong> Use ML when it fits the problem. But it's a hard problem, and there are a lot of things to understand about it if you want to use it. It's a tool in your toolbox.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-30T21:34:36.597Z
Answers.LastActivityDate: 2017-11-30T21:34:36.597Z
Answers.UserDisplayName: pshlady
Answers.Body: <p><em>Disclosure: I am a product manager on Google Cloud Platform.</em></p>
  
  <blockquote>
    <p>[...] why does everyone have to repeat the effort of learning the same things?</p>
    
    <p>If Google has already learned cats, or if someone already has a program to recognize handwritten digits, can this knowledge be shared and re-used? Or is it just a matter of paying for them?</p>
  </blockquote>
  
  <p>You don't have to rebuild these machine learning models from scratch; you can reuse prebuilt machine learning algorithms, e.g., Google Cloud provides the following hosted APIs as a service:</p>
  
  <ul>
  <li><a href="https://cloud.google.com/vision/" rel="nofollow noreferrer">Google Cloud Vision API</a> to recognize images and provide text labels</li>
  <li><a href="https://cloud.google.com/speech/" rel="nofollow noreferrer">Google Cloud Speech API</a> to convert speech to text</li>
  <li><a href="https://cloud.google.com/natural-language/" rel="nofollow noreferrer">Google Cloud Natural Language API</a> to understand language, find entities, etc.</li>
  <li><a href="https://cloud.google.com/products/machine-learning/" rel="nofollow noreferrer">and more...</a></li>
  </ul>
  
  <p>You can put these APIs together to build interesting applications, e.g.,</p>
  
  <ul>
  <li><a href="https://www.youtube.com/watch?v=HpPyhsC4q9M" rel="nofollow noreferrer">build a smart Raspberry Pi bot with Cloud Vision and Speech APIs</a> (video presentation; <a href="https://www.raspberrypi.org/blog/raspberry-pi-cloud-vision-google-io/" rel="nofollow noreferrer">blog post + video overview</a>)</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-01T22:05:14.923Z
Answers.LastActivityDate: 2018-01-01T22:20:02.853Z
Answers.LastEditDate: 2018-01-01T22:20:02.853Z
Answers.UserDisplayName: Misha Brukman
Answers.Body: <blockquote>
    <p>...why does everyone have to repeat the effort of learning the same things...</p>
  </blockquote>
  
  <p>Most problems are different if you go into the details. Even if the problems were exactly identical, implementation differs. You might like Google Chrome, but I might prefer Mozilla Firefox. They both load the Internet pages!</p>
  
  <blockquote>
    <p>...How much effort and zetabytes of data do we have to keep just to reach the brain power of, say, a 3-year old...</p>
  </blockquote>
  
  <p>That depends on what you want to do. A 3-year kid can recognise people quite well, but this is hard for computers. However, computer can do regression much better than a 3-year old ...</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-22T08:50:19.127Z
Answers.LastActivityDate: 2017-11-22T08:50:19.127Z
Answers.UserDisplayName: SmallChess
Answers.Body: <blockquote>
    <p>This approach sounds great but is it practical? How much effort and zetabytes of data do we have to keep just to reach the brain power of, say, a 3-year old, who can recognize dogs, cats, tigers, a Mustang, trucks, a hamburger restaurant, and so on?</p>
  </blockquote>
  
  <p>We don't know. More critically, we don't know if any technique of machine learning is "the way humans learn", thus we have no theoretical guarantee that what we are doing brings us any closer to true AI. Also, there is much more to intelligence that classification don't forget about that.</p>
  
  <blockquote>
    <p>My next question is why does everyone have to repeat the effort of learning the same things?</p>
  </blockquote>
  
  <p>Nowadays people often train their architecture on the <a href="http://rodrigob.github.io/are_we_there_yet/build/classification_datasets_results.html" rel="nofollow noreferrer">same few datasets</a> as a benchmark to compare it with other cutting edge techniques. These datasets are also generally well understood, thus its easier to troubleshoot issues that might come up.</p>
  
  <blockquote>
    <p>If Google has already learned cats, or if someone already has a program to recognize handwritten digits, can this knowledge be shared and re-used? Or is it just a matter of paying for them?</p>
  </blockquote>
  
  <p>In principle yes, but likely no. Many modern machine learning techniques have separate training/testing phases. Training is when the algorithm gets to "learn" per say, and testing is when we get to test it. If one releases the architecture after it has been trained, in principle you should be able to achieve the same results.</p>
  
  <p>Or more generally, once they release a paper detailing how they built the system, in principle you should be able to build it yourself as well. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-31T18:52:50.760Z
Answers.LastActivityDate: 2017-12-31T18:52:50.760Z
Answers.UserDisplayName: k.c. sayz 'k.c sayz'
Body: <p>I have started on Andrew Ng's machine learning course. It seems that machine learning is learning correlations with known data based on as many parameters as possible. For example, if we collect data on existing property prices with information on the land area, built-in area, type of building, age of the building, etc, it is possible to predict the price of another property if we input the value of the various parameters of this property.</p>
  <p>Similarly, if we keep the images (the black and white pixels) of cats, we can tell whether a new picture is a cat if it bears some resemblance to the pixels of existing labeled cat images.</p>
  <ol>
  <li><p>This approach sounds great, but is it practical? How much effort and zettabytes of data do we have to keep just to reach the brainpower of, say, a 3-year old, who can recognize dogs, cats, tigers, a Mustang, trucks, a hamburger restaurant, and so on?</p>
  </li>
  <li><p>Why does everyone have to repeat the effort of learning the same things?</p>
  </li>
  <li><p>If Google has already learned cats, or if someone already has a program to recognize handwritten digits, can this knowledge be shared and re-used? Or is it just a matter of paying for them?</p>
  </li>
  </ol>
  
Tags: <machine-learning><transfer-learning>
Title: Why do we have to train a model from scratch every time?
UserDisplayName: u936293
ThreadText: # Why do we have to train a model from scratch every time?
  
  (Asked by: username_0 on 2017-11-22)
  
  I have started on Andrew Ng's machine learning course. It seems that machine learning is learning correlations with known data based on as many parameters as possible. For example, if we collect data on existing property prices with information on the land area, built-in area, type of building, age of the building, etc, it is possible to predict the price of another property if we input the value of the various parameters of this property.
  
  Similarly, if we keep the images (the black and white pixels) of cats, we can tell whether a new picture is a cat if it bears some resemblance to the pixels of existing labeled cat images.
  
  1. This approach sounds great, but is it practical? How much effort and zettabytes of data do we have to keep just to reach the brainpower of, say, a 3-year old, who can recognize dogs, cats, tigers, a Mustang, trucks, a hamburger restaurant, and so on?
  2. Why does everyone have to repeat the effort of learning the same things?
  3. If Google has already learned cats, or if someone already has a program to recognize handwritten digits, can this knowledge be shared and re-used? Or is it just a matter of paying for them?
  
  **Tags:** machine-learning, transfer-learning
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_1 on 2017-11-30. Score: 1 | Accepted answer
  
  I think username_3 makes a good point on your first question, so I want to focus on the repetition of different problems.
  
  I could see you meaning several different things by this:
  
  1. **Why does every machine learning course out there do MNIST/real estate values/other simple problems?** If you want to learn how to solve a complex problem, you need to understand how the individual parts come together. You could jump straight to a classifier trained on 10,000 image categories using the current, most advanced techniques. However, it's much easier to see how certain algorithms work better with certain types of problems when starting with small, easy ones that can be solved in a few minutes. You can try many different sets of algorithms and hyperparameters on a problem that takes 3 minutes to train on your local computer. Then, you get a sense of what each part contributes to the whole. This will help you progress a lot faster than training a network that takes 2 weeks on multiple GPUs each time and trying to figure out what's going on. In addition, you don't have a ton of layers of complexity to try and understand. You get a feel for a simple approach and once you understand it, add complexity. It's the same with learning anything else. My physics class started with gravity and throwing a ball in the air, not with relativity.
  2. **Why are there so many people out there doing all these different approaches to image classification/chatbots/reinforcement learning/whatever?** Machine learning is a not a solved problem. There are a set of algorithms we understand pretty well. Fitting a polynomial to a set of points doesn't really have any hidden tricks up its sleeves. There are plenty of other algorithms that we're still figuring out. Sometimes, a neural network never converges, or only converges to some limit. When you change the hyperparameters, it converges or has better accuracy or something. But sometimes, it generalizes poorly. Looking at 10 million parameters and deciding which one screwed up is hard, so people research how to solve these problems. Or, often, current "state-of-the-art" approaches really aren't at the point where improvement is rare. Every single year, they hold another competition and lots of people come up with better ways to solve it, either with new algorithms or better refinements to the ones they were already using. There are still so many things not yet understood about this field and it seems there are major discoveries constantly.
  3. **Why can't I just use someone else's pre-trained methods?** You can! If you can find someone who has put their model out there (for instance, [TensorFlow](https://github.com/tensorflow/models)), you can take it and run it for yourself. Some researchers put out their already trained models and some don't, so you might get lucky. The problem is, you have to decide if the model they trained fits your needs. If you really need a visual classifier that can detect penguins, and you download one that was trained on 1,000 classes, none of which were penguins, you're out of luck. So, definitely, look for someone else who might have already done it. Just make sure that it covers what you actually need.
  
  It doesn't really fit into the above points, but I hope I can convey that machine learning is just another tool. Taking your comment about wanting to build a robot companion for a toddler, you need to decide whether it fits the problem you have. If it has some wheels for moving the base around, you could spend a ton of time building a controller with reinforcement learning. Or, you could program and implement a PID controller in a couple days. Does it need to detect the surroundings and label objects in camera images to interact with them? Then you probably need a CNN of some kind to do it accurately. Does it need to listen to the toddler's voice commands to go bring a ball back? Then, you need some way to interpret those, and it might be another machine learning algorithm. But let's say that you find several pre-trained algorithms that do the tasks you need. They still need to be linked together in whatever overall software you have. Analogously, if you were using someone else's path planning algorithm, you still need to define the goals, take the outputs and input them into the controller, and update your state estimate.
  
  There are lots of people hoping to figure out machine learning algorithms that can just do everything like humans do. End-to-end learning tries to go directly from input data to actions ([self-driving cars](https://arxiv.org/pdf/1604.07316.pdf)). Others are trying to create an artificial general intelligence that thinks and interacts with the world like we do. The point is, there are so many things that haven't been solved yet. Your robot won't be as good as a 3 year-old at many things, but that's not the point. ML gives the robot the ability to be really good at some certain thing, like figuring out where the toy it's looking at is. But it isn't a "wave your hands and it all works" solution.
  
  **tl;dr** Use ML when it fits the problem. But it's a hard problem, and there are a lot of things to understand about it if you want to use it. It's a tool in your toolbox.
  
  
  ---
  
  ### Answer by username_2 on 2018-01-01. Score: 2
  
  *Disclosure: I am a product manager on Google Cloud Platform.*
  
  > [...] why does everyone have to repeat the effort of learning the same things?
  >
  > If Google has already learned cats, or if someone already has a program to recognize handwritten digits, can this knowledge be shared and re-used? Or is it just a matter of paying for them?
  
  You don't have to rebuild these machine learning models from scratch; you can reuse prebuilt machine learning algorithms, e.g., Google Cloud provides the following hosted APIs as a service:
  
  * [Google Cloud Vision API](https://cloud.google.com/vision/) to recognize images and provide text labels
  * [Google Cloud Speech API](https://cloud.google.com/speech/) to convert speech to text
  * [Google Cloud Natural Language API](https://cloud.google.com/natural-language/) to understand language, find entities, etc.
  * [and more...](https://cloud.google.com/products/machine-learning/)
  
  You can put these APIs together to build interesting applications, e.g.,
  
  * [build a smart Raspberry Pi bot with Cloud Vision and Speech APIs](https://www.youtube.com/watch?v=HpPyhsC4q9M) (video presentation; [blog post + video overview](https://www.raspberrypi.org/blog/raspberry-pi-cloud-vision-google-io/))
  
  
  ---
  
  ### Answer by username_3 on 2017-11-22. Score: 0
  
  > ...why does everyone have to repeat the effort of learning the same things...
  
  Most problems are different if you go into the details. Even if the problems were exactly identical, implementation differs. You might like Google Chrome, but I might prefer Mozilla Firefox. They both load the Internet pages!
  
  > ...How much effort and zetabytes of data do we have to keep just to reach the brain power of, say, a 3-year old...
  
  That depends on what you want to do. A 3-year kid can recognise people quite well, but this is hard for computers. However, computer can do regression much better than a 3-year old ...
  
  
  ---
  
  ### Answer by username_4 on 2017-12-31. Score: 0
  
  > This approach sounds great but is it practical? How much effort and zetabytes of data do we have to keep just to reach the brain power of, say, a 3-year old, who can recognize dogs, cats, tigers, a Mustang, trucks, a hamburger restaurant, and so on?
  
  We don't know. More critically, we don't know if any technique of machine learning is "the way humans learn", thus we have no theoretical guarantee that what we are doing brings us any closer to true AI. Also, there is much more to intelligence that classification don't forget about that.
  
  > My next question is why does everyone have to repeat the effort of learning the same things?
  
  Nowadays people often train their architecture on the [same few datasets](http://rodrigob.github.io/are_we_there_yet/build/classification_datasets_results.html) as a benchmark to compare it with other cutting edge techniques. These datasets are also generally well understood, thus its easier to troubleshoot issues that might come up.
  
  > If Google has already learned cats, or if someone already has a program to recognize handwritten digits, can this knowledge be shared and re-used? Or is it just a matter of paying for them?
  
  In principle yes, but likely no. Many modern machine learning techniques have separate training/testing phases. Training is when the algorithm gets to "learn" per say, and testing is when we get to test it. If one releases the architecture after it has been trained, in principle you should be able to achieve the same results.
  
  Or more generally, once they release a paper detailing how they built the system, in principle you should be able to build it yourself as well.
  
  
  ---
  
  