Update version number and CHANGELOG
This commit is contained in:
23
CHANGELOG.md
Normal file
23
CHANGELOG.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.0.1] 2024-04-03
|
||||
|
||||
### Added
|
||||
|
||||
- Possibility to check the indices of the training and testing sets in the K-Fold and Stratified K-Fold partitioning. Now disabled due to apple's clang compiler mt19937 implementation.
|
||||
|
||||
### Changed
|
||||
|
||||
- Random number generator is changed to mt19937 to improve the robustness of the models generated.
|
||||
|
||||
## [1.0.0] 2024-01-08
|
||||
|
||||
### Added
|
||||
|
||||
- K-Fold partitioning for training and testing
|
||||
- Stratified K-Fold partitioning for training and testing
|
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
project(Folding
|
||||
VERSION 1.0.0
|
||||
VERSION 1.0.1
|
||||
DESCRIPTION "Folding utility for BayesNet library"
|
||||
HOMEPAGE_URL "https://github.com/rmontanana/folding"
|
||||
LANGUAGES CXX
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include <map>
|
||||
#include <random>
|
||||
#include <vector>
|
||||
#include "config.h"
|
||||
namespace folding {
|
||||
class Fold {
|
||||
protected:
|
||||
@@ -20,6 +21,7 @@ namespace folding {
|
||||
}
|
||||
virtual std::pair<std::vector<int>, std::vector<int>> getFold(int nFold) = 0;
|
||||
virtual ~Fold() = default;
|
||||
std::string version() { return { project_version.begin(), project_version.end() }; }
|
||||
int getNumberOfFolds() { return k; }
|
||||
};
|
||||
class KFold : public Fold {
|
||||
|
@@ -4,8 +4,17 @@
|
||||
#include "TestUtils.h"
|
||||
#include "folding.hpp"
|
||||
|
||||
TEST_CASE("Version Test", "[Folding]")
|
||||
{
|
||||
std::string actual_version = { project_version.begin(), project_version.end() };
|
||||
auto data = std::vector<int>(100);
|
||||
folding::StratifiedKFold stratified_kfold(5, data, 17);
|
||||
REQUIRE(stratified_kfold.version() == actual_version);
|
||||
folding::KFold kfold(5, 100, 19);
|
||||
REQUIRE(kfold.version() == actual_version);
|
||||
}
|
||||
|
||||
TEST_CASE("KFold Test", "[Platform][KFold]")
|
||||
TEST_CASE("KFold Test", "[Folding]")
|
||||
{
|
||||
// Initialize a KFold object with k=5 and a seed of 19.
|
||||
std::string file_name = GENERATE("iris", "diabetes", "glass");
|
||||
@@ -45,7 +54,7 @@ map<int, int> counts(std::vector<int> y, std::vector<int> indices)
|
||||
return result;
|
||||
}
|
||||
|
||||
TEST_CASE("StratifiedKFold Test", "[Platform][StratifiedKFold]")
|
||||
TEST_CASE("StratifiedKFold Test", "[Folding]")
|
||||
{
|
||||
// Initialize a StratifiedKFold object with k=3, using the y std::vector, and a seed of 17.
|
||||
std::string file_name = GENERATE("iris", "diabetes", "glass");
|
||||
|
Reference in New Issue
Block a user