public override void EvaluateSolutionQuality(Solution <ClusterExampleAssignment> solution)
        {
            double quality = 0;

            this.ClusteringSolution.SetClusterExampleAssignment(solution.ToList());
            IClassifier classifier = BayesianNetworks.Model.BayesianClusterMultinetClassifier.ConstructClusterBMNClassifier(this.ClusteringSolution, this._classificationAlgorithm, this._dataset);

            DataMining.ClassificationMeasures.ConfusionMatrix[] list = DataMining.ClassificationMeasures.ConfusionMatrix.GetConfusionMatrixes(classifier, this._dataset);
            quality          = _measure.CalculateMeasure(list);
            solution.Quality = quality;
        }
        private List <ClassifierInfo> CreateEnsemble(Node current)
        {
            List <ClassifierInfo> ensemble = new List <ClassifierInfo>();

            foreach (Dataset currentTrainingSet in this._trainingSets)
            {
                Dataset local = GetLocalFlatDataset(current, currentTrainingSet);

                _algorithm.Dataset = local;
                IClassifier    currentClassifier = _algorithm.CreateClassifier();
                double         currentQyuality   = _evaluator.CalculateMeasure(ConfusionMatrix.GetConfusionMatrixes(currentClassifier, local));
                ClassifierInfo info = new ClassifierInfo()
                {
                    Classifier = currentClassifier, Desc = current.Name + ":" + currentTrainingSet.Metadata.DatasetName, Quality = currentQyuality
                };

                if (_fireEvents)
                {
                    ClassifierInfoEventArgs args = new ClassifierInfoEventArgs()
                    {
                        Info = info
                    };
                    this.onPostClassifierConstruction(current, args);
                }

                ensemble.Add(info);
            }

            return(ensemble);
        }