Пример #1
0
def main():
    data = TCGAData()
    gene_exp = data.get_gene_exp_matrix()
    labels = data.get_labels()
    
    gnb = GaussianNB()
    accuracy = kFoldCrossValid(gene_exp,labels,gnb)     
    print(accuracy)
Пример #2
0
def svmfn(featureSelectionMethod = 'none'):
    data = TCGAData()
    gene_exp = data.get_gene_exp_matrix()
    labels = data.get_labels()
    names = data.get_gene_names()
    clf = svm.SVC(gamma=0.001,C=100.) #these are the values in some random example, idk what C is
    accuracy = kFoldCrossValid(gene_exp,labels,clf,k=4,names=names,selection=featureSelectionMethod)     
    print(accuracy)