This project implements an AI-assisted system for matching real-world test data to ideal mathematical functions. It uses regression techniques and structured data analysis to find the best-fitting function for each test datapoint.
The goal of the system is to:
- Analyse and visualise training, test, and reference (ideal) datasets.
- Identify the ideal function that best matches each test datapoint.
- Store results in a database and visualise them for further insights.
You can either run the system as:
- a standalone Python script (
main.py), or - interactively in Jupyter Notebook form via
main.ipynb.
main.py: Entry point that orchestrates data loading, function matching, and result visualisation.main.ipynb: Jupyter-based equivalent ofmain.py, ideal for interactive exploration.Research.py: Analytical and exploratory module for deeper insights.FileReader.py: Handles CSV imports and data preparation.Regression.py: Performs ideal function matching using regression analysis.Visualisation.py: Creates plots to compare real and ideal data.SQL.py: Saves matching results to a SQLite database.Testing.py,UnitTests.ipynb: Contain automated tests – the notebook version allows step-by-step verification.
train.csv: Training data with known relationships.ideal.csv: A pool of idealised functions to compare against.test.csv: New test data to classify via function matching.
Function matching is based on calculating regression-based deviations between test points and reference functions. The best fit is determined by minimal error across all candidates.
This approach lays the foundation for future enhancements such as:
- Polynomial or non-linear regression
- Neural networks for pattern recognition
- Confidence-based assignment
- Visualisations showing ideal/test function alignment
- Matching results saved in a local SQLite database
- Tabular outputs and console logs for traceability
Make sure Python 3.9+ is installed. Install required libraries via:
pip install -r requirements.txtRun as Python script:
python main.pyOr use the notebook:
jupyter notebook main.ipynbRun tests via the Python test file:
python Testing.pyOr explore and verify logic step-by-step in the Jupyter Notebook:
jupyter notebook UnitTests.ipynbThis project is open-source and licensed under the GNU General Public License v3.0. See the LICENSE file for details.