def init_W(self, mode='<STR_LIT>'):
if (self.status != '<STR_LIT>') and (self.status != '<STR_LIT:train>'):<EOL><INDENT>print("<STR_LIT>")<EOL>return self.W<EOL><DEDENT>self.status = '<STR_LIT>'<EOL>self.data_num = len(self.train_Y)<EOL>self.data_demension = len(self.train_X[<NUM_LIT:0>])<EOL>self.W = np.zeros(self.data_demension)<EOL>if self.u is None:<EOL><INDENT>self.u = np.array([(<NUM_LIT:1.0> / self.data_num)] * self.data_num)<EOL><DEDENT>return self.W<EOL>
Init the W
Simple way is init W all zeros