Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _prepare_ml_problem(train, test, metadata):
fm = FeatureMaker(metadata)
x_train, y_train = fm.make_features(train)
x_test, y_test = fm.make_features(test)
return x_train, y_train, x_test, y_test, _MODELS[metadata['problem_type']]