Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply suggestions from Elior (See Eliorkalfon/single_cell_pb#11) #65

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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