@@ -56,7 +56,7 @@ object ProjectionUtils {
56
56
// compute random projections and return resulting RDD
57
57
localMats.mapValues{case (colIndices, rawFeats) =>
58
58
val RP = projection match {
59
- case " SRHT " => SRHT (rawFeats, nFeatsProj, seed)
59
+ case " SDCT " => SDCT (rawFeats, nFeatsProj, seed)
60
60
case " sparse" => rawFeats * sparseProjMat(rawFeats.cols, nFeatsProj, seed)
61
61
case _ => throw new IllegalArgumentException (" Invalid argument for Proj : " + projection)
62
62
}
@@ -269,7 +269,7 @@ object ProjectionUtils {
269
269
}
270
270
271
271
/**
272
- * Computes the SRHT of input matrix.
272
+ * Computes the subsampled randomized DCT of input matrix.
273
273
*
274
274
* @param dataMat Input matrix
275
275
* @param nProjDim Projection dimension
@@ -278,7 +278,7 @@ object ProjectionUtils {
278
278
*
279
279
* @return Projected input matrix
280
280
*/
281
- def SRHT (
281
+ def SDCT (
282
282
dataMat : DenseMatrix [Double ],
283
283
nProjDim : Int ,
284
284
seed : Int ,
@@ -292,7 +292,7 @@ object ProjectionUtils {
292
292
// dimension to be compressed
293
293
val dim = if (cols) p else n
294
294
295
- // compute SRHT constant
295
+ // compute scaling factor
296
296
val srhtConst = math.sqrt(dim / nProjDim.toDouble)
297
297
298
298
// sample from Rademacher distribution and compute diagonal
0 commit comments