Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
guoguibing committed Jun 27, 2014
1 parent 27bacdd commit b0db377
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions librec/src/main/java/librec/intf/Recommender.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ public Recommender(SparseMatrix trainMatrix, SparseMatrix testMatrix, int fold)
// fold info
foldInfo = fold > 0 ? " fold [" + fold + "]" : "";

// compute item-item correlations
if (isRankingPred && isDiverseUsed)
corrs = new SymmMatrix(numItems);

// static initialization, only done once
if (scales == null) {
initMean = 0.0;
Expand Down Expand Up @@ -169,6 +165,10 @@ public Recommender(SparseMatrix trainMatrix, SparseMatrix testMatrix, int fold)
int seed = cf.getInt("num.rand.seed");
Randoms.seed(seed <= 0 ? System.currentTimeMillis() : seed);
}

// compute item-item correlations
if (isRankingPred && isDiverseUsed)
corrs = new SymmMatrix(numItems);
}

public void run() {
Expand Down

0 comments on commit b0db377

Please sign in to comment.