Machine Learning
Scikit Learn 
-
Splitting and scaling the data (Standard and MinMax scalers)
-
Supervised Learning
-
Unsupervised Learning
Generic code:
from sklearn.model_family import ModelAlgo
mymodel = ModelAlgo(param1,param2)
mymodel.fit(X_train,y_train)
predictions = mymodel.predict(X_test)
from sklearn.metrics import error_metric
performance = error_metric(y_test,predictions)
Keras / Tensorflow 
Choosing the activation function of the last layer
Last layer of network:
-
Regression: no activation function with one neuron
-
Binary classification:
sigmoidwith one neuron -
Multi-class classification:
softmaxwith as many neurons as classes to predict
Choosing an optimizer and loss
Keep in mind what kind of problem you are trying to solve:
# For a multi-class classification problem
model.compile(optimizer='rmsprop',
loss='categorical_crossentropy',
metrics=['accuracy'])
# For a binary classification problem
model.compile(optimizer='rmsprop',
loss='binary_crossentropy',
metrics=['accuracy'])
# For a mean squared error regression problem
model.compile(optimizer='rmsprop',
loss='mse')