@@ -85,26 +85,21 @@ object CooccurrenceDriver extends App {
85
85
existingRowIDs = userDictionary)
86
86
userDictionary.putAll(action.rowIDs)
87
87
actions = actions :+ (actionDescription._1, action) // put the name in the tuple with the indexedDataset
88
- println("\n\n\nRead in action " + actionDescription._1 +", which has " + action.matrix.nrow.toString + " rows")
89
- println("actions has " + actions.length + " elements in it.\n\n\n")
90
88
}
91
89
92
90
// After all actions are read in the userDictonary will contain every user seen, even if they may not have
93
91
// taken all actions . Now we adjust the row rank of all IndxedDataset's to have this number of rows
94
92
// Note: this is very important or the cooccurrence calc may fail
95
93
val numUsers = userDictionary.size() // one more than the cardinality
96
- println("\n\nTotal number of users for all actions = " + numUsers + "\n\n" )
94
+ println("Total number of users for all actions = " + numUsers)
97
95
val resizedNameActionPairs = actions.map { a =>
98
96
println(a._1 + " indicator matrix:")
99
- println("Number of rows for matrix = " + a._2.matrix.nrow )
100
- println("Number of columns for matrix = " + a._2.matrix.ncol )
97
+ println(" Number of rows for matrix = " + a._2.matrix.nrow )
98
+ println(" Number of columns for matrix = " + a._2.matrix.ncol )
101
99
val resizedMatrix = a._2.create(a._2.matrix, userDictionary, a._2.columnIDs).newRowCardinality(numUsers)
102
- println(a._1 + " indicator matrix:")
103
- println("Number of rows after resize = " + resizedMatrix.matrix.nrow )
104
- println("Number of columns after resize = " + resizedMatrix.matrix.ncol )
100
+ println(" Number of rows after resize = " + resizedMatrix.matrix.nrow )
105
101
(a._1, resizedMatrix)
106
102
}
107
- println("\n\n")
108
103
resizedNameActionPairs
109
104
}
110
105
0 commit comments