Skip to content

Commit

Permalink
Update 05-dimensionality-reduction.md
Browse files Browse the repository at this point in the history
  • Loading branch information
qualiaMachine authored Sep 28, 2023
1 parent 5d6e62b commit cd74b25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _episodes/05-dimensionality-reduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ print(X_train.shape)
{: .language-python}

### Train a classifier
Train a classifier. Here, we will use something called a multilayer perceptron (MLP) which is a type of artificial neural network. We'll dive more into the details behind this model in the next episode. For now, just know that this model has thousands of coefficients/weights that must be estimated from the data. The total number of coefs is calculated below:
Train a classifier. Here, we will use something called a multilayer perceptron (MLP) which is a type of artificial neural network. We'll dive more into the details behind this model in the next episode. For now, just know that this model has thousands of coefficients/weights that must be estimated from the data. The total number of coefs is calculated below.

~~~
n_features = X_train.shape[1]
hidden_layer1_neurons = 64
Expand All @@ -175,6 +176,7 @@ total_coefficients = n_features * (hidden_layer1_neurons + 1) * (hidden_layer2_n
total_coefficients
~~~
{: .language-python}

~~~
from sklearn.neural_network import MLPClassifier
from sklearn.metrics import accuracy_score, confusion_matrix
Expand Down

0 comments on commit cd74b25

Please sign in to comment.