2.6 Traditional ML packages in code

NCA-GENL · Software Development (24% of the exam) · Official objective: “Use Python packages (spaCy, NumPy, Keras, etc.) to implement specific traditional machine learning analyses.”

Tuning, vectorizing and manipulating data with Python packages.

Key points

  1. Hyperparameters are the settings you tune to get the best model. NVIDIA's scikit-learn glossary says grid search automates this by testing various configurations, and is used with cross-validation to evaluate models.

    What NVIDIA says (2)

    “scikit-learn incorporates tools like grid search and cross-validation to identify the best hyperparameters and evaluate model performance.”

    — What is scikit-learn?

    “Grid search further automates hyperparameter optimization, testing various configurations for improved accuracy.”

    — What is scikit-learn?

  2. TF-IDF (term frequency–inverse document frequency) is a way to vectorize text, that is, turn it into numbers. NVIDIA's RAPIDS text post describes Count and TF-IDF vectorizers in cuML that can scale across multiple graphics processing units (GPUs) and machines.

    What NVIDIA says (3)

    “subpackage in cuML by adding Count and TF-IDF vectorizer”

    — NLP and Text Processing with RAPIDS: Now Simpler and Faster

    “You can also scale your TF-IDF workflow to multiple GPUs and machines using cuml”

    — NLP and Text Processing with RAPIDS: Now Simpler and Faster

    “by first vectorizing them using TF-IDF”

    — NLP and Text Processing with RAPIDS: Now Simpler and Faster

  3. NVIDIA's pandas glossary lists data manipulation and cleaning operations such as selecting a subset, derived columns, sorting, joining, filling, replacing, summary statistics and plotting.

    What NVIDIA says (1)

    “pandas also allows for various data manipulation operations and data cleaning features, including selecting a subset, creating derived columns, sorting, joining, filling, replacing, summary statistics, and plotting.”

    — What Is Pandas and Why Does it Matter?

Key terms

Sample question

What does scikit-learn's grid search do?

Show the answer

Answer: Evaluates combinations of hyperparameter values (usually with cross-validation) to find the best settings

Hyperparameters are the settings you tune to get the best model. NVIDIA's scikit-learn glossary says grid search automates this by testing various configurations, and is used with cross-validation to evaluate models.

What NVIDIA says (2)

“scikit-learn incorporates tools like grid search and cross-validation to identify the best hyperparameters and evaluate model performance.”

— What is scikit-learn?

“Grid search further automates hyperparameter optimization, testing various configurations for improved accuracy.”

— What is scikit-learn?

Practice 2.6 (3 questions) Full Software Development guide

← 2.5 Monitoring data, experiments and processes · 2.7 Writing components and scripts →