Skip to content

Commit

Permalink
apply suggestions from Elior (See Eliorkalfon/single_cell_pb#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood committed Jun 4, 2024
1 parent ca5de78 commit f3d9685
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/task/methods/transformer_ensemble/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,21 @@
"uncommon": False,
"sampling_strategy": "random",
"weight": 0.5,
"validation_percentage": 0.1,
},
# Note by author - weight_df2: 0.25 (excluding uncommon elements, resulting in 0.559)
{
"mean_std": "mean_std",
"uncommon": True,
"sampling_strategy": "random",
"weight": 0.25,
"validation_percentage": 0.1,

},
# Note by author - weight_df3: 0.25 (leveraging clustering sampling, achieving 0.575)
{
"mean_std": "mean_std",
"uncommon": False, # should this be set to False or True?
"uncommon": False,
"sampling_strategy": "k-means",
"weight": 0.25,
},
Expand All @@ -76,6 +79,7 @@
"uncommon": False,
"sampling_strategy": "random",
"weight": 0.3,
"validation_percentage": 0.1,
}
]

Expand Down Expand Up @@ -113,8 +117,8 @@
num_epochs=par["num_train_epochs"],
early_stopping=par["early_stopping"],
batch_size=par["batch_size"],
device=device,
mean_std=argset["mean_std"],
device=device,
)
elif argset["sampling_strategy"] == "random":
label_reducer, scaler, transformer_model = train_non_k_means_strategy(
Expand All @@ -125,8 +129,9 @@
num_epochs=par["num_train_epochs"],
early_stopping=par["early_stopping"],
batch_size=par["batch_size"],
device=device,
mean_std=argset["mean_std"],
validation_percentage=argset["validation_percentage"],
device=device,
)
else:
raise ValueError("Invalid sampling_strategy argument")
Expand Down

0 comments on commit f3d9685

Please sign in to comment.