-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcancer.py
19 lines (17 loc) · 891 Bytes
/
cancer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
# coding: utf-8
import boosting, read, classifiers, wrapperDS, errorTest, printOn, shuffle
def preprocess(percentage, basicNN = False):
printOn.blockPrint()
if basicNN == True:
test, unlabel, label, true, x, y, x_true, y_true,x_test,y_test = read.read(file='data.csv', drop=['id'], retNum=1, chopNum=0,
unlabel_percentage=percentage, ytrain=True)
else:
test, unlabel, label, true, x, y, x_true, y_true = read.read(file='data.csv', drop=['id'], retNum=1, chopNum=0,
unlabel_percentage=percentage)
clfs = classifiers.ensemble(x,y)
printOn.enablePrint()
if basicNN == True:
return unlabel, clfs, true, x,y, test, y_test, x_test
else:
return unlabel, clfs, true, x, y, test