Ejemplo n.º 1
0
        private void constructor(int components)
        {
            ComputeLabels        = true;
            ComputeLogLikelihood = true;
            Tolerance            = 1e-3;
            Initializations      = 3;
            MaxIterations        = 0;
            UseLogarithm         = true;
            Options = new Statistics.Distributions.Fitting.NormalOptions();

            // Initialize the model using the created objects.
            this.clusters = new GaussianClusterCollection(components);
        }
Ejemplo n.º 2
0
        private void constructor(int components)
        {
            // Create the object-oriented structure to hold
            //   information about mixture model components.
            var clusterList = new List <GaussianCluster>(components);

            for (int i = 0; i < components; i++)
            {
                clusterList.Add(new GaussianCluster(this, i));
            }

            // Initialize the model using the created objects.
            this.clusters = new GaussianClusterCollection(this, clusterList);
        }
Ejemplo n.º 3
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="GaussianMixtureModel"/> class.
        /// </summary>
        ///
        /// <param name="components">
        ///   The number of clusters in the clusterization problem. This will be
        ///   used to set the number of components in the mixture model.</param>
        ///
        public GaussianMixtureModel(int components)
        {
            if (components <= 0)
            {
                throw new ArgumentOutOfRangeException("components",
                                                      "The number of components should be greater than zero.");
            }

            // Create the object-oriented structure to hold
            //   information about mixture model components.
            var clusterList = new List <GaussianCluster>(components);

            for (int i = 0; i < components; i++)
            {
                clusterList.Add(new GaussianCluster(this, i));
            }

            // Initialize the model using the created objects.
            this.clusters = new GaussianClusterCollection(clusterList);
        }