Exemple #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();
        }
Exemple #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();
     }
 }
Exemple #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();
        }