One of the main concerns in machine learning is finding a best-fit line or curve that is just curvy enough to mimic the general shape of a data set but isn’t so curvy that it can’t be generalized to allow for good guesses about new data points.This is where polynomial regression falls over..We have to explicitly tell polynomial regression how curvy we want the best-fit curve to be before we use it, and that isn’t an easy thing to decide, especially when the data is more complicated.In the examples so far, our data points have been in only two dimensions—such as a value for shoe size and another for height—which means we have been able to plot them on two-dimensional graphs..In doing that, it is fairly easy to see the general shape of the data..But this is not often the case in machine-learning problems that have more than two dimensions..And if we don’t know what shape the data is, we can’t really tell polynomial regression how curvy to make a best-fit line.With a little extra effort, neural networks can also be used to answer yes/no questions about the data instead of returning numbers.One option is to try polynomial regression many times with different levels of flexibility and see which one works best..But what we really need is a machine-learning technique that has the flexibility to be as curvy as it needs to be but also limits its curviness to be able to do well in generalizing new data.This flexibility issue is when data scientists generally move on from linear and polynomial regression to use a neural network instead..On its own, a neural network is very much like polynomial regression in that it is able to learn data sets that have very curvy shapes..They don’t solve the problem of overfitting on their own, but when combined with a technique called regularization, everything tends to work out.The implementation details of how neural networks and regularization work aren’t really important to understanding the basics of machine learning..The key things to remember are that neural networks are very good at learning the shapes of complicated data sets—more so than linear or polynomial regression—and that regularization helps prevent the neural network from overfitting the data.Getting Computers to Answer QuestionsFor the techniques covered so far—linear regression, polynomial regression, and neural networks—we’ve only looked at how we can train computers to give us a number depending on the data we give it..The shoe size and height model gives us a height number when we give it a shoe size number; similarly, the model for house cost according to the number of rooms gives us a cost number when we give it a room number.But a number output isn’t always what we want..Sometimes we want a machine-learning model to answer a question instead..For example, if you are selling your house, you may not care only about a machine working out how much your house is worth, but you might want to also find out whether the house will sell within six weeks.The good news is that there are machine-learning techniques available—similar to the ones we’ve already seen—that answer a specific question instead of giving a number.. More details