public ApproxPolynom(List <WeightPointD> Points, int Power, ApproxFunc Func)
 {
     points     = Points;
     power      = Power;
     approxFunc = Func;
     Build();
 }
Exemple #2
0
        private static void initApproxFunc()
        {
            //approximationFunc = ((x) => { return x; });
            //minRange = 0;
            //maxRange = 480f;
            //minFunc = 0;
            //maxFunc = 480;
            //hiddenLayerSize = 10;
            //learningRate = 0.001f;
            //momentum = 0.01f;
            //learning_rate_decay = 10; // Epochs

            //approximationFunc = ((x) => { return (float)Math.Pow(x, 3) - 2 * x; });
            //minRange = 0;
            //maxRange = 5.0f;
            //minFunc = -5;
            //maxFunc = 125;
            //hiddenLayerSize = 22;
            //learningRate = 0.01f;
            //momentum = 0.01f;
            //learning_rate_decay = 12; // Epochs

            approximationFunc   = ((x) => { return((float)Math.Sin(x)); });
            minRange            = 0;
            maxRange            = (float)Math.PI * 2.0f;
            minFunc             = -1;
            maxFunc             = 1;
            hiddenLayerSize     = 22;
            learningRate        = 0.01f;
            momentum            = 0.01f;
            learning_rate_decay = 10; // Epochs
        }