Challenge - Build a Neural Network and fine-tune it
In this lesson, you need to build a neural network and fine-tune it.
We'll cover the following
Challenge - Build a Neural Network and try to fine-tune it
In this challenge, you need to build a simple forward neural network and try to fine-tune it. The main purpose of this challenge is to give you an intuitive sense of how different parameters affect network performance. So, you should do the following things:
- Create a dataset from
make_classification
. - Split the data into 2 parts, train and test. The test set accounts for 20%. Use the
42
as the random seed. - Build a neural network from
MLPClassifier
. - Try different parameters, such as
batch_size
,hidden_layer_sizes
, orlearning_rate_init
. - Return the
F1-score
on the test set.
Note: In order to make sure that the results are comparable. Please use the following code to generate data.
X, y = datasets.make_classification(n_samples=1000, n_features=30, random_state=10)
Get hands-on with 1200+ tech skills courses.