added plot generators and current c++ code
renamed some matlab files
This commit is contained in:
@@ -440,8 +440,8 @@ public:
|
||||
opt.setElitism(0.07f);
|
||||
opt.setPopulationSize(100);
|
||||
opt.setMaxIterations(200);
|
||||
opt.setMutation(0.20f);
|
||||
opt.setValRange(0.25);
|
||||
opt.setMutation(0.40f);
|
||||
opt.setValRange(0.20);
|
||||
opt.calculateOptimum(func, vec);
|
||||
|
||||
|
||||
@@ -514,7 +514,7 @@ public:
|
||||
netLines[i].clear();
|
||||
}
|
||||
|
||||
for (int ms = 0; ms < 20000; ms += 50) { // K::Gnuplot gp;
|
||||
for (int ms = 0; ms < 12000; ms += 100) { // K::Gnuplot gp;
|
||||
// K::GnuplotPlot plot;
|
||||
// K::GnuplotPlotElementLines line[3];
|
||||
// line[0].setColorHex("#ff0000"); line[0].setTitle("x");
|
||||
@@ -546,7 +546,7 @@ public:
|
||||
}
|
||||
|
||||
// process every (positive) occurence within the practice
|
||||
for (int ts = 1000; ts < 10000; ts += 50) {
|
||||
for (int ts = 0; ts < 12000; ts += 100) {
|
||||
|
||||
std::vector<float> values = getNetworkInput(interpol, ts);
|
||||
std::vector<float> res = net.get(values);
|
||||
@@ -566,11 +566,32 @@ public:
|
||||
gp2.draw(plot2);
|
||||
gp2.flush();
|
||||
|
||||
usleep(1000*50);
|
||||
|
||||
|
||||
//usleep(1000*50);
|
||||
|
||||
|
||||
}
|
||||
|
||||
gp1.flush();;
|
||||
gp2.flush();;
|
||||
|
||||
std::string fileRaw = "raw_" + std::to_string((int)p.type);
|
||||
std::string fileNet = "net_" + std::to_string((int)p.type);
|
||||
gp1 << "set terminal emf size 600,250\n set output '"<<fileRaw<<".emf'\n unset xtics\n unset key\n unset arrow 1\n unset arrow 2\n set format y ' '\n";
|
||||
gp2 << "set terminal emf size 600,250\n set output '"<<fileNet<<".emf'\n unset xtics\n unset key\n set format y ' '\n";
|
||||
|
||||
gp1.draw(plot1);
|
||||
gp2.draw(plot2);
|
||||
|
||||
std::ofstream out1("/tmp/"+fileRaw+".gp"); out1 << gp1.getBuffer(); out1.close();
|
||||
std::ofstream out2("/tmp/"+fileNet+".gp"); out2 << gp2.getBuffer(); out2.close();
|
||||
gp1.flush();
|
||||
gp2.flush();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
sleep(1000);
|
||||
|
||||
Reference in New Issue
Block a user