typo found in `t81_558_class_14_03_anomaly.ipynb`
alik604 opened this issue · 3 comments
First of all thank you for posting notebooks. It's nice concise way for me to test out a new concept :)
The notebook t81_558_class_14_03_anomaly.ipynb
has typos in the last cell
score1 = np.sqrt(metrics.mean_squared_error(pred,x_normal_test))
print(f"Insample Normal Score (RMSE): {score1}".format(score1))
# score is the test set
# score2 is the whole dataset (- attacks)
Only the 2nd and 3rd to last print statements need to be changed
You are basically saying the out of sample/in-sample prints were flipped? I made that adjustment and also got rid of the stray .format(score1).
I recall they being two typos, I saw only one now
df_normal = df[normal_mask]
x_normal = df_normal.values
x_normal_train, x_normal_test = train_test_split(x_normal, test_size=0.25, random_state=42)
pred = model.predict(x_normal)
score2 = np.sqrt(metrics.mean_squared_error(pred,x_normal))
print(f"Insample Normal Score (RMSE): {score2}")
Regarding the last line, to my understanding, Insample implies it being from the training set. However, this appears to be all (normal) date
Sorry if I'm mistaken. Please feel free to close the request when ever you wish
Added more description. Training occurred entirely on normal data so the insample and out of sample both come from just normals. The final RMSE reports the error on the non-normal, which is higher, indicating an anomoly.