NCA-GENL exam dumps

NCA-GENL practice question 181 of 228

NVIDIA-Certified Associate - Generative AI LLMs. Associate level, NVIDIA. Free question with the correct answer and a full explanation.

NCA-GENL Question 181

Select 3

You are building a text classification model to predict the sentiment (positive, negative, or neutral) of customer reviews. You decide to preprocess the text using spaCy, convert the data to numerical form using NumPy, and train a neural network using Keras. Which of the following steps would be required to correctly implement this pipeline?

  1. A

    Use spaCy to tokenize the text and extract word embeddings for each token.

  2. B

    Convert the extracted word embeddings into a NumPy array for efficient computation.

  3. C

    Normalize the NumPy array to ensure values are between 0 and 1 before training the model.

  4. D

    Use Keras to define and train a neural network model on the NumPy array data.

  5. E

    Directly feed the raw text into the Keras model without preprocessing.

Show answer and explanation

Correct answers: A, B, D

Explanation

To correctly implement a machine learning pipeline for text classification using Python packages like spaCy, NumPy, and Keras, the text must first be preprocessed using spaCy to extract features (such as word embeddings). These features should then be converted into a NumPy array for compatibility and computational efficiency. Finally, the processed data can be used to train a neural network in Keras. Skipping preprocessing steps or directly using raw text would lead to an incorrect implementation.

  • A. Correct.

    Correct. Tokenizing the text and extracting word embeddings with spaCy is a key preprocessing step for text data in machine learning pipelines.

  • B. Correct.

    Correct. Converting the word embeddings into a NumPy array ensures compatibility with Keras and allows for efficient numerical computation.

  • C. Incorrect.

    Incorrect. While normalization may be useful in some contexts, word embeddings typically do not require normalization as they are designed to capture semantic relationships.

  • D. Correct.

    Correct. Keras can define and train a neural network model using the preprocessed data in the form of a NumPy array.

  • E. Incorrect.

    Incorrect. Feeding raw text directly into the Keras model bypasses necessary preprocessing steps like tokenization and vectorization, which are essential for model training.

Timed practice exam

Take a NCA-GENL practice test under exam conditions

50 questions in 60 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam