Compute Generalized Majority \( (m^{\varepsilon},\cap) \\\)-Reducts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//load training data set
var train = Data.Benchmark.Factory.Dna();
//setup reduct factory parameters
Args parms = new Args();
parms.SetParameter(ReductFactoryOptions.DecisionTable, train);
parms.SetParameter(ReductFactoryOptions.ReductType,
ReductTypes.GeneralizedMajorityDecision);
parms.SetParameter(ReductFactoryOptions.WeightGenerator,
new WeightGeneratorMajority(train));
parms.SetParameter(ReductFactoryOptions.Epsilon, 0.05);
parms.SetParameter(ReductFactoryOptions.PermutationCollection,
new PermutationCollection(10,
train.SelectAttributeIds(a => a.IsStandard)
.ToArray()));
//generate reducts
var reductGenerator = ReductFactory.GetReductGenerator(parms);
var reducts = reductGenerator.GetReducts();
Written on June 28, 2017