File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
articles/sql-database-edge Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ms.subservice: machine-learning
8
8
ms.topic : conceptual
9
9
author : dphansen
10
10
ms.author : davidph
11
- ms.date : 03/26 /2020
11
+ ms.date : 04/23 /2020
12
12
---
13
13
14
14
# Deploy and make predictions with an ONNX model in SQL Database Edge Preview
@@ -49,16 +49,12 @@ boston = load_boston()
49
49
boston
50
50
51
51
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
+
59
55
# 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)])
62
58
63
59
print (" \n *** Training dataset x\n " )
64
60
print (x_train.head())
You can’t perform that action at this time.
0 commit comments