Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
08a1422
Add the drivers for the GY89 MPU and barometer BMP 180
shrit Jun 20, 2026
cdffaa3
Adding a Makefile for the collect dataset project, use ncurses
shrit Jun 20, 2026
15e633a
Adding the collect binary that collect data w/o TUI
shrit Jun 20, 2026
cdf960b
Adding the CMake configuration that is needed for cross compilation
shrit Jun 21, 2026
9c3a920
Adding necessary CMakeLists file needed for the cross compilation
shrit Jun 21, 2026
711fa01
Fix capture the next arg, and also make TUI by default unless otherwise
shrit Jun 21, 2026
434635d
Make ncurses compiles by default unless the user say otherwise
shrit Jun 28, 2026
39ed301
Adding OpenBLAS patch in CMakelist before the compilation
shrit Jun 28, 2026
26d1747
Remove makefiles as pre review
shrit Jul 13, 2026
0c792dd
Remove completely ncurses
shrit Jul 13, 2026
6278731
Simplify the code largely to make it easier to read
shrit Jul 13, 2026
a2160d7
Move manually the sensor code into its own class
shrit Jul 13, 2026
05fb789
Inline mag calibration class
shrit Jul 13, 2026
84d8402
Remove the cpp from the list of files to compile
shrit Jul 13, 2026
32544aa
Write openblas function that apply the low memory patch modification
shrit Jul 14, 2026
be89ac9
Move the parse sensor to sensor_board class since it is being used by…
shrit Jul 14, 2026
0d61be2
Simplify the argc argv input according to rcurtin comment
shrit Jul 14, 2026
bef370a
Fix the architecture flag, and match our mlpack modifications
shrit Jul 14, 2026
0a8753f
Fix the author name
shrit Jul 14, 2026
ce3e999
Train function added, first version
shrit Jul 14, 2026
5252fef
Adding comments relevant to the matrix shape changes
shrit Jul 19, 2026
4a7eaa3
Fix the window size in the comments to be 256 which is 2.5 seconds
shrit Jul 26, 2026
052d59d
Add the patch for openblas matrix multiplication buffer size
shrit Jul 26, 2026
d524d8e
Add a local README only for this project, to make it easy to evaluate…
shrit Jul 26, 2026
d4b793c
Add a first version for the inference loop
shrit Jul 26, 2026
e71f44e
Change the name from collect_main to collect to match others
shrit Jul 26, 2026
f648c6c
Get rid of cstdio, and use fstream and iostream
shrit Jul 26, 2026
0451e98
Make the model saved inside its own model directory
shrit Jul 26, 2026
aba9757
Use model directory in both training and inference
shrit Jul 26, 2026
48471f2
Simplify the code for the input and make the window size fixed
shrit Sep 23, 2026
87cddc7
Fix the comments, simplify the code
shrit Sep 24, 2026
0ed972e
Remove magnometer calibration
shrit Sep 24, 2026
d1d40c8
Remove mangometer calibration, since it is not relevant to the project
shrit Sep 24, 2026
7b638fc
Fix the load function call, do not use deprecated function
shrit Sep 24, 2026
28c810c
Do not use deprecated functions
shrit Sep 24, 2026
737b23b
Use new API with DataOptions and httplib
shrit Sep 24, 2026
35c7c48
Apply the new Scaler template class, no need to convert fmat and mat
shrit Sep 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/decision_tree/loan_default_prediction/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ SRC := loan-default-prediction.cpp
LIBS_NAME := armadillo

CXX := g++
CXXFLAGS += -std=c++17 -Wall -Wextra -O3 -DNDEBUG -fopenmp
CXXFLAGS += -std=c++17 -Wall -Wextra -DMLPACK_ENABLE_HTTPLIB -O3 -DNDEBUG -fopenmp
# Use these CXXFLAGS instead if you want to compile with debugging symbols and
# without optimizations.
# CXXFLAGS += -std=c++17 -Wall -Wextra -g -O0
# CXXFLAGS += -std=c++17 -Wall -Wextra -DMLPACK_ENABLE_HTTPLIB -g -O0

