NCA-GENL exam dumps

NCA-GENL practice question 185 of 228

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

NCA-GENL Question 185

Select 2

You are tasked with building a text classification model to categorize customer reviews into 'Positive', 'Negative', and 'Neutral'. You decide to use Python packages to preprocess the text data and implement a traditional machine learning pipeline. Which combination of packages and their functionalities would be most appropriate for this task?

  1. A

    Use spaCy to tokenize and lemmatize the text data.

  2. B

    Use NumPy to convert text data into numerical embeddings using pre-trained word vectors.

  3. C

    Use Keras for feature extraction from text using deep learning models.

  4. D

    Use scikit-learn for training a support vector machine (SVM) classifier on the preprocessed text data.

  5. E

    Use Matplotlib to visualize the training loss of the model.

Show answer and explanation

Correct answers: A, D

Explanation

To implement a text classification pipeline using traditional machine learning, text preprocessing (like tokenization and lemmatization) and model training (using scikit-learn's SVM in this case) are critical steps. spaCy is well-suited for preprocessing text, while scikit-learn is ideal for training the classifier. Other options, like Keras and Matplotlib, are not applicable as they are more relevant for deep learning and visualization tasks, respectively.

  • A. Correct.

    Correct: spaCy is a powerful library for text preprocessing tasks such as tokenization, lemmatization, and named entity recognition, which are essential for preparing text data for traditional machine learning models.

  • B. Incorrect.

    Incorrect: While NumPy is essential for numerical operations, it is not used for directly converting text data into embeddings. Libraries like spaCy or Gensim are better suited for this task.

  • C. Incorrect.

    Incorrect: Keras is primarily used for building deep learning models, not traditional machine learning pipelines. This question focuses on traditional ML approaches.

  • D. Correct.

    Correct: scikit-learn is a widely used library for implementing traditional machine learning algorithms like SVMs, making it an appropriate choice for training the classifier in this scenario.

  • E. Incorrect.

    Incorrect: Matplotlib is used for data visualization but is not directly relevant to the task of preprocessing or training a traditional machine learning text classification model.

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