Skip to content

Commit

Permalink
Merge pull request #83 from SupervisedStylometry/culling
Browse files Browse the repository at this point in the history
forgot
  • Loading branch information
Jean-Baptiste-Camps authored Jan 7, 2025
2 parents 9fd16dd + 9568b6e commit f577af4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit f577af4

Please sign in to comment.