示例#1
0
        } /* AssignVallidatedClassAsPredictedClass */

        public void  UpdateClassificationStats(SizeDistribution2 _sizeDistributionDown,
                                               SizeDistribution2 _sizeDistributionUp,
                                               SizeDistribution _depthDistribution_1,
                                               SizeDistribution _depthDistribution_1Down,
                                               SizeDistribution _depthDistribution_1Up,
                                               SizeDistribution _depthDistribution_10,
                                               ref uint _numImagesClassified
                                               )
        {
            _sizeDistributionDown.Add(sizeDistributionDown);
            _sizeDistributionUp.Add(sizeDistributionUp);
            _depthDistribution_1.Add(depthDistribution_1);
            _depthDistribution_1Down.Add(depthDistribution_1Down);
            _depthDistribution_1Up.Add(depthDistribution_1Up);
            _depthDistribution_10.Add(depthDistribution_10);
            _numImagesClassified += numImagesClassified;
        } /* UpdateClassificationStats */
示例#2
0
        private void  ClassInitialization()
        {
            sizeDistributionDown    = new  SizeDistribution2(0.1f, 1.2f, 10.0f);
            sizeDistributionUp      = new  SizeDistribution2(0.1f, 1.2f, 10.0f);
            depthDistribution_1     = new  SizeDistribution(500, 1);
            depthDistribution_1Down = new  SizeDistribution(500, 1);
            depthDistribution_1Up   = new  SizeDistribution(500, 1);
            depthDistribution_10    = new  SizeDistribution(50, 10);
            classCounts             = new  ClassStatSortedList();

            numImagesClassified = 0;

            pred1 = new PicesPrediction(null, 0, 0.0f);
            pred2 = new PicesPrediction(null, 0, 0.0f);
            if (classifier != null)
            {
                classesInClassifier = classifier.MLClasses();
            }
        }
示例#3
0
        } /* AddFamilyOfClassesToSizeClassTotals */

        /// <summary>
        /// Will add in the contents of another SizeDistribution instance into this instance.
        /// </summary>
        /// <param name="x">The other 'SizeDistribution' instance to be accumulated to this instance.</param>
        public void  Add(SizeDistribution x)
        {
            if ((x.bucketCount != this.bucketCount) || (x.bucketSize != this.bucketSize))
            {
                throw new Exception("'SizeDistribution.Add   ***ERROR***   Dimensions are not the same" + "\n" +
                                    "Left.bucketCount[" + bucketCount.ToString() + "]  Right[" + x.bucketCount.ToString() + "]" + "\n" +
                                    "Left.bucketSize [" + this.bucketSize.ToString() + "]  Right.bucketSize[" + x.bucketSize.ToString() + "]"
                                    );
            }

            foreach (ClassTotals ct in x.totals)
            {
                ClassTotals classTotals = totals.LookUp(ct.Name);
                if (classTotals == null)
                {
                    classTotals = new ClassTotals(ct.Name, bucketCount, bucketSize);
                    totals.Add(classTotals);
                }
                classTotals.AddIn(ct);
            }
        } /* SizeDistribution */