Skip to content

Commit

Permalink
fix a bug for one-dimensional input
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhao062 authored and yzhao062 committed Apr 11, 2022
1 parent ce50b69 commit f67f3ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions suod/models/base.py
Expand Up @@ -251,6 +251,10 @@ def fit(self, X):
else: # float
self.target_dim_frac_ = int(self.target_dim_frac * n_features)

# it should have at least 1 dimension
if self.target_dim_frac_ < 1:
self.target_dim_frac_ = 1

# build flags for random projection
self.rp_flags_, _ = build_codes(self.base_estimators, self.rp_clf_list,
self.rp_ng_clf_list,
Expand Down

0 comments on commit f67f3ad

Please sign in to comment.