Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Last active October 31, 2023 22:26
Show Gist options
  • Save elijahbenizzy/693a5ba812aa74c3a9154b1cc1d380cb to your computer and use it in GitHub Desktop.
Save elijahbenizzy/693a5ba812aa74c3a9154b1cc1d380cb to your computer and use it in GitHub Desktop.
materializers = [
from_.csv(
path=source("location"),
target="titanic_data"
),
to.csv(
id="save_training_data",
dependencies=["train_set"],
combine=base.PandasDataFrameResult(),
path="./training_data.csv",
),
to.pickle(
id="save_trained_model",
dependencies=["trained_model"],
path="./model_saved.pickle"
),
to.png(
id="save_confusion_matrix_plot",
dependencies=["confusion_matrix_test_plot"],
path="./confusion_matrix_plot.png",
),
]
dr.materialize(
*materializers,
inputs={"location": "./data/titanic.csv", "test_size": 0.2, "random_state": 42}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment