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

forgot #83

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions load_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@
feat_file = "feature_list_{}{}grams{}mf.json".format(args.t, args.n, args.k)
corpus_file = "feats_tests_n{}_k_{}.csv".format(args.n, args.k)

if not args.f:
with open(feat_file, "w") as out:
out.write(json.dumps(my_feats, ensure_ascii=False, indent=0))
print("Features list saved to " + feat_file)
#if not args.f and :
with open(feat_file, "w") as out:
out.write(json.dumps(my_feats, ensure_ascii=False, indent=0))
print("Features list saved to " + feat_file)

corpus.to_csv(corpus_file)
print("Corpus saved to " + corpus_file)
Expand Down
2 changes: 1 addition & 1 deletion train_svm.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"If group_k-fold is chosen, each source file will be considered a group "
"(only relevant if sampling was performed and more than one file per class was provided)",
default=None, choices=['leave-one-out', 'k-fold', 'group-k-fold'], type=str)
parser.add_argument('--k', action='store', help="k for k-fold", default=10, type=int)
parser.add_argument('--k', action='store', help="k for k-fold (default: 10 folds for k-fold; k=n groups for group-k-fold)", default=0, type=int)
parser.add_argument('--dim_reduc', action='store', choices=['pca'], help="optional dimensionality "
"reduction of input data", default=None)
parser.add_argument('--norms', action='store_true', help="perform normalisations? (default: True)",
Expand Down
Loading