Esempio n. 1
0
        public static string GetFittedDataPreview(ref Culture culture, NeuralParameters parameters)
        {
            var raw    = Modules.Clone(culture.GrowthMeasurements.GetMeasurements(DataType.Raw));
            var fitted = Modules.ProccessedAndFitDatapoints(raw, 0, parameters, TrueODCalibartionFunction);

            culture.GrowthMeasurements.SetMeasurements(fitted, DataType.ProcessedFitted);

            var lag   = new MacroLagData();
            var yield = new MacroYieldData();
            var gt    = new MacroRateData();

            if (Modules.NoGrowth(fitted))
            {
                lag.Lag     = 48;
                yield.Yield = double.NaN;
                gt.GT       = double.NaN;
            }
            else
            {
                lag   = Modules.GetLag(fitted);
                yield = Modules.GetYield(fitted);
                gt    = Modules.GetGT(fitted);
            }
            string format = "00.0000";

            return(string.Format(CultureInfo.InvariantCulture, "Prev Lag = {0}, Fitted Lag = {1} \r\nPrev GT = {2}, Fitted Rate = {3} \r\nPrev Yield = {4}, Fitted Yield = {5}", culture.Lag.ToString(format), lag.Lag.ToString(format), culture.Rate.ToString(format), gt.GT.ToString(format), culture.Yield.ToString(format), yield.Yield.ToString(format)));
        }
Esempio n. 2
0
 public Neural(NeuralParameters parameters)
 {
     _learningRate        = parameters.LearningRate;
     _sigmoidAlphaValue   = parameters.SigmoidAlphaValue;
     _neuronsInFirstLayer = parameters.NeuronsInFirstLayer;
     _iterations          = parameters.Iterations;
     _useNguyenWidrow     = parameters.UseNguyenWidrow;
     _useRegularization   = parameters.UseRegularization;
 }