Predicting energy consumptions of algorithm implementations using AI. This project's highest performing AI model produced a prediction to actual power consumption correlation of 0.97.
A set of implementations of some widely known algorithms. They were used in this project in the process of generating the dataset for the AIs.
- Node.js
A system that runs a subset of the previous algorithm implementations, each on a loop for a specified amount of time.
- Node.js
A system that obtains present power data from a smart plug and records it. Intended to be run while the Run Algorithms System is running on a separate device.
- Node.js
- tp-link-tapo-connect
A system that converts the written code of the algorithm implementations into numerical data for the AIs to receive as inputs.
Uses a variation of the bag of words model where both words, operations, and their parents are recorded. This was designed to account for time complexity. For example, a regular bag of words would not record nested for loops but instead would just count the number of for loops, whereas by including the parents of words, nested for loops would be recorded as nested for loops and not separate ones.
- Node.js
A system that takes the wattage data, obtained by running the Record Power System, and produces a less noisy version of it by removing anomalies and flattening fluctuations.
- Node.js
A system that calculates the milliwatts consumed per iteration of each algorithm implementation using the real data obtained.
- Node.js
A system that takes all the results of both the Code-to-Numerical System and the Calculate Power System to generate a single dataset to be used by the AIs.
- Node.js
An AI system that attempts to predict the relative energy consumption of algorithm implementations by calculating the cosine distance of each algorithm and clustering them using affinity propagation.
- Python
- numpy
- scipy
- sklearn
- json
A set of neural networks with different architectures and parameters that were trained to predict the energy consumption of algorithm implementations. The best subsystem produced a prediction to actual power consumption correlation of 0.97.
- Python
- PyTorch
- numpy
- json
- tabulate