-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimage.py
18 lines (18 loc) · 1 KB
/
image.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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='segmentation.data', drop=None, retNum=1,
chopNum=1,
unlabel_percentage=percentage, multiclass=True, ytrain=True)
else:
test, unlabel, label, true, x, y, x_true, y_true = read.read(file='segmentation.data', drop=None, retNum=1, chopNum=1,
unlabel_percentage=percentage, multiclass=True)
clfs = classifiers.ensemble(x,y)
printOn.enablePrint()
for point in test:
point.insert(0, point.pop())
if basicNN == True:
return unlabel, clfs, true, x,y, test, y_test, x_test
else:
return unlabel, clfs, true, x, y, test