We introduce the Self-Learning Autonomous Edge Learning and Inferencing Pipeline (AEP). AEP is a software system we have developed for resource-constrained devices. Beside the inference capability, the AEP allows autonomous field training, by means of a two stage pipeline, involving a label generation with a confidence measure step and on-device training.
For label generation, AEP implements the following clustering algorithm:
k-means
: For on-device training, AEP currently implements the following ML algorithms (training and classification) for binary classification problems:
Decision Tree
K-NN
You can compile the code as an executable or as a static library, using gcc/g++ for a Microcontroller or a desktop (e.g., thorugh Eclipse CDT or Visual Studio Code).
The program must be configured first in main.h
, where the user has to specify some #define
, such as:
Algorithm: to enable one of the two supported classifirers
Confidence: to enable/disable the confidence algorithm
Filter: to enable one of the three supported memory filtering strategies
Second, the memory should be configured in pipeline.h
, where the user has to choose values for:
Third, the k-means algorithm should be configured in kmeans.h
, where the user has to choose values for:
If AutoDT
was set, the program must be configured in decision_tree_training.h
, where the user has to choose values for:
If AutoKNN
was set, the program must be configured in knn_classification.h
, where the user has to choose value for:
main.h
exposes the following functions:
kmeans
, k-means clustering algorithm. More details about this function can be found in the kmeans.c
filedecision_tree_training
, the decision tree training algorithm. More details about this function can be found in the decision_tree_training.c
filedecision_tree_classifier
, the decision tree classification algorithm. More details about this function can be found in the decision_tree_classifier.c
fileknn_classification
, the K-NN classification algorithm. More details about this function can be found in the knn_classification.c
file
kmeans_classifierpipeline
, the pipeline function followed after clustering and training. More details about this function can be found in the pipeline.c
filequicksort_idx
and update_mem
, these two functions are responsible of sorting the samples in memory to keep the most confident ones when CONF
filtering is enables.random_func
, this function is responsible of choosing the random samples to be removed when RND
filtering is enables.The obtained results after running the AEP with the user defined parameters are saved in a text file named log.txt
F., Sakr, R. Berta, J. Doyle, A. De Gloria, and F., Bellotti, "Self-Learning Pipeline for Low-Energy Resource-Constrained Devices," Energies 2021, 14, 6636. https://www.mdpi.com/1996-1073/14/20/6636