Skip to content

Commit 6676b0b

Browse files
committed
Updated: markdown to clarify no target variable for CSV inference
1 parent 0c395b5 commit 6676b0b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

introduction_to_applying_machine_learning/xgboost_direct_marketing/xgboost_direct_marketing_sagemaker.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,9 @@
511511
"## Evaluation\n",
512512
"There are many ways to compare the performance of a machine learning model, but let's start by simply comparing actual to predicted values. In this case, we're simply predicting whether the customer subscribed to a term deposit (`1`) or not (`0`), which produces a simple confusion matrix.\n",
513513
"\n",
514-
"First we'll need to determine how we pass data into and receive data from our endpoint. Our data is currently stored as NumPy arrays in memory of our notebook instance. To send it in an HTTP POST request, we'll serialize it as a CSV string and then decode the resulting CSV."
514+
"First we'll need to determine how we pass data into and receive data from our endpoint. Our data is currently stored as NumPy arrays in memory of our notebook instance. To send it in an HTTP POST request, we'll serialize it as a CSV string and then decode the resulting CSV.\n",
515+
"\n",
516+
"*Note: For inference with CSV format, SageMaker XGBoost requires that the data does NOT include the target variable.*"
515517
]
516518
},
517519
{
@@ -533,7 +535,7 @@
533535
"Now, we'll use a simple function to:\n",
534536
"1. Loop over our test dataset\n",
535537
"1. Split it into mini-batches of rows \n",
536-
"1. Convert those mini-batchs to CSV string payloads\n",
538+
"1. Convert those mini-batches to CSV string payloads (notice, we drop the target variable from our dataset first)\n",
537539
"1. Retrieve mini-batch predictions by invoking the XGBoost endpoint\n",
538540
"1. Collect predictions and convert from the CSV output our model provides into a NumPy array"
539541
]

0 commit comments

Comments
 (0)