Created
September 21, 2022 09:56
-
-
Save dtrizna/12cd503f50f7fea209a3c9c89f86bed6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.neural_network import MLPClassifier | |
X_full_dataset = [...] | |
y_full_dataset = [...] | |
mlpModel = MLClassifier( | |
hidden_layer_sizes=(128,64) | |
) | |
mlpModel.fit(full_dataset, y) | |
false_positives = [ | |
"for i in $(seq 1 10); do nc -znv 127.0.0.1 8080; sleep 80; done", | |
"curl raw.internalgit.com/prometeus_install.sh | bash" | |
] | |
# update model on subset of data | |
mlpModel.partial_fit( | |
hvwpt.transform( | |
false_positives, | |
np.array([0]*len(false_positives), dtype=int) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment