Beispiel #1
0
 def apply_updates(self, updates, gamma, C):
     WARPDecomposition.apply_updates(self, updates, gamma, C)
     self.apply_matrix_update(self.W, updates.dW, gamma, C)
Beispiel #2
0
 def apply_updates(self,updates,gamma,C):
     WARPDecomposition.apply_updates(self,updates,gamma,C)
     self.apply_matrix_update(self.W,updates.dW,gamma,C)
Beispiel #3
0
 def __init__(self, num_rows, num_cols, X, d):
     WARPDecomposition.__init__(self, num_rows, num_cols, d)
     # W holds latent factors for each item feature
     self.W = d**-0.5 * np.random.random_sample((X.shape[1], d))
     self.X = X
     self.is_sparse = isinstance(X, scipy.sparse.csr_matrix)
Beispiel #4
0
 def __init__(self,num_rows,num_cols,X,d):
     WARPDecomposition.__init__(self,num_rows,num_cols,d)
     # W holds latent factors for each item feature
     self.W = d**-0.5*np.random.random_sample((X.shape[1],d))
     self.X = X
     self.is_sparse = isinstance(X,scipy.sparse.csr_matrix)