How sachit-juneja/mactensor works
MacTensor is a C++ machine-learning library: callers provide matrices and use its linear-algebra core, classical supervised and unsupervised algorithms, or neural-network APIs to fit models and make predictions. The README describes these as the library’s principal capabilities; the source index and excerpts support the shown module dependencies, but not every internal call. src/main.cpp is a diagnostics executable rather than a general user-facing workflow.
Main entry points: main.cpp Diagnostics runner · engine.cpp Autograd engine · decision_tree.cpp Decision trees · kmeans.cpp K-Means
Components 14
Linear Algebra Core
- Matrix operations
src/core/matrix.cpp - Diagnostics runner
src/main.cpp
Supervised Learning
- Linear regression
src/ml/linear_regression.cpp - Logistic regression
src/ml/logistic_regression.cpp - Decision trees
src/ml/decision_tree.cpp - Gradient boosting
src/ml/gradient_boosting.cpp
Unsupervised Learning
- K-Means
src/ml/kmeans.cpp - Gaussian mixtures
src/ml/gmm.cpp - PCA
src/ml/pca.cpp
Deep Learning
- Autograd engine
src/dl/engine.cpp - Neural layers
src/dl/layers.cpp - MLP model
src/dl/model.cpp - Optimizers
src/dl/optimizers.cpp
Other components
- Library caller
Connections 21
- Library caller → Matrix operations: uses
README.md - Library caller → Linear regression: fits and predicts
README.md - Library caller → Logistic regression: fits and predicts
README.md - Library caller → Decision trees: fits and predicts
README.md - Library caller → Gradient boosting: fits and predicts
README.md - Library caller → K-Means: clusters data
README.md - Library caller → Gaussian mixtures: fits mixtures
README.md - Library caller → PCA: projects data
README.md - Library caller → MLP model: builds network
README.md - Matrix operations → Autograd engine: provides matrix type
- Autograd engine → Neural layers: supports layers
- Neural layers → MLP model: composes layers
- Autograd engine → Optimizers: updates values
- Decision trees → Gradient boosting: supplies weak learners
- K-Means → Gaussian mixtures: initializes clusters
src/ml/gmm.cpp - Diagnostics runner → Linear regression: tests regression
src/main.cpp - Diagnostics runner → Decision trees: tests trees
src/main.cpp - Diagnostics runner → Gradient boosting: tests boosting
src/main.cpp - Diagnostics runner → K-Means: tests clustering
src/main.cpp - Diagnostics runner → PCA: tests projection
src/main.cpp - Diagnostics runner → Gaussian mixtures: tests mixtures
src/main.cpp