1
0

initial commit

This commit is contained in:
Tibeuleu
2023-12-31 15:42:33 +01:00
commit 9882d0c0d1
484 changed files with 28426 additions and 0 deletions

27
test_models.cpp Executable file
View File

@@ -0,0 +1,27 @@
#include<iostream>
#include<stdlib.h>
#include"models.h"
int main(){
Data Exp1("Exp1");
Exp1.randSet(20,1,0.2);
LinearApprox Lin1;
Lin1.setExpData(Exp1);
Lin1.getCost();
std::cout << "Cost : " << Lin1.getCost() << std::endl;
Lin1.exportModel();
Data Exp2("Exp2");
Exp2.randSet(20,1,0.2);
PolynomialApprox Pol2(2);
Pol2.setExpData(Exp2);
Pol2.setParams({3.,4.});
Pol2.getCost();
std::cout << "Cost : " << Pol2.getCost() << std::endl;
//Pol2.exportModel();
std::vector<double> n_param = Pol2.getNeighbor(0.1);
PolynomialApprox Pol3(n_param);
std::cout << Pol3.getParam()[0] << " test" << std::endl;
Pol3.exportModel();
return 0;
}