diff --git a/buffalo/algo/als.py b/buffalo/algo/als.py index 09d8246..996d45f 100644 --- a/buffalo/algo/als.py +++ b/buffalo/algo/als.py @@ -74,12 +74,12 @@ def normalize(self, group='item'): self.opt._nrz_P = True def initialize(self): - self.vdim = self.obj.get_vdim() if self.opt.accelerator else self.opt.d super().initialize() self.init_factors() def init_factors(self): assert self.data, 'Data is not setted' + self.vdim = self.obj.get_vdim() if self.opt.accelerator else self.opt.d header = self.data.get_header() for name, rows in [('P', header['num_users']), ('Q', header['num_items'])]: setattr(self, name, None)