first look at the problem

This commit is contained in:
Alejandro Moreo Fernandez 2024-03-18 10:21:15 +01:00
parent 289c474ea5
commit 3d22270a4d
1 changed files with 3 additions and 2 deletions

View File

@ -86,6 +86,7 @@ q = CC(cls)
Atr, Xtr, ytr = load_csv(survey_y, use_yhat=True)
preprocessor = Preprocessor()
Xtr = preprocessor.fit_transform(Xtr)
# Xtr_proc = preprocessor.fit_transform(Xtr)
# big_train = LabelledCollection(Xtr_proc, ytr)
# q.fit(big_train)
@ -99,14 +100,14 @@ n_area = len(trains)
results = np.zeros(shape=(n_area, n_area))
for i, (Ai, Xi, yi) in tqdm(enumerate(trains), total=n_area):
Xi = preprocessor.fit_transform(Xi)
# Xi = preprocessor.fit_transform(Xi)
tr = LabelledCollection(Xi, yi)
q.fit(tr)
len_tr = len(tr)
# len_tr = len(big_train)
for j, (Aj, Xj, yj) in enumerate(trains):
if i==j: continue
Xj = preprocessor.transform(Xj)
# Xj = preprocessor.transform(Xj)
te = LabelledCollection(Xj, yj)
pred_prev = q.quantify(te.X)
true_prev = te.prevalence()