MLS-C01 Exploratory Data Analysis Practice Question
Exhibit
Refer to the exhibit.
CloudWatch Logs snippet:
2023-07-01T10:00:00 ERROR: Model training failed: ValueError: Input contains NaN, infinity or a value too large for dtype('float64').
Traceback:
File "train.py", line 45, in <module>
model.fit(X_train, y_train)
File "sklearn/linear_model/_logistic.py", line 1523, in fit
...A data scientist receives the above error during model training. What is the most likely cause?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The training data contains missing or infinite values.
The error message indicates that the training data contains missing (NaN) or infinite values, which causes the loss function to become NaN. This is a common issue when data has not been properly cleaned. Option B is wrong because a high learning rate typically leads to divergence or instability, not NaN values due to data issues. Option C is wrong because an incorrect data format would result in a parsing error, not a NaN loss. Option D is wrong because insufficient memory leads to an out-of-memory error, not NaN values.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The training data contains missing or infinite values.
Why this is correct
Correct: The error suggests NaN or infinite values in the data. Cleaning the data by imputing or removing such values resolves the issue.
- ✗
The learning rate is too high.
Why it's wrong here
Incorrect: A high learning rate can cause the model to diverge, but it would not produce NaN values unless the data itself contains invalid entries.
- ✗
The data format is incorrect; expected CSV but received JSON.
Why it's wrong here
Incorrect: A mismatch in data format (e.g., expecting CSV but receiving JSON) would cause a parsing error, not a NaN loss.
- ✗
The instance type lacks sufficient memory.
Why it's wrong here
Incorrect: Insufficient memory would cause an out-of-memory error, not NaN values in the loss function.
Go deeper
Related to this question
About these practice questions
This MLS-C01 question is part of Courseiva's 1,672-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.