BIBA - Clustering - Introduction Neural Networks
6 important questions on BIBA - Clustering - Introduction Neural Networks
What is the difference between AI, ML and Deep Learning?
- AI: Teaching a machine to do tasks that are “easy” for humans
- ML: Recognize patterns in data: KNN, Decision Trees, Naïve bayes, etc
- Neural Networks (DL): multiple “hidden” layers including many neurons
How does a neural network process data?
What is a multilayer perceptron and how is the output computed?
- Most simple form of a neural network is a multilayer perceptron perceptron and one perceptron = one neuron
- Output = weighted sum of output previous layers + bias
- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding
What is an activation function in a neural network?
- Activiation function is something that makes sure the model is not linear, since you want to find non linear problems
- Most simple activation function is Step function (binary)
- If value>0 --> activate
- If value <=0 --> do not activate
What is a sigmoid activation function and what is the problem with this function?
- Function where you scale the probability between 0 and 1
- Problem = if you output a zero all outputs of nodes are zero
- can saturate and kill gradients if activation is 0 or 1
- Binary logistic regression:
Code the MLP in Python
- example_df = df
- predictors = ['fat', 'salt']
- outcome = 'acceptance'
- X = example_df[predictors]
- y = example_df[outcome]
- classes = sorted(y.unique())
- clf = MLPClassifier(hidden_layer_sizes=(3),
- activation='logistic', solver='lbfgs’, random_state=1)
- clf.fit(X, y)
- clf.predict(X)
- # Network structure
- print('Intercepts: \n’, clf.intercepts_, '\n')
- print('Weights: \n’, clf.coefs_)
- # Prediction
- pd.concat([example_df, pd.DataFrame(clf.predict_proba(X), columns=classes)], axis=1)
The question on the page originate from the summary of the following study material:
- A unique study and practice tool
- Never study anything twice again
- Get the grades you hope for
- 100% sure, 100% understanding