This is a personal project for the initiation to real life applications of machine learning. Why not have some fun and create something meaningful?
├── data/ # Dataset
│ └── breast-cancer.csv
├── src/ # Core neural network code
│ ├── model.py # Main entry point
│ ├── neuralnetwork.py # Neural network layers and functions
│ ├── load_data.py # Data loading utilities
│ ├── Saving_Weights.py # Save weights to CSV
│ ├── loading_weights.py # Load weights from CSV
│ └── test.py # Model evaluation
├── model_weights/ # Trained weights (CSV format)
├── notebooks/ # Jupyter notebooks for exploration
└── database/ # Optional MySQL storage (not required)
From the src/ directory:
cd src
python model.pyThis will load the pre-trained weights from model_weights/ and evaluate the model on the test set, printing accuracy, precision, and recall.
In src/model.py, uncomment the training lines:
train(network, 1e-5, 2000, bce, bce_prime, X, Y, True)
save(network)Then comment out load_weights(network) to avoid overwriting with old weights before training.
Weights are saved as CSV files in model_weights/:
{layer_name}_weights.csv- weight matrices{layer_name}_bias.csv- bias vectors
This keeps things simple and human-readable. No need for pickle or database storage for a model this size.
- numpy
- pandas
- scikit-learn
- mysql-connector-python (only if using database features)
- I ran a local MySQL DB on my computer, so get your own server :|