Skip to content

Instantly share code, notes, and snippets.

@neelindresh
Created July 11, 2022 11:35
Show Gist options
  • Save neelindresh/e58507f37517d90b9925280e3a0339d9 to your computer and use it in GitHub Desktop.
Save neelindresh/e58507f37517d90b9925280e3a0339d9 to your computer and use it in GitHub Desktop.
with mlp.run():
mlp.set_tags(["Classification","test run","dtree"])
model=DecisionTreeClassifier()
model.fit(trainx, trainy)
predictions=model.predict(testx)
mlp.log_metrics({"Accuracy":accuracy_score(testy,predictions),"Precision": precision_score(testy,predictions,average='macro')})
mlp.log_metric("Recall", recall_score(testy,predictions,average='macro'))
mlp.log_metric("F1", f1_score(testy,predictions,average='macro'))
mlp.register_artifact("train.csv", trainx)
mlp.register_artifact("test.csv", testx,artifact_type="testing")
mlp.scikit_learn.register_model("dtree", model)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment