@@ -85,7 +85,7 @@ object SVMKernel {
8585 (i, j) => if (i >= j) kernelIndex((i,j)) else kernelIndex((j,i))
8686 }
8787
88- println(" Dimensions: " + kernel.rows + " x " + kernel.cols)
88+ // println(" Dimensions: " + kernel.rows + " x " + kernel.cols)
8989 new SVMKernelMatrix (kernel, length)
9090 }
9191
@@ -98,7 +98,7 @@ object SVMKernel {
9898 .map(s => ((s.head._2, s.last._2), eval(s.head._1, s.last._1)))
9999 .toMap
100100
101- println(" Dimensions: " + data1.length + " x " + data2.length)
101+ // println(" Dimensions: " + data1.length + " x " + data2.length)
102102 DenseMatrix .tabulate[Double ](data1.length, data2.length){
103103 (i, j) => kernelIndex((i,j))
104104 }
@@ -112,8 +112,8 @@ object SVMKernel {
112112 Map [String , DenseMatrix [Double ]] = {
113113
114114 val (rows, cols) = (data1.length, data1.length)
115- println(" Constructing Kernel/Grad Matrices" )
116- println(" Dimensions: " + rows + " x " + cols)
115+ // println("Constructing Kernel/Grad Matrices")
116+ // println(" Dimensions: " + rows + " x " + cols)
117117
118118 val keys = Seq (" kernel-matrix" ) ++ hyper_parameters
119119
@@ -125,8 +125,8 @@ object SVMKernel {
125125 else (k, ((s.head._2, s.last._2), evalGrad(k)(s.head._1, s.last._1))))
126126 }).groupBy(_._1).map(cl => {
127127
128- if (cl._1 == " kernel-matrix" ) println(" Constructing Kernel Matrix" )
129- else println(" Constructing Grad Matrix for: " + cl._1)
128+ // if (cl._1 == "kernel-matrix") // println("Constructing Kernel Matrix")
129+ // else // println("Constructing Grad Matrix for: "+cl._1)
130130
131131 val kernelIndex = cl._2.map(_._2).toMap
132132
@@ -152,8 +152,8 @@ object SVMKernel {
152152 Map [String , DenseMatrix [Double ]] = {
153153
154154 val (rows, cols) = (data1.length, data2.length)
155- println(" Constructing Kernel/Grad Matrices" )
156- println(" Dimensions: " + rows + " x " + cols)
155+ // println("Constructing Kernel/Grad Matrices")
156+ // println(" Dimensions: " + rows + " x " + cols)
157157
158158 val keys = Seq (" kernel-matrix" ) ++ hyper_parameters
159159
@@ -164,8 +164,8 @@ object SVMKernel {
164164 else (k, ((s.head._2, s.last._2), evalGrad(k)(s.head._1, s.last._1))))
165165 }).groupBy(_._1).map(cl => {
166166
167- if (cl._1 == " kernel-matrix" ) println(" Constructing Kernel Matrix" )
168- else println(" Constructing Grad Matrix for: " + cl._1)
167+ // if (cl._1 == "kernel-matrix") // println("Constructing Kernel Matrix")
168+ // else // println("Constructing Grad Matrix for: "+cl._1)
169169
170170 val kernelIndex = cl._2.map(_._2).toMap
171171
@@ -187,25 +187,25 @@ object SVMKernel {
187187
188188 val (rows, cols) = (length, length)
189189
190- println(" Constructing partitioned kernel matrix." )
191- println(" Dimension: " + rows + " x " + cols)
190+ // println("Constructing partitioned kernel matrix.")
191+ // println("Dimension: " + rows + " x " + cols)
192192
193193 val (num_R_blocks, num_C_blocks) = (
194194 math.ceil(rows.toDouble/ numElementsPerRowBlock).toLong,
195195 math.ceil(cols.toDouble/ numElementsPerColBlock).toLong)
196196
197- println(" Blocks: " + num_R_blocks + " x " + num_C_blocks)
197+ // println("Blocks: " + num_R_blocks + " x " + num_C_blocks)
198198 val partitionedData = data.grouped(numElementsPerRowBlock).zipWithIndex.toStream
199199
200- println(" ~~~~~~~~~~~~~~~~~~~~~~~" )
201- println(" Constructing Partitions" )
200+ // println("~~~~~~~~~~~~~~~~~~~~~~~")
201+ // println("Constructing Partitions")
202202 new PartitionedPSDMatrix (
203203 utils.combine(Seq (partitionedData, partitionedData))
204204 .filter(c => c.head._2 >= c.last._2)
205205 .toStream.map(c => {
206206
207207 val partitionIndex = (c.head._2.toLong, c.last._2.toLong)
208- println(" :- Partition: " + partitionIndex)
208+ // println(":- Partition: "+partitionIndex)
209209
210210 val matrix =
211211 if (partitionIndex._1 == partitionIndex._2)
@@ -226,22 +226,22 @@ object SVMKernel {
226226
227227 val (rows, cols) = (data1.length, data2.length)
228228
229- println(" Constructing cross partitioned kernel matrix." )
230- println(" Dimension: " + rows + " x " + cols)
229+ // println("Constructing cross partitioned kernel matrix.")
230+ // println("Dimension: " + rows + " x " + cols)
231231
232232 val (num_R_blocks, num_C_blocks) = (
233233 math.ceil(rows.toDouble/ numElementsPerRowBlock).toLong,
234234 math.ceil(cols.toDouble/ numElementsPerColBlock).toLong)
235235
236- println(" Blocks: " + num_R_blocks + " x " + num_C_blocks)
237- println(" ~~~~~~~~~~~~~~~~~~~~~~~" )
238- println(" Constructing Partitions" )
236+ // println("Blocks: " + num_R_blocks + " x " + num_C_blocks)
237+ // println("~~~~~~~~~~~~~~~~~~~~~~~")
238+ // println("Constructing Partitions")
239239 new PartitionedMatrix (utils.combine(Seq (
240240 data1.grouped(numElementsPerRowBlock).zipWithIndex.toStream,
241241 data2.grouped(numElementsPerColBlock).zipWithIndex.toStream)
242242 ).toStream.map(c => {
243243 val partitionIndex = (c.head._2.toLong, c.last._2.toLong)
244- println(" :- Partition: " + partitionIndex)
244+ // println(":- Partition: "+partitionIndex)
245245 val matrix = crossKernelMatrix(c.head._1, c.last._1, eval)
246246 (partitionIndex, matrix)
247247 }), rows, cols, num_R_blocks, num_C_blocks)
@@ -258,18 +258,18 @@ object SVMKernel {
258258
259259 val (rows, cols) = (length, length)
260260
261- println(" Constructing partitioned kernel matrix and its derivatives" )
262- println(" Dimension: " + rows + " x " + cols)
261+ // println("Constructing partitioned kernel matrix and its derivatives")
262+ // println("Dimension: " + rows + " x " + cols)
263263
264264 val (num_R_blocks, num_C_blocks) = (
265265 math.ceil(rows.toDouble/ numElementsPerRowBlock).toLong,
266266 math.ceil(cols.toDouble/ numElementsPerColBlock).toLong)
267267
268- println(" Blocks: " + num_R_blocks + " x " + num_C_blocks)
268+ // println("Blocks: " + num_R_blocks + " x " + num_C_blocks)
269269 val partitionedData = data.grouped(numElementsPerRowBlock).zipWithIndex.toStream
270270
271- println(" ~~~~~~~~~~~~~~~~~~~~~~~" )
272- println(" Constructing Partitions" )
271+ // println("~~~~~~~~~~~~~~~~~~~~~~~")
272+ // println("Constructing Partitions")
273273
274274
275275 // Build the result using flatMap - reduce
@@ -278,7 +278,7 @@ object SVMKernel {
278278 .toStream.flatMap(c => {
279279 val partitionIndex = (c.head._2.toLong, c.last._2.toLong)
280280 print(" \n " )
281- println(" :- Partition: " + partitionIndex)
281+ // println(":- Partition: "+partitionIndex)
282282
283283 if (partitionIndex._1 == partitionIndex._2) {
284284 SVMKernel .buildKernelGradMatrix(
0 commit comments