-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.py
More file actions
39 lines (31 loc) · 849 Bytes
/
script.py
File metadata and controls
39 lines (31 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import os
import time
import cv2
from sklearn.model_selection import KFold
model = KFold(n_splits=5, shuffle=False)
import numpy as np
from sklearn.model_selection import KFold
# start = time.perf_counter()
# time.sleep(2)
# end = time.perf_counter()
#
# print(end-start)
for i in range(1, 11):
for j in range(1, 11):
kf = KFold(n_splits=2, shuffle=False)
for train, test in kf.split(X.shape[1]):
print(train, test)
print(f'de test: {X[train[0]]}, {X[train[1]]}')
cale = r'C:/Users/Sebi/Desktop/PatternRecogn/PatternRecogn/att_faces'
# # for i in range(1, 41):
# # for j in range(1, 11):
# # os.rename(f'{cale}/s{i}/{j}.pgm', f'{cale}/s{i}/p{i}_{j}.pgm')
# #
# nume = 'p5_1.pgm'
#
# start_index = nume.index('p')
# endindex = nume.index('_')
#
# substring = nume[start_index + 1:endindex]
#
# print(substring)