All Downloads are FREE. Search and download functionalities are using the official Maven repository.

exp-examples.regression-comparison.txt Maven / Gradle / Ivy

The newest version!
ea.experiment(
  runs = (randomGenerator = (seed = [1:1:3]) * [m.defaultRG()]) *
    (problem = [
      ea.p.ur.bundled(name = "concrete"; xScaling = standardization; yScaling = symmetric_min_max);
      ea.p.ur.bundled(name = "energy-efficiency"; xScaling = standardization; yScaling = symmetric_min_max);
      ea.p.ur.bundled(name = "wine"; xScaling = standardization; yScaling = symmetric_min_max)
    ]) *
    (solver = (nEval = [5000]) * [
      ea.s.ga(
        name = "gp";
        representation = ea.r.srTree();
        mapper = ea.m.srTreeToNurf()
      );
      ea.s.ga(
        name = "ga+mlp(1)";
        representation = ea.r.doubleString();
        mapper = ea.m.nmrfToNurf(of = ea.m.ntissToNmrf(of = ea.m.dsToNpnds(npnds = ds.num.mlp(innerLayerRatio = 1; nOfInnerLayers = 1))))
      );
      ea.s.ga(
        name = "ga+mlp(2)";
        representation = ea.r.doubleString();
        mapper = ea.m.nmrfToNurf(of = ea.m.ntissToNmrf(of = ea.m.dsToNpnds(npnds = ds.num.mlp(innerLayerRatio = 1; nOfInnerLayers = 2))))
      )
    ]) * [
    ea.run()
  ];
  listeners = [
    ea.l.console(
      functions = [
        ea.f.size(of = ea.f.genotype(of = ea.f.best()); format = "%3d");
        ea.f.quality(of = ea.f.best(); format = "%6.2f");
        ea.f.hist(of = f.each(of = ea.f.all(); mapF = ea.f.quality()));
        ea.f.validationQuality(format = "%6.2f")
      ];
      onlyLast = true
    );
    ea.l.expPlotSaver(
      filePath = "../regr-train-fitness.png";
      freeScales = true;
      w = 600; h = 1000;
      type = lines;
      plot = ea.plot.qualityPlotMatrix()
    );
    ea.l.expPlotSaver(
      filePath = "../regr-test-fitness.png";
      freeScales = true;
      w = 600; h = 1000;
      type = lines;
      plot = ea.plot.qualityPlotMatrix(yFunction = ea.f.validationQuality())
    )
  ]
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy