mirror of
https://github.com/webclinic017/drift.git
synced 2026-07-28 03:08:01 +00:00
13 lines
388 B
Python
13 lines
388 B
Python
|
|
import pandas as pd
|
||
|
|
|
||
|
|
from utils.helpers import has_enough_samples_to_train
|
||
|
|
import warnings
|
||
|
|
|
||
|
|
def check_data(X:pd.DataFrame, y:pd.Series, training_config:dict):
|
||
|
|
""" Returns True if data is valid, else returns False."""
|
||
|
|
|
||
|
|
if has_enough_samples_to_train(X, y, training_config) == False:
|
||
|
|
warnings.warn("Not enough samples to train")
|
||
|
|
return False
|
||
|
|
|
||
|
|
return True
|