2.6 Traditional ML packages in code
Tuning, vectorizing and manipulating data with Python packages.
Key points
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.”
“Grid search further automates hyperparameter optimization, testing various configurations for improved accuracy.”
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”
“You can also scale your TF-IDF workflow to multiple GPUs and machines using cuml”
“by first vectorizing them using TF-IDF”
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.”
Key terms
- cuML: RAPIDS GPU library for traditional machine learning, including text vectorizers.
- scikit-learn: Python library for traditional machine learning.
- TF-IDF: A way to turn text into numeric feature vectors.
- Grid search: Trying many hyperparameter combinations to find the best one.
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.”
“Grid search further automates hyperparameter optimization, testing various configurations for improved accuracy.”
Practice 2.6 (3 questions) Full Software Development guide
← 2.5 Monitoring data, experiments and processes · 2.7 Writing components and scripts →