コード例 #1
0
ファイル: FeatureSelection.cs プロジェクト: pluskal/AppIdent
        public IEnumerable <double[, ]> ProcessFeatureSelection(AppIdentAcordSource appIdentAcordSource, double trashold)
        {
            this.FeatureSelector = appIdentAcordSource.FeatureSelector;
            this.RemoveFeaturesWithConstantValue(appIdentAcordSource);

            var    iterationResults      = new List <double[, ]>();
            Type   mostCorrelatedFeature = null;
            double correlation           = 1;

            while (correlation > trashold)
            {
                if (mostCorrelatedFeature != null)
                {
                    appIdentAcordSource.FeatureSelector.RemoveFeature(mostCorrelatedFeature);
                }
                var correlationMatrix = this.GetCorrelationMatrix(appIdentAcordSource);
                iterationResults.Add(correlationMatrix);
                mostCorrelatedFeature = this.GetMostCorellatedFeature(correlationMatrix, out correlation);
            }
            this.FeatureSelector = null;
            return(iterationResults);
        }
コード例 #2
0
        //public AppIdentAcordSource()
        //{
        //    this.FeatureSelector = new FeatureSelector(this.GetFeatureVectorFeatureProperties().Select(p => p.PropertyType));
        //}

        public AppIdentAcordSource(FeatureSelector featureSelector)
        {
            this.FeatureSelector = featureSelector;
        }