Coursework

The class notebooks behind my projects. Each card links to the full notebook with code and output, so you can see how I work.

A note on what's what: notebooks marked In-class are exercises I coded during lectures following my professor's walkthrough. Homework and finals are my own independent work. The Predictive Analytics notebooks follow my professor's lecture notes, which I typed and ran during class; they're shared here with his permission. My featured projects are on the Portfolio page.

Data Visualization

CSUN · Python, matplotlib, seaborn, networkx, GeoPandas

Plotting foundations
In-class

Plotting foundations

Building charts from scratch with NumPy and matplotlib: plotting functions, log curves and density shading, and controlling every element of a figure.

matplotlibNumPyKDE
Categorical data
In-class

Categorical data

Count, cat, swarm and violin plots plus pie charts on student performance data, and when each one tells the clearest story.

seabornviolin & swarmpie charts
Distributions & comparisons
In-class

Distributions & comparisons

Histograms, KDE and box plots to compare score distributions across groups, including separating groups with independent normalization.

histplotkdeplotboxplot
Central tendency & variance
In-class

Central tendency & variance

Point plots with error bars to compare averages and spread of wine chemistry across quality levels.

pointploterror bars
Correlation heatmaps
In-class

Correlation heatmaps

Pairwise correlation matrices as heatmaps, then joint plots to dig into the strongest relationships.

heatmapjointplotcorrelation
Time series
Homework

Time series

Line charts of gold prices and U.S. commercial vs. industrial energy generation over time, plus custom function curves.

lineplotdatesmulti-series
Exploratory analysis: mushrooms
In-class

Exploratory analysis: mushrooms

A full visual EDA: how stem height and width relate, how edible and poisonous mushrooms differ, and how traits shift by season.

EDAjointplotkdeplot
Customer insights
In-class

Customer insights

Answering business questions about store customers: education mix, and whether the number of kids at home relates to income.

catplotpiescatter
Text visualization
In-class

Text visualization

Word clouds with stop-word filtering, including a custom shape mask built from an image.

wordcloudPILtext
Radar charts
In-class

Radar charts

Polar radar charts to compare a profile across many attributes at once.

polar axesradar
Network graphs
In-class

Network graphs

Building networks with networkx from scratch and from social media data, with weighted edges and node degree.

networkxgraphsdegree
Geospatial maps
In-class

Geospatial maps

Mapping with GeoPandas: regional maps and plotting Chipotle store locations on U.S. state shapefiles.

GeoPandasshapefilesmaps
Modeling seasonal demand
In-class

Modeling seasonal demand

Using sine waves to model seasonal demand, like Christmas tree sales, with adjustable baseline, amplitude and phase.

sin/cosseasonality
Random walks & power laws
In-class

Random walks & power laws

Simulating random-walk shopping paths, step-function learning curves and the 80/20 long tail, with interactive widgets.

simulationipywidgetspower law
3D surfaces
In-class

3D surfaces

Composing x and y grids into 3D surface plots.

mplot3dmeshgrid
HW
Homework

Homework & practice sets

Independent homework: sales distributions, TV vs. radio ad spend, and customer and energy analyses with written findings.

independent workseaborn

Predictive Analytics

CSUN · Python, pandas, scikit-learn, SciPy

Py
In-class

Python foundations

Variables, arithmetic, lists, control flow and functions, then building pandas DataFrames: the building blocks for everything that follows.

Pythonpandas
Data understanding
In-class

Data understanding

Profiling a restaurant tips dataset with histograms, bar and line charts, cross-tabulations, and a chi-square test of whether smoking and sex are related.

seaborncrosstabchi-square
t
In-class

Hypothesis testing

Checking for missing values and running t-tests to decide whether differences between groups are statistically significant.

SciPyt-testsp-values
Data preparation
In-class

Data preparation

Cleaning real data: removing and imputing missing values, finding outliers with z-scores and box plots, and standardizing King County home prices.

pandasz-scoresStandardScaler
Preprocessing, feature selection & evaluation
In-class

Preprocessing, feature selection & evaluation

Mean, KNN and MICE imputation, encoding, scaling, forward and backward feature selection, ridge and lasso regularization, ROC curves (AUC 0.92) and k-fold cross-validation.

scikit-learnRidge / LassoROC-AUCk-fold CV
Classification: credit card default
In-class

Classification: credit card default

Predicting credit card default with random forest, decision tree and logistic regression. Random forest and logistic regression reached about 82% test accuracy; the decision tree scored nearly 100% on training data but 73% on test data, a clear case of overfitting.

Random forestDecision treeLogistic regressionAUROC
Clustering
In-class

Clustering

Unsupervised learning with k-means (with centroids plotted) and agglomerative clustering visualized as a dendrogram.

KMeansHierarchicalDendrogram

Machine Learning

CSUN · Python, scikit-learn, mlxtend, PyTorch

Python & data foundations
In-class

Python & data foundations

Simulating data, Python data types and string handling, and selecting and reshaping data with pandas and iloc.

PythonpandasNumPy
Data preprocessing
In-class

Data preprocessing

Min-max and z-score normalization, dummy variables, and splitting numeric and categorical features so data is ready for machine learning.

scikit-learnscalingencoding
Missing value imputation
In-class

Missing value imputation

Strategies for missing categorical and numeric values, including building an imputation function and checking how it changes the distribution.

imputationrandom sampling
k-nearest neighbors
In-class

k-nearest neighbors

Training and testing KNN classifiers on fruit and wine quality data, after exploring the features visually.

KNNtrain/test split
Market basket analysis
In-class

Market basket analysis

Association rule mining with Apriori on grocery transactions (support, confidence, lift), then a network of items bought together.

Apriorimlxtendnetworkx
Naive Bayes
In-class

Naive Bayes

A multinomial Naive Bayes classifier for diabetes risk from patient symptoms, with dummy-encoded features.

MultinomialNBclassification
Model evaluation
In-class

Model evaluation

Precision, recall, F1 and support worked out by hand, then checked against scikit-learn's classification report and confusion matrix.

precision/recallconfusion matrix
k-means clustering
In-class

k-means clustering

k-means built step by step (initializing and updating centroids), then applied to segment Sephora customers.

KMeanssegmentation
Support vector machines
In-class

Support vector machines

Linear SVM decision boundaries on toy data, then a multi-class SVM that classified iris species with 96% accuracy.

SVMdecision boundary
Neural networks
In-class

Neural networks

A multilayer perceptron that classified breast-cancer tumors as benign or malignant with 87% accuracy after standardizing features.

MLPClassifierstandardization
Deep learning with PyTorch
In-class

Deep learning with PyTorch

Tensors, a small neural network trained with gradient descent (loss falling from 0.73 to 0.04) and its learned decision boundary.

PyTorchtensorstraining loop