LDFLAGS += -fopenmp
# Add header directories for any includes that aren't on the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void ClassificationReport(const arma::Row<size_t>& yPreds, const arma::Row<size_
int main()
{
arma::mat loanData;
data::Load("../../../data/LoanDefault.csv", loanData);
data::Load("http://datasets.mlpack.org/LoanDefault.csv", loanData);

// Split the data into features (X) and target (y) variables, targets are the last row.
arma::Row<size_t> targets = arma::conv_to<arma::Row<size_t>>::from(loanData.row(loanData.n_rows - 1));
Expand Down
4 changes: 2 additions & 2 deletions cpp/kmeans/dominant-colors/dominant-colors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ void dominantColors(std::string PathToImage, std::string PathToColorBars)
{
// Load the example image.
arma::Mat<unsigned char> imageMatrix;
data::ImageInfo info;
data::Load(PathToImage, imageMatrix, info, false);
data::ImageOptions info;
data::Load(PathToImage, imageMatrix, info);
// Print the image shape.
std::cout << "Image info -"
<< " Width:" << info.Width()
Expand Down
4 changes: 2 additions & 2 deletions cpp/kmeans/pima_indians_diabetes_clustering/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ SRC := pima-indians-diabetes.cpp
LIBS_NAME := armadillo # python3.11 #uncomment python for the Scatter function

CXX := g++
CXXFLAGS += -std=c++17 -Wall -Wextra -O3 -DNDEBUG -fopenmp
CXXFLAGS += -std=c++17 -Wall -Wextra -DMLPACK_ENABLE_HTTPLIB -O3 -DNDEBUG -fopenmp
# Use these CXXFLAGS instead if you want to compile with debugging symbols and
# without optimizations.
# CXXFLAGS += -std=c++17 -Wall -Wextra -g -O0
# CXXFLAGS += -std=c++17 -Wall -Wextra -DMLPACK_ENABLE_HTTPLIB -g -O0

LDFLAGS += -fopenmp
# Add header directories for any includes that aren't on the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ int main(int argc, char* argv[])
// Digestive and Kidney Diseases and can be used to predict whether a,
// patient has diabetes based on certain diagnostic factors.,
arma::mat input;
data::Load("../../../data/pima-indians-diabetes.csv", input);
data::Load("http://datasets.mlpack.org/pima-indians-diabetes.csv", input);
// Print the first 10 rows of the input data.,
std::cout << std::setw(18) << "Pregnancies "
<< std::setw(10) << "Glucose "
Expand Down
4 changes: 2 additions & 2 deletions cpp/lstm/dga_detection/lstm_dga_detection_predict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ int main(int argc, char** argv)
// First load the model.
RNN<NegativeLogLikelihoodType<arma::fmat>, RandomInitialization, arma::fmat>
benignModel, maliciousModel;
data::Load(argv[1], "lstm_model", benignModel, true /* fatal on failure */);
data::Load(argv[2], "lstm_model", maliciousModel, true);
data::Load(argv[1], benignModel, data::BIN + data::Fatal);
data::Load(argv[2], maliciousModel, data::BIN + data::Fatal);

// Now enter a loop where we read domains from stdin and then make
// predictions.
Expand Down
12 changes: 4 additions & 8 deletions cpp/lstm/dga_detection/lstm_dga_detection_train.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,8 @@ int main(int argc, char** argv)
<< " correct (" << testAccuracy << "%)." << endl;

// Save the trained model.
data::Save("lstm_dga_detector_benign.bin",
"lstm_model",
benignModel,
true /* fatal on failure */);
data::Save("lstm_dga_detector_malicious.bin",
"lstm_model",
maliciousModel,
true /* fatal on failure */);
data::Save("lstm_dga_detector_benign.bin", benignModel,
data::BIN + data::Fatal);
data::Save("lstm_dga_detector_malicious.bin", maliciousModel,
data::BIN + data::Fatal);
}
4 changes: 2 additions & 2 deletions cpp/lstm/electricity_consumption/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ SRC := lstm_electricity_consumption.cpp
LIBS_NAME := armadillo

CXX := g++
CXXFLAGS += -std=c++17 -Wall -Wextra -O3 -DNDEBUG -fopenmp
CXXFLAGS += -std=c++17 -Wall -Wextra -DMLPACK_ENABLE_HTTPLIB -O3 -DNDEBUG -fopenmp
# Use these CXXFLAGS instead if you want to compile with debugging symbols
# and without optimizations.
# CXXFLAGS += -std=c++17 -Wall -Wextra -g -O0
# CXXFLAGS += -std=c++17 -Wall -Wextra -DMLPACK_ENABLE_HTTPLIB -g -O0
LDFLAGS += -fopenmp
# Add header directories for any includes that aren't on the default compiler
# search path.
Expand Down
Loading
Loading