fixed transform_mean() when dealing with only one VG;
modified default settings (new default: aggregation: mean, all_prob:True)
This commit is contained in:
parent
20dca61e22
commit
8af763b130
|
|
@ -490,6 +490,8 @@ class DocEmbedderList:
|
|||
|
||||
def transform_mean(self, lX, tfidf):
|
||||
if len(self.embedders) == 1:
|
||||
if self.embedders[0].requires_tfidf:
|
||||
lX = tfidf
|
||||
return self.embedders[0].transform(lX)
|
||||
|
||||
langs = sorted(lX.keys())
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ parser.add_option("--l2", dest="l2", action='store_true',
|
|||
parser.add_option("--allprob", dest="allprob", action='store_true',
|
||||
help="All views are generated as posterior probabilities. This affects the supervised and pretrained"
|
||||
"embeddings, for which a calibrated classifier is generated, which generates the posteriors",
|
||||
default=False)
|
||||
default=True)
|
||||
|
||||
parser.add_option("--feat-weight", dest="feat_weight",
|
||||
help="Term weighting function to weight the averaged embeddings", type=str, default='tfidf')
|
||||
|
|
@ -58,7 +58,7 @@ parser.add_option("-z", "--zscore", dest="zscore", action='store_true',
|
|||
|
||||
parser.add_option("-a", "--agg", dest="agg", action='store_true',
|
||||
help="Set aggregation function of the common Z-space to average (Default: concatenation)",
|
||||
default=False)
|
||||
default=True)
|
||||
|
||||
# ------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue