Skip to content

Instantly share code, notes, and snippets.

@khuyentran1401
Last active November 5, 2021 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khuyentran1401/4d050ce34cc4ed62a1632f1c44f93679 to your computer and use it in GitHub Desktop.
Save khuyentran1401/4d050ce34cc4ed62a1632f1c44f93679 to your computer and use it in GitHub Desktop.
from typing import Any, Dict, List
import pandas as pd
def load_data(path: str) -> pd.DataFrame:
...
def get_classes(data: pd.DataFrame, target_col: str) -> List[str]:
"""Task for getting the classes from the Iris data set."""
...
def encode_categorical_columns(data: pd.DataFrame, target_col: str) -> pd.DataFrame:
"""Task for encoding the categorical columns in the Iris data set."""
...
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.
"""
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment