🌍 Machine Learning · subject
Machine Learning Machine Learning Tools and Libraries Syllabus
The Machine Learning Tools and Libraries syllabus for Machine Learning in full: 7 chapters and 43 topics, every one listed below, plus 50 Machine Learning Tools and Libraries flashcards with answers.
Machine Learning Tools and Libraries syllabus: all 7 chapters
Expand any chapter to see its topics and sub-topics.
-
Visualization Tools
6 topics- Matplotlib
- Seaborn
- Plotly
- Bokeh
- Altair
- Dash
-
Deep Learning Frameworks
6 topics- TensorFlow
- Keras
- PyTorch
- MXNet
- Caffe
- Theano
-
Natural Language Processing (NLP) Libraries
6 topics- NLTK
- SpaCy
- Gensim
- Transformers (Hugging Face)
- TextBlob
- Flair
-
Reinforcement Learning Libraries
5 topics- OpenAI Gym
- Stable Baselines
- Ray RLlib
- Keras-RL
- TensorForce
-
Data Storage and Management
6 topics- SQL Databases
- NoSQL Databases
- HDFS
- Apache Spark
- Dask
- BigQuery
-
Deployment and Production
9 topics- Flask
- Django
- FastAPI
- TensorFlow Serving
- ONNX
- Docker
- Kubernetes
- MLflow
- Kubeflow
-
Automated Machine Learning (AutoML)
5 topics- Auto-sklearn
- TPOT
- H2O.ai
- Google Cloud AutoML
- Microsoft Azure AutoML
Machine Learning Machine Learning Tools and Libraries flashcards — 50 questions with answers
What is Matplotlib and what is its core object hierarchy?
Matplotlib is a low-level Python 2D plotting library. Its hierarchy is: a Figure (the whole canvas) contains one or more Axes (an individual plot), and each Axes contains Artists such as lines, text, and ticks. The state-based pyplot interface (plt) wraps the object-oriented Figure/Axes API.
In Matplotlib, what is the difference between the pyplot (state-machine) interface and the object-oriented interface?
The pyplot interface (e.g. plt.plot, plt.title) implicitly tracks the 'current' figure and axes, convenient for quick scripts. The object-oriented interface explicitly creates and manipulates objects, e.g. fig, ax = plt.subplots(); ax.plot(...); ax.set_title(...). The OO style is preferred for complex, multi-axes figures.
In Matplotlib, what call creates a figure with a grid of subplots and returns both the figure and an array of axes?
fig, axs = plt.subplots(nrows, ncols). It returns the Figure and a NumPy array of Axes objects, which you index (e.g. axs[0, 1]) to draw on each subplot.
What is Seaborn and how does it relate to Matplotlib?
Seaborn is a high-level statistical data visualization library built on top of Matplotlib. It provides attractive default themes and concise functions for statistical plots (distributions, regressions, categorical comparisons) and integrates tightly with pandas DataFrames. Because it sits on Matplotlib, you can further customize Seaborn plots with Matplotlib calls.
In Seaborn, what is the distinction between figure-level and axes-level functions? Give an example of each.
Axes-level functions draw onto a single Matplotlib Axes and accept an ax= argument (e.g. scatterplot, histplot, boxplot). Figure-level functions manage their own figure and can create multi-panel grids via row/col faceting (e.g. relplot, displot, catplot). Figure-level functions return a FacetGrid-type object rather than an Axes.
Which Seaborn function draws a scatterplot matrix of all pairwise relationships in a dataset?
sns.pairplot(data), which plots pairwise scatterplots for every pair of numeric variables off the diagonal and univariate distributions (histograms or KDEs) on the diagonal. The hue= argument colors points by a categorical variable.
What is Plotly and what key feature distinguishes it from Matplotlib?
Plotly is a graphing library that produces interactive, web-based (HTML/JavaScript) visualizations rendered with D3.js/WebGL. Unlike Matplotlib's static images, Plotly charts support hover tooltips, zooming, panning, and selection out of the box, and can be embedded in web pages or Dash apps.
In Plotly, what is the difference between Plotly Express and Plotly Graph Objects?
Plotly Express (plotly.express, px) is a high-level concise API where one function call (e.g. px.scatter) builds an entire figure from a DataFrame. Plotly Graph Objects (plotly.graph_objects, go) is the lower-level API where you assemble figures from explicit trace and layout objects for fine-grained control.
What is Bokeh and what is its primary target output?
Bokeh is a Python interactive visualization library that targets modern web browsers, generating standalone HTML/JavaScript (BokehJS) output. It excels at building interactive dashboards and streaming/large-dataset plots, and can run a Bokeh server to link Python callbacks to browser widgets.
In Bokeh, what is the role of ColumnDataSource?
ColumnDataSource is Bokeh's core data structure: a mapping of column names to data sequences shared across glyphs. Using a shared ColumnDataSource lets multiple plots/glyphs reference the same data and enables linked interactions such as linked brushing, selection, and hover tooltips.
What is Altair and what visualization paradigm is it based on?
Altair is a declarative Python statistical visualization library based on the Vega and Vega-Lite grammar of graphics. You describe what to plot by mapping data columns to visual encoding channels (x, y, color, size) rather than imperative drawing commands, and Altair emits a Vega-Lite JSON spec rendered in the browser.
In Altair, what is the typical chaining pattern to build a chart, and what does each part specify?
alt.Chart(data).mark_point().encode(x='a', y='b', color='c'). Chart(data) binds the dataset, mark_*() chooses the geometric mark (point, bar, line, area), and encode() maps data fields to visual channels. Transforms and interactions can be chained on as well.
What is Dash and what three technology layers does it combine?
Dash is a Python framework by Plotly for building analytical web applications with no JavaScript required. It combines Flask (web server/back end), Plotly.js (interactive charts), and React.js (front-end components). Apps are defined by a layout of components plus reactive callbacks.
In Dash, how is interactivity defined and what decorator is used?
Interactivity is defined by callback functions decorated with @app.callback (or @callback). The decorator declares Output(s) (component properties to update) and Input(s)/State(s) (component properties that trigger or supply values). When an Input changes, Dash calls the function and updates the Outputs reactively.
What is TensorFlow and who develops it?
TensorFlow is an open-source end-to-end machine learning and deep learning framework developed by Google. It represents computations as dataflow graphs of tensors, supports automatic differentiation, runs on CPUs/GPUs/TPUs, and scales from research prototyping to large-scale production deployment (e.g. via TensorFlow Serving and TensorFlow Lite).
What is a 'tensor' in the context of TensorFlow/PyTorch, and what do rank and shape mean?
A tensor is a multi-dimensional array of numerical values. Its rank (or ndim) is the number of axes/dimensions (rank-0 scalar, rank-1 vector, rank-2 matrix), and its shape is the tuple giving the size along each axis, e.g. a tensor of shape $(3, 4)$ has rank 2 with 3 rows and 4 columns.
What major architectural change did TensorFlow 2.x introduce regarding graph execution?
TensorFlow 2.x made eager execution the default, so operations run immediately like normal Python (rather than building a static graph then running a session as in TF1). Graph optimization is opt-in via the @tf.function decorator, which traces a Python function into a callable TensorFlow graph for performance.
What is Keras and what is its relationship to TensorFlow?
Keras is a high-level neural-network API focused on fast, user-friendly model building. It is the official high-level interface of TensorFlow (tf.keras) and provides layers, optimizers, and losses with a simple declarative style. Keras 3 is multi-backend, able to run on TensorFlow, JAX, or PyTorch.
What are the three model-building APIs offered by Keras?
1) The Sequential API: a linear stack of layers, simplest for single-input/single-output models. 2) The Functional API: builds models as a directed graph of layers, supporting multiple inputs/outputs and shared layers. 3) Model subclassing: define a custom class extending keras.Model with your own call() method for full flexibility.
In Keras, what two steps must you perform before and during training a model, and which methods implement them?
First compile the model with model.compile(optimizer=..., loss=..., metrics=...) to configure the training process, then train with model.fit(x, y, epochs=..., batch_size=...). Evaluation uses model.evaluate() and inference uses model.predict().
Show the other 30 Machine Learning Tools and Libraries flashcards
What is PyTorch and which feature is central to its 'define-by-run' design?
PyTorch is an open-source deep learning framework (originating at Facebook/Meta AI) known for a Pythonic interface. Its define-by-run design uses dynamic computation graphs built on the fly during the forward pass, so the graph can change each iteration. Autograd provides automatic differentiation by recording operations on tensors.
In PyTorch, what does requires_grad=True do and what does calling .backward() accomplish?
Setting requires_grad=True on a tensor tells autograd to track all operations on it so gradients can be computed. Calling loss.backward() performs reverse-mode automatic differentiation, computing $\frac{\partial \text{loss}}{\partial \theta}$ for every tracked parameter and accumulating the result in each tensor's .grad attribute.
What is the canonical structure of a custom PyTorch model class?
Subclass torch.nn.Module, define submodules/layers in __init__ (calling super().__init__() first), and implement the forward(self, x) method describing the forward computation. The module is then called as model(x), which invokes forward and builds the autograd graph.
What is the standard five-step PyTorch training loop per batch?
1) optimizer.zero_grad() to clear old gradients; 2) outputs = model(inputs) forward pass; 3) loss = criterion(outputs, targets); 4) loss.backward() to compute gradients; 5) optimizer.step() to update parameters. Gradients must be zeroed each iteration because PyTorch accumulates them by default.
What is Apache MXNet and what programming styles does it support?
Apache MXNet is a scalable open-source deep learning framework (formerly backed by Amazon for AWS). It supports both imperative (define-by-run, via its NDArray API) and symbolic (define-then-run graph) programming, blending them through the Gluon API. It is noted for multi-GPU/multi-machine scalability and many language bindings.
What is the Gluon API in MXNet?
Gluon is MXNet's high-level, imperative, Pythonic interface for defining, training, and reusing neural networks. It offers dynamic graph flexibility for easy debugging while still allowing the graph to be 'hybridized' (hybridize()) into a static symbolic graph for production-level speed.
What is Caffe and what application domain is it best known for?
Caffe (Convolutional Architecture for Fast Feature Embedding) is a deep learning framework developed at UC Berkeley (BVLC), best known for computer vision and convolutional neural networks. Models are defined declaratively in plain-text .prototxt configuration files rather than code, and it is valued for speed and its pretrained Model Zoo.
What is Theano and what is its current status?
Theano is one of the earliest Python deep learning libraries (from MILA, University of Montreal) that compiles symbolic mathematical expressions involving multidimensional arrays into optimized CPU/GPU code, with automatic differentiation. Major development officially ceased in 2017, but it pioneered ideas later adopted by TensorFlow and others.
What is NLTK and what is its primary intended use?
NLTK (Natural Language Toolkit) is a comprehensive Python library for natural language processing, designed largely for teaching, research, and prototyping. It bundles tokenizers, stemmers, taggers, parsers, WordNet access, and over 50 corpora/lexical resources, favoring breadth and pedagogy over production-grade speed.
Define tokenization, stemming, and lemmatization as performed by NLP libraries like NLTK.
Tokenization splits text into units (words, subwords, or sentences). Stemming crudely chops word endings to a root using heuristics (e.g. Porter stemmer: 'running' -> 'run', 'studies' -> 'studi'). Lemmatization maps a word to its dictionary base form (lemma) using vocabulary and morphology, producing valid words (e.g. 'better' -> 'good', 'studies' -> 'study').
What is SpaCy and how does its design philosophy differ from NLTK?
SpaCy is an industrial-strength NLP library optimized for production: fast, opinionated, and providing a single best-practice pipeline rather than many alternatives. Unlike NLTK's research/teaching breadth, SpaCy emphasizes speed (Cython implementation), pretrained statistical/neural models, and an integrated pipeline (tokenizer, tagger, parser, NER, vectors).
In SpaCy, what is the processing pipeline and what is a Doc object?
Loading a model (e.g. nlp = spacy.load('en_core_web_sm')) and calling nlp(text) runs the pipeline: tokenizer followed by components like tagger, parser, lemmatizer, and named-entity recognizer. The result is a Doc object, a container of Token (and Span) objects carrying linguistic annotations such as .pos_, .lemma_, .dep_, and .ents.
What is Gensim and what task is it specialized for?
Gensim is a Python library specialized in unsupervised topic modeling and document similarity for large text corpora. It implements memory-efficient, streaming algorithms including Word2Vec, Doc2Vec, FastText, LSI/LSA, LDA (Latent Dirichlet Allocation), and TF-IDF, designed to handle corpora larger than RAM.
In Gensim, what are a Dictionary and a corpus (bag-of-words) representation?
A gensim Dictionary maps each unique token to an integer id. The bag-of-words corpus represents each document as a list of (token_id, count) tuples (doc2bow output), discarding word order. This sparse representation is the input to models like TF-IDF and LDA.
Briefly, what does the Word2Vec model produce and what are its two training architectures?
Word2Vec learns dense, low-dimensional vector embeddings of words such that semantically similar words lie close together, capturing analogies via vector arithmetic (e.g. $\vec{king} - \vec{man} + \vec{woman} \approx \vec{queen}$). Its two architectures are CBOW (predict a target word from its context) and Skip-gram (predict surrounding context words from a target word).
What is the Hugging Face Transformers library and what does it provide?
Transformers is an open-source library by Hugging Face providing thousands of pretrained transformer models (BERT, GPT, T5, RoBERTa, etc.) for NLP, vision, audio, and multimodal tasks. It offers a unified API for loading models/tokenizers, fine-tuning, and inference, interoperating with PyTorch, TensorFlow, and JAX, backed by the Model Hub.
In Hugging Face Transformers, what does the pipeline() function do?
pipeline() is the highest-level API that bundles a pretrained model with its preprocessing (tokenizer) and postprocessing for a specific task, e.g. pipeline('sentiment-analysis'). You pass raw text and get task-ready output, handling tokenization, model inference, and decoding in one call.
In Hugging Face Transformers, what is the role of AutoTokenizer and AutoModel classes?
The Auto* classes automatically select the correct architecture-specific class from a model checkpoint name. AutoTokenizer.from_pretrained(name) loads the matching tokenizer, and AutoModel.from_pretrained(name) (or task heads like AutoModelForSequenceClassification) loads the matching model weights/config, so code stays architecture-agnostic.
What is the self-attention mechanism at the heart of the Transformer architecture, including its scoring formula?
Self-attention lets each token weigh the relevance of all other tokens, computing contextual representations. Using Query, Key, and Value matrices, scaled dot-product attention is $\text{Attention}(Q,K,V) = \text{softmax}\!\left(\frac{QK^{T}}{\sqrt{d_k}}\right)V$, where $d_k$ is the key dimension and the $\sqrt{d_k}$ scaling stabilizes gradients.
What is TextBlob and what high-level NLP tasks does it simplify?
TextBlob is a beginner-friendly Python library built on NLTK and pattern, exposing a simple API over a TextBlob object. It simplifies common tasks: part-of-speech tagging, noun-phrase extraction, sentiment analysis, classification, spelling correction, tokenization, and translation, making it popular for quick prototypes and teaching.
In TextBlob, what does the sentiment property return and what do its two values mean?
blob.sentiment returns a named tuple with polarity and subjectivity. Polarity is a float in $[-1.0, 1.0]$ where $-1$ is very negative and $+1$ very positive. Subjectivity is a float in $[0.0, 1.0]$ where $0$ is very objective (factual) and $1$ is very subjective (opinionated).
What is Flair and what NLP capability is it especially known for?
Flair is an NLP library from Zalando Research built on PyTorch, especially known for state-of-the-art sequence labeling such as named-entity recognition (NER) and part-of-speech tagging. Its signature contribution is contextual string ('Flair') embeddings, and it lets users easily stack and combine different word embeddings.
In Flair, what are the core data abstractions Sentence and Token, and how is a tagger applied?
Text is wrapped in a Sentence object, which holds a list of Token objects. A pretrained model is loaded (e.g. SequenceTagger.load('ner')) and applied with tagger.predict(sentence), after which each token/span carries predicted labels accessible via sentence.get_spans('ner').
Compare TensorFlow and PyTorch on computation-graph style and typical adoption.
TensorFlow originally used static (define-then-run) graphs, adding eager execution in 2.x; it is strong in production deployment and mobile/edge (TF Lite, TF Serving). PyTorch uses dynamic (define-by-run) graphs, giving a more Pythonic, debuggable feel, and has become dominant in research. Both support autodiff and GPU acceleration.
Compare static (define-then-run) versus dynamic (define-by-run) computation graphs.
A static graph is fully defined before execution, enabling whole-graph optimization and easy deployment but harder debugging and rigid control flow (classic TF1, Theano, Caffe). A dynamic graph is built on the fly during each forward pass, allowing native Python control flow and easy debugging at some performance cost (PyTorch, MXNet imperative, TF2 eager).
Among visualization libraries, which produce static images versus interactive browser-based output? Classify Matplotlib, Seaborn, Plotly, Bokeh, Altair, and Dash.
Static (image) output: Matplotlib and Seaborn (Seaborn builds on Matplotlib). Interactive, browser/JavaScript-based output: Plotly, Bokeh, and Altair (Vega-Lite). Dash is not a plotting library but a web-app framework that hosts interactive Plotly charts with reactive callbacks.
Classify NLTK, SpaCy, Gensim, Hugging Face Transformers, TextBlob, and Flair by their primary NLP strength.
NLTK: broad teaching/research toolkit. SpaCy: fast production pipelines (tokenize, tag, parse, NER). Gensim: topic modeling and word embeddings (LDA, Word2Vec). Transformers: pretrained transformer models for many tasks. TextBlob: simple beginner API for common tasks/sentiment. Flair: PyTorch-based sequence labeling with contextual embeddings.
What does TF-IDF measure and what is its formula?
TF-IDF (Term Frequency-Inverse Document Frequency) weights how important a term is to a document within a corpus, boosting frequent local terms while down-weighting terms common across all documents. A standard form is $\text{tfidf}(t,d) = \text{tf}(t,d)\cdot \log\!\frac{N}{df(t)}$, where $N$ is the number of documents and $df(t)$ is the number containing term $t$.
Why is the softmax function used in the output layer of many deep-learning classifiers, and what is its formula?
Softmax converts a vector of raw scores (logits) into a probability distribution over classes that sums to 1, so the largest logit gets the highest probability. For logits $z_i$, $\text{softmax}(z)_i = \frac{e^{z_i}}{\sum_{j=1}^{K} e^{z_j}}$. It is paired with cross-entropy loss for multi-class classification.
What is the cross-entropy loss used to train classifiers in these frameworks, and what is its formula for a single example?
Cross-entropy measures the difference between the predicted probability distribution and the true (one-hot) labels, penalizing confident wrong predictions heavily. For true distribution $y$ and predicted $\hat{y}$ over $K$ classes, the loss is $L = -\sum_{i=1}^{K} y_i \log(\hat{y}_i)$, which reduces to $-\log(\hat{y}_c)$ for the correct class $c$.
Machine Learning Machine Learning Tools and Libraries FAQ
What is in the Machine Learning Machine Learning Tools and Libraries syllabus?
Machine Learning Machine Learning Tools and Libraries is split into 7 chapters: Visualization Tools, Deep Learning Frameworks, Natural Language Processing (NLP) Libraries, Reinforcement Learning Libraries, Data Storage and Management, Deployment and Production and Automated Machine Learning (AutoML). Together they contain 43 topics.
How many chapters are in Machine Learning Machine Learning Tools and Libraries?
7 chapters, containing 43 topics. The largest chapter is Deployment and Production, with 9 topics.
Are there flashcards for Machine Learning Machine Learning Tools and Libraries?
Yes — a 50-card Machine Learning Tools and Libraries deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.