Last active
November 6, 2021 15:43
-
-
Save khuyentran1401/ca16a8275b6c3874501b102a1d6ef3f2 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 prefect.engine.results import LocalResult | |
@task(result = LocalResult(dir='data/processed')) | |
def split_data(data: pd.DataFrame, test_data_ratio: float, classes: list) -> Dict[str, Any]: | |
"""Task for splitting the classical Iris data set into training and test | |
sets, each split into features and labels. | |
""" | |
X_train, X_test, y_train, y_test = ... | |
return dict( | |
train_x=X_train, | |
train_y=y_train, | |
test_x=X_test, | |
test_y=y_test, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment