Ejemplo n.º 1
0
        public NeuralNetworkTrainingResult Train(NeuralNetworkTrainingContext context)
        {
            var theta = _engine.InitializeTheta().ToArray();

            double epsg   = 0.0000000001;
            double epsf   = 0;
            double epsx   = 0;
            int    maxits = context.MaxIterations;

            alglib.mincgstate  state;
            alglib.mincgreport rep;
            alglib.mincgcreate(theta, out state);
            alglib.mincgsetcond(state, epsg, epsf, epsx, maxits);
            alglib.mincgoptimize(state, _engine.CostForAlglib, null, context);
            alglib.mincgresults(state, out theta, out rep);

            //System.Console.WriteLine("{0}", rep.terminationtype);
            //System.Console.WriteLine("{0}", alglib.ap.format(theta, 2));


            return(new NeuralNetworkTrainingResult
            {
                Theta = null
            });
        }
Ejemplo n.º 2
0
        public NeuralNetworkTrainingResult Train(NeuralNetworkTrainingContext context)
        {
            var theta = _engine.InitializeTheta().ToArray();

            double epsg = 0.0000000001;
            double epsf = 0;
            double epsx = 0;
            int maxits = context.MaxIterations;

            alglib.mincgstate state;
            alglib.mincgreport rep;
            alglib.mincgcreate(theta, out state);
            alglib.mincgsetcond(state, epsg, epsf, epsx, maxits);
            alglib.mincgoptimize(state, _engine.CostForAlglib, null, context);
            alglib.mincgresults(state, out theta, out rep);

            //System.Console.WriteLine("{0}", rep.terminationtype);
            //System.Console.WriteLine("{0}", alglib.ap.format(theta, 2));

            return new NeuralNetworkTrainingResult
            {
                Theta = null
            };
        }
Ejemplo n.º 3
0
 public NeuralNetworkTrainingResult TrainWithValidation(NeuralNetworkTrainingContext request)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 4
0
 public NeuralNetworkTrainingResult TrainWithValidation(NeuralNetworkTrainingContext request)
 {
     throw new NotImplementedException();
 }