static void Main(string[] args) { FileInputDatabaseHelper inputHelper = new FileInputDatabaseHelper("mushroom"); FileOutputDatabaseHelper outputHelper = new FileOutputDatabaseHelper(@"D:\Data_Mining_Assignment\Apriori\Result\"); AprioriAlgorithm apriori = new AprioriAlgorithm(inputHelper, outputHelper, 0.5f); apriori.GenerateFrequentItemSets(); }
public void GenerateFrequentItemSetsTest() { IInputDatabaseHelper _inDatabaseHelper = new FileInputDatabaseHelper("mushroom"); // TODO: Initialize to an appropriate value IOutputDatabaseHelper _outDatabaseHelper = new FileOutputDatabaseHelper(@"D:\Data_Mining_Assignment\AprioriTests\Result\");; // TODO: Initialize to an appropriate value AprioriAlgorithm target = new AprioriAlgorithm(_inDatabaseHelper, _outDatabaseHelper, 0.5f); // TODO: Initialize to an appropriate value int expected = 153; // expected 153 itemsets for mushroom.dat minSup 0.5 int actual; actual = target.GenerateFrequentItemSets(); if (_inDatabaseHelper.DatabaseName == "mushroom" && target.MinimumSupport == 0.5f) { expected = 153; // expected 153 itemsets for mushroom.dat minSup 0.5 } else { expected = actual; } Assert.AreEqual(expected, actual); }