Neural Network
In this lesson, we briefly introduce the Neural Network.
We'll cover the following...
We'll cover the following...
Although sklearn
focuses on traditional Machine Learning, it still provides some methods to build a simple forward neural network. In this lesson, we give a simple introduction about how to use it.
Modeling with MLPClassifier
Let’s skip data loading and splitting, and create an MLPClassifier
object from the neural_network
module. The MLP
stands for a multilayer perceptron. As you can see, the NN requires a lot of parameters. If you are familiar with Deep Learning, you may know that fine-tuning is a very important and time-consuming task in a neural network.
Following are some parameters we set below:
batch_size
: In general, a neural network uses stochastic optimizers, so every time it uses a mini-batch sample to train.solver
: Optimizer is another big topic in Deep Learning, here we just choose the simplest one.shuffle
: Whether to shuffle