diff --git a/src/learning/transformers.py b/src/learning/transformers.py index c9a2709..06124c1 100644 --- a/src/learning/transformers.py +++ b/src/learning/transformers.py @@ -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()) diff --git a/src/util/parser_options.py b/src/util/parser_options.py index fb5b4c0..730026f 100644 --- a/src/util/parser_options.py +++ b/src/util/parser_options.py @@ -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) # ------------------------------------------------------------------------------------