NCA-GENL exam dumps

NCA-GENL practice question 64 of 228

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

NCA-GENL Question 64

Select 2

You are tasked with creating a text classification pipeline for customer reviews to classify them as Positive, Neutral, or Negative. You decide to preprocess the text data using Python to remove stop words, tokenize the text, and generate numerical feature vectors. Additionally, you want to use a traditional machine learning model, such as Logistic Regression, for classification. Which combination of Python packages would be the most appropriate to implement this solution effectively?

  1. A

    spaCy for text preprocessing and NumPy for feature vector creation

  2. B

    Keras for text preprocessing and TensorFlow for feature vector creation

  3. C

    NumPy for text preprocessing and scikit-learn for classification

  4. D

    spaCy for text preprocessing and scikit-learn for classification

  5. E

    NumPy for text preprocessing and Keras for classification

Show answer and explanation

Correct answers: A, D

Explanation

To implement a text classification pipeline for customer reviews using traditional machine learning, spaCy is ideal for text preprocessing (such as tokenization and stop word removal), while NumPy can handle numerical feature vectors. For the classification step, scikit-learn is the most appropriate library as it provides various traditional machine learning models, including Logistic Regression. Keras and TensorFlow are better suited for deep learning workflows, making them unnecessary in this scenario.

  • A. Correct.

    Correct. spaCy is a powerful library for text preprocessing tasks such as tokenization, stop word removal, and lemmatization, while NumPy can be used to handle numerical feature vectors effectively.

  • B. Incorrect.

    Incorrect. Keras and TensorFlow are primarily designed for deep learning tasks, not traditional machine learning workflows. They are not ideal for text preprocessing and basic feature vector creation in this scenario.

  • C. Incorrect.

    Incorrect. NumPy is not designed for text preprocessing. While it can handle numerical arrays, it cannot process or tokenize textual data.

  • D. Correct.

    Correct. spaCy is well-suited for text preprocessing, and scikit-learn is a robust library for building traditional machine learning models like Logistic Regression.

  • E. Incorrect.

    Incorrect. NumPy is not designed for text preprocessing, and Keras is better suited for deep learning tasks rather than traditional machine learning models.

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