Created
November 15, 2020 20:53
-
-
Save claustres/ddbd3a3f89038374ccfa497cfd5ac35a to your computer and use it in GitHub Desktop.
Machine Learning in a Nutshell
This file contains hidden or 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
// Select the model to use and its hyperparameters | |
model = new Model(hyperparameters) | |
// Split available data into train and test datasets | |
x_train, y_train, x_test, y_test = split_data(x, y) | |
// Perform training | |
model.fit(x_train, y_train) | |
// Compute model performance over test dataset | |
model.compute_accuracy(x_test, y_test) | |
// Use model to predict new data | |
y = model.predict(x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment