Skip to content

Commit 6aa5848

Browse files
authored
Merge pull request #146370 from sdgilley/patch-57
fix code
2 parents 28396c2 + a79824c commit 6aa5848

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

articles/machine-learning/tutorial-power-bi-custom-model.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Create a new *code cell* in your notebook. Then copy the following code and past
113113
import joblib
114114
from sklearn.linear_model import Ridge
115115

116-
model = Ridge().fit(X,y)
116+
model = Ridge().fit(X_df,y_df)
117117
joblib.dump(model, 'sklearn_regression_model.pkl')
118118
```
119119

@@ -281,10 +281,8 @@ We recommend that you test the web service to ensure it works as expected. To re
281281
```python
282282
import json
283283

284-
285284
input_payload = json.dumps({
286-
'data': X_df[0:2].values.tolist(),
287-
'method': 'predict' # If you have a classification model, you can get probabilities by changing this to 'predict_proba'.
285+
'data': X_df[0:2].values.tolist()
288286
})
289287

290288
output = service.run(input_payload)

0 commit comments

Comments
 (0)