Skip to content

Commit ca64ad7

Browse files
authored
Update deploy-onnx.md
Updated notebook code for section "Train the Pipeline",
1 parent b6eedcb commit ca64ad7

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

articles/sql-database-edge/deploy-onnx.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.subservice: machine-learning
88
ms.topic: conceptual
99
author: dphansen
1010
ms.author: davidph
11-
ms.date: 03/26/2020
11+
ms.date: 04/23/2020
1212
---
1313

1414
# Deploy and make predictions with an ONNX model in SQL Database Edge Preview
@@ -49,16 +49,12 @@ boston = load_boston()
4949
boston
5050

5151
df = pd.DataFrame(data=np.c_[boston['data'], boston['target']], columns=boston['feature_names'].tolist() + ['MEDV'])
52-
53-
# x contains all predictors (features)
54-
x = df.drop(['MEDV'], axis = 1)
55-
56-
# y is what we are trying to predict - the median value
57-
y = df.iloc[:,-1]
58-
52+
53+
target_column = 'MEDV'
54+
5955
# Split the data frame into features and target
60-
x_train = df.drop(['MEDV'], axis = 1)
61-
y_train = df.iloc[:,-1]
56+
x_train = pd.DataFrame(df.drop([target_column], axis = 1))
57+
y_train = pd.DataFrame(df.iloc[:,df.columns.tolist().index(target_column)])
6258

6359
print("\n*** Training dataset x\n")
6460
print(x_train.head())

0 commit comments

Comments
 (0)