Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/10/17 09:05:38 (7 years ago)
Author:
gkronber
Message:

#2789 trying to get SBART to work correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/MathNetNumerics-Exploration-2789/Main/Program.cs

    r15459 r15469  
    1313    static void Main(string[] args) {
    1414
    15       var xs = HeuristicLab.Common.SequenceGenerator.GenerateSteps(-3.5, 3.5, 0.02, includeEnd: true).ToArray();
    16       var ys = xs.Select(xi => (1.0 / (Math.Sqrt(2 * Math.PI)) * Math.Exp(-0.5 * xi * xi))).ToArray();
    17 
    18       alglib.hqrndstate state;
    19       alglib.hqrndseed(1234, 5678, out state);
    20       var ys_noise = ys.Select(yi => yi + alglib.hqrndnormal(state) * 0.01).ToArray();
    21 
    22       SBART.SBART_Report rep;
    23       SBART.CalculateSBART(xs, ys_noise, "y", new string[] { "x" }, 1.0f, out rep);
     15       var xs = HeuristicLab.Common.SequenceGenerator.GenerateSteps(-3.5, 3.5, 0.02, includeEnd: true).ToArray();
     16       var ys = xs.Select(xi => (1.0 / (Math.Sqrt(2 * Math.PI)) * Math.Exp(-0.5 * xi * xi))).ToArray();
     17       var ws = xs.Select(_ => 1.0).ToArray();
     18 
     19       alglib.hqrndstate state;
     20       alglib.hqrndseed(1234, 5678, out state);
     21       var ys_noise = ys.Select(yi => yi + alglib.hqrndnormal(state) * 0.01).ToArray();
     22 
     23       SBART.SBART_Report rep;
     24       SBART.CalculateSBART(xs, ys_noise, ws, 2, "y", new string[] { "x" }, out rep);
    2425
    2526
Note: See TracChangeset for help on using the changeset viewer.