1/45
A comprehensive vocabulary review covering Matplotlib plotting functions and syntax, data types, foundational statistics, regression modeling, and classification methods including Naive Bayes and Support Vector Machines.
plt.plot(x, y)
A Matplotlib function used to show a line through points, requiring x first, y second, and both to have the same length.
plt.scatter(x, y)
A Matplotlib function that plots one dot per observation; only x and y are required, with optional parameters s (size), c (color), and alpha (0–1).
bar() / barh()
Matplotlib functions used to compare categories, with default width = 0.8 and bottom = 0; stacked bars use the bottom= parameter.
pie()
A Matplotlib function used to show parts of a whole for a single data series only, using the explode parameter to pull a slice out.
annotate()
A Matplotlib function used to point at a plot feature, taking text, xy (the coordinates of the point), xytext (where the label sits), and arrowprops.
subplot(rows, cols, index)
A Matplotlib function used to arrange and display multiple individual plots in a single figure grid.
suptitle()
A Matplotlib function that creates a centered main title for an entire figure containing subplots.
fmt String
A format shortcut string in Matplotlib structured as marker | line | color (such as 'o:b' for circle markers, dotted line, and blue).
Matplotlib Line Styles
Formatting values in Matplotlib line strings: '-' (solid), ':' (dotted), '--' (dashed), and '-.' (dash-dot).
Matplotlib Marker Options
Keyword styling parameters for plot points, including marker, ms (marker size), mec (markeredgecolor), and mfc (markerfacecolor).
Hatch Patterns
Patterns used to fill bars, fill_between, or contourf (/ \ | - + x o O . *); doubling a character (//, xx) increases pattern density, though not supported on WX or Cairo backends.
Correlation
A measure of how two variables move together that strictly denotes a straight-line (linear) relationship when positive or negative.
Association
A curvy or non-linear relationship between two variables, distinct from a linear correlation.
Interpolation
Predicting values inside the range of observed data points, which is generally more reliable.
Extrapolation
Predicting values outside the range of observed data points, which becomes less reliable the farther out it extends.
Discrete Numerical Data
Quantitative data consisting of whole numbers only, such as cars passing by.
Continuous Numerical Data
Quantitative data that can take infinite possible values along a scale, such as price or size.
Categorical Data
Qualitative data represented by distinct labels without any intrinsic ordering or ranking, such as color or yes/no.
Ordinal Data
Qualitative categorical data that possesses an inherent ranking or order, such as school grades (A beats B).
Mean
The numerical average of a dataset, computed in Python using numpy.mean.
Median
The middle value in a sorted dataset, computed in Python using numpy.median.
Mode
The most frequently occurring value in a dataset, computed in Python using scipy.stats.mode.
Variance
A metric of spread computed with numpy.var that equals std2.
Standard Deviation
A measure of data spread computed with numpy.std equal to variance; low standard deviation means values hug the mean, while high standard deviation means values spread wide.
Percentile
The value below which a given percentage of data falls, calculated using numpy.percentile().
Normal (Gaussian) Distribution
A symmetric bell-shaped continuous probability distribution named after Carl Friedrich Gauss, generated with numpy.random.normal(loc, scale, size).
Supervised Learning
A category of machine learning that trains on labeled data (input + answer) to predict outcomes or classify into known categories.
Unsupervised Learning
A category of machine learning that analyzes raw, unlabeled data to discover hidden patterns, cluster data, or explore relationships.
Linear Regression
A modeling technique used when points roughly follow a straight line (y=slope⋅x+intercept), implemented via stats.linregress(x, y) to return slope, intercept, r, p, and std_err.
Polynomial Regression
A regression technique used when data points clearly exhibit a curve, implemented using numpy.poly1d(numpy.polyfit(x, y, degree)).
Multiple Regression
A modeling technique used to predict a target variable when there are two or more input features, implemented using LinearRegression().fit(X, y).
Correlation Coefficient (r)
A statistical metric measuring the strength and direction of a linear relationship between two variables, ranging from −1 to 1.
Coefficient of Determination (R²)
A metric indicating how well a regression model fits the data, ranging from 0 (no relationship) to 1 (perfect fit).
Bayes' Theorem
A fundamental probability formula stated as P(A∣B)=P(B)P(B∣A)⋅P(A), evaluating the conditional likelihood of A given that B is true.
Naive Bayes
A fast, straightforward classification algorithm ideal for high-dimensional data and baselines, executed using LabelEncoder() and GaussianNB().
Train / Test Split
A validation procedure that partitions data—typically 80% to build the model and 20% to evaluate it—using train_test_split().
Confusion Matrix
A performance evaluation grid where rows represent actual classes and columns represent predicted classes; diagonal entries are correct classifications, while off-diagonals are errors.
Support Vector Machine (SVM)
A classification algorithm that determines the decision boundary achieving the widest margin between distinct classes.
Hyperplane
The decision boundary in an SVM, expressed as the linear equation wx+b=0 in a two-feature space.
Support Vectors
The specific data points located nearest to the decision boundary that uniquely define and orient the SVM hyperplane.
Margin (SVM)
The geometric distance between the decision boundary and the nearest support vectors, which SVM algorithms seek to maximize.
Hard Margin vs. Soft Margin
Hard margin permits no classification errors, whereas soft margin accommodates outliers and allows some margin violations using slack variables.
C Parameter (SVM)
A regularization parameter in SVM where a higher value enforces a stricter misclassification penalty, leading to a narrower margin and fewer training errors.
Hinge Loss
A loss function penalty that equals zero when no boundary violation occurs and increases linearly with the distance of any margin violation.
Kernel (SVM)
A mathematical function that transforms input data into higher-dimensional space to make it linearly separable (such as Linear, Polynomial, Gaussian RBF, or Sigmoid).
Dual Problem (SVM)
An alternative mathematical formulation that optimizes the Lagrange multipliers of support vectors, making the kernel trick computationally feasible.