NCA-GENM exam dumps

NCA-GENM practice question 143 of 228

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

NCA-GENM Question 143

Select 3

You are tasked with building a text classification model to categorize news articles into predefined categories. Using Python, you decide to preprocess the text data before feeding it into a machine learning model. Which of the following steps involve the correct use of Python packages like spaCy, NumPy, and Keras for this task?

  1. A

    Use spaCy to tokenize the text and remove stop words before vectorizing the data.

  2. B

    Use NumPy to convert raw text into its corresponding numerical token IDs directly.

  3. C

    Use Keras to create a neural network model and feed preprocessed text embeddings as input.

  4. D

    Use spaCy to train a deep learning model directly on the text dataset without preprocessing.

  5. E

    Use NumPy to create a word embedding matrix from pre-trained embeddings for the Keras model.

Show answer and explanation

Correct answers: A, C, E

Explanation

Text classification tasks require a combination of preprocessing, numerical transformations, and model building. spaCy is used for text preprocessing like tokenization and stop word removal, which prepares the text for numerical representation. NumPy can be used to handle numerical operations, such as creating embedding matrices. Keras is then used to build and train the neural network model, which takes the processed embeddings as input. However, tasks like raw text-to-token ID conversion and model training are not the primary functions of NumPy or spaCy, respectively.

  • A. Correct.

    Correct: spaCy is commonly used for text preprocessing tasks like tokenization and stop word removal, which are essential steps before vectorizing textual data for machine learning.

  • B. Incorrect.

    Incorrect: NumPy is not designed for working with raw text or token IDs; it is primarily used for numerical computations and array manipulations.

  • C. Correct.

    Correct: Keras is a deep learning library used to build neural network models. Preprocessed text embeddings can be fed into such models as input.

  • D. Incorrect.

    Incorrect: spaCy is not a library for training deep learning models. It is primarily used for natural language processing tasks like tokenization, dependency parsing, and named entity recognition.

  • E. Correct.

    Correct: NumPy can be used to create word embedding matrices from pre-trained embeddings (e.g., GloVe or Word2Vec) to be used as input to deep learning models in Keras.

Timed practice exam

Take a NCA-GENM 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