FlexNN 1
Fully connected neural network built from scratch with flexible n-layer design and multiple activations.
Loading...
Searching...
No Matches
Utility.h
Go to the documentation of this file.
1
12#ifndef FlexNN_UTILITY_H
13#define FlexNN_UTILITY_H
14
15#include <Eigen/Dense>
16#include <string>
17#include <vector>
18
27namespace FlexNN
28{
39 Eigen::MatrixXd oneHotEncode(const Eigen::VectorXd &Y, int num_classes);
40
52 void readCSV_XY(const std::string &filename, Eigen::MatrixXd &X, Eigen::VectorXd &Y);
53
65 std::vector<std::pair<Eigen::MatrixXd, Eigen::VectorXd>>
66 splitXY(const Eigen::MatrixXd &X, const Eigen::VectorXd &Y, const std::vector<double> &proportions);
67}
68
69#endif // FlexNN_UTILITY_H
Namespace for the FlexNN neural network library.
std::vector< std::pair< Eigen::MatrixXd, Eigen::VectorXd > > splitXY(const Eigen::MatrixXd &X, const Eigen::VectorXd &Y, const std::vector< double > &proportions)
Splits the dataset into multiple sets based on specified proportions.
Definition Utility.cpp:109
Eigen::MatrixXd oneHotEncode(const Eigen::VectorXd &Y, int num_classes)
One-hot encodes a vector of class labels.
Definition Utility.cpp:32
void readCSV_XY(const std::string &filename, Eigen::MatrixXd &X, Eigen::VectorXd &Y)
Reads a CSV file and splits it into features (X) and labels (Y).
Definition Utility.cpp:55