Starting point code for MDR implementation
Starting point code for MDR implementation

Assumption(s): Labels are only binary

Implemented:

fit(self, features, classes): simply build a dictionary that maps each
instance of the feature vector to a tuple. The tuple keeps count of how
many times a particular label value appears with that instance of
feature vector. Key: tuple of feature values - Value: tuple of label
frequency/label counts

transform(self, features): After the dictionary is completed, combine
each instance of feature vector above into one corresponding label that
has the frequency ratio greater than its standard default ratio.

score(self, features, classes): Compare the new combined feature vector
with its corresponding class labels, and count the times the two match.
Output the average accuracy by averaging the match count over the
length of the new feature vector / classes vector.

Implementation is tested in main() by training MDR on the training set
and getting accuracy_score on the test set.

EpistasisLab/scikit-mdr,EpistasisLab/scikit-mdr