From 07da4efa5089de3a2135c1d42a21ea3bc57ac792 Mon Sep 17 00:00:00 2001 From: Roman Lytvyn Date: Thu, 20 Feb 2020 22:15:57 +0100 Subject: [PATCH] fix model input features (#198) Co-authored-by: Eugene Fedorenko --- diabetes_regression/scoring/score.py | 4 ++-- diabetes_regression/training/train.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/diabetes_regression/scoring/score.py b/diabetes_regression/scoring/score.py index e6c77aa8..4acd5c8d 100644 --- a/diabetes_regression/scoring/score.py +++ b/diabetes_regression/scoring/score.py @@ -48,8 +48,8 @@ def init(): input_sample = numpy.array([ - [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], - [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]]) + [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0], + [10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0]]) output_sample = numpy.array([ 5021.509689995557, 3693.645386402646]) diff --git a/diabetes_regression/training/train.py b/diabetes_regression/training/train.py index e3bdca27..6e40c2b7 100644 --- a/diabetes_regression/training/train.py +++ b/diabetes_regression/training/train.py @@ -95,8 +95,8 @@ def main(): dataset = run.input_datasets['training_data'] if (dataset): df = dataset.to_pandas_dataframe() - X = df.values - y = df.Y + X = df.drop('Y', axis=1).values + y = df['Y'].values else: e = ("No dataset provided") print(e)