Exemplo n.º 1
0
        public void asdfasdf()
        {
            Bernoulli [] [] activeActivities = { new Bernoulli [N] };

            for (int i = 0; i < N; i++)
            {
                Bernoulli [] [] temp;
                testModel.Test(
                    new [] { new [] { features [0] [i] } },
                    activePosteriorWeightMeans,
                    activePosteriorWeightPrecisions,
                    out temp);
                activeActivities [0] [i] = temp [0] [0];


                // Now retrain using this label
                trainModel.Train(new [] { new [] { features [0] [i] } }, new [] { new [] { labels [0] [i] } },
                                 activePosteriorWeightMeans,
                                 activePosteriorWeightPrecisions,
                                 out activePosteriorWeights,
                                 out activePosteriorWeightMeans,
                                 out activePosteriorWeightPrecisions);
            }

            var activeMetrics = new Metrics {
                Estimates  = activeActivities [0],
                TrueLabels = labels [0]
            };

            activeMetrics.PrintSummary();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Add the specified metrics.
 /// </summary>
 /// <param name="metrics">Metrics.</param>
 /// <param name="printSummary">If set to <c>true</c> print summary.</param>
 public void Add(Metrics metrics, bool printSummary = false)
 {
     this.metrics.Add(metrics);
     if (printSummary)
     {
         metrics.PrintSummary();
     }
 }
 /// <summary>
 /// Add the specified metrics.
 /// </summary>
 /// <param name="metrics">Metrics.</param>
 /// <param name="printSummary">If set to <c>true</c> print summary.</param>
 public void Add(Metrics metrics, bool printSummary = false)
 {
     this.metrics.Add(metrics);
     if (printSummary)
     {
         metrics.PrintSummary();
     }
 }
Exemplo n.º 4
0
        public void asdfasdf()
        {
            Bernoulli [] [] activeActivities = { new Bernoulli [N] };

              for ( int i = 0; i < N; i++ ) {
            Bernoulli [] [] temp;
            testModel.Test(
              new [] { new [] { features [0] [i] } },
              activePosteriorWeightMeans,
              activePosteriorWeightPrecisions,
              out temp );
            activeActivities [0] [i] = temp [0] [0];

            // Now retrain using this label
            trainModel.Train( new [] { new [] { features [0] [i] } }, new [] { new [] { labels [0] [i] } },
              activePosteriorWeightMeans,
              activePosteriorWeightPrecisions,
              out activePosteriorWeights,
              out activePosteriorWeightMeans,
              out activePosteriorWeightPrecisions );
              }

              var activeMetrics = new Metrics {
            Estimates = activeActivities [0],
            TrueLabels = labels [0]
              };

              activeMetrics.PrintSummary();
        }