Precision = TP/TP+FP
Recall = TP/TP+FN
F1-Score = 2*(Recall * Precision) / (Recall + Precision)
Accuracy = TP+TN/TP+TN+FP+FN
d*e=i*b
is the formula used, wherein ‘d’ is the dataset, ‘e’ is the number of epochs, ‘i’ is the number of iterations, and ‘b’ is the batch size.#Rescaling data
import pandas
import scipy
import numpy
from sklearn.preprocessing import MinMaxScaler
names = ['Ramu', 'Ramana', 'Mounika', 'Sathya', 'raj', 'mani', 'samu', 'venu', 'sam']
Dataframe = pandas.read_csv(url, names=names)
Array = dataframe.values
# Splitting the array into input and output
X = array[:,0:8]
Y = array[:,8]
Scaler = MinMaxScaler(feature_range=(0, 1))
rescaledX = scaler.fit_transform(X)
# Summarizing the modified data
numpy.set_printoptions(precision=3)
print(rescaledX[0:5,:])
factor()
and as.factor()
are used to convert variables into factors.Prediction | Predicted Yes | Predicted No |
---|---|---|
Actual Yes | True Positive (TP) | False Negative (FN) |
Actual No | False Positive (FP) | True Negative (TN) |
F1
score to be a measure of the model’s accuracy. The F1
score is a weighted average of precision and recall scores.F1 = 2TP/2TP + FP + FN