8000 small edit in SDCT options · convexsetgithub/loco-lib@509bc8e · GitHub
[go: up one dir, main page]

Skip to content

Commit 509bc8e

Browse files
small edit in SDCT options
1 parent 0715447 commit 509bc8e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

LOCO/src/main/scala/driver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ object driver {
8484
val center = options.getOrElse("center", "true").toBoolean
8585
// center features only
8686
val centerFeaturesOnly = options.getOrElse("centerFeaturesOnly", "false").toBoolean
87-
// specify projection (sparse or SRHT)
87+
// specify projection (sparse or SDCT)
8888
val projection = options.getOrElse("projection", "sparse")
8989
// specify projection dimension
9090
val nFeatsProj = options.getOrElse("nFeatsProj", "260").toInt

LOCO/src/main/scala/utils/projectionUtils.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ object ProjectionUtils {
5656
// compute random projections and return resulting RDD
5757
localMats.mapValues{case(colIndices, rawFeats) =>
5858
val RP = projection match{
59-
case "SRHT" => SRHT(rawFeats, nFeatsProj, seed)
59+
case "SDCT" => SDCT(rawFeats, nFeatsProj, seed)
6060
case "sparse" => rawFeats * sparseProjMat(rawFeats.cols, nFeatsProj, seed)
6161
case _ => throw new IllegalArgumentException("Invalid argument for Proj : " + projection)
6262
}
@@ -269,7 +269,7 @@ object ProjectionUtils {
269269
}
270270

271271
/**
272-
* Computes the SRHT of input matrix.
272+
* Computes the subsampled randomized DCT of input matrix.
273273
*
274274
* @param dataMat Input matrix
275275
* @param nProjDim Projection dimension
@@ -278,7 +278,7 @@ object ProjectionUtils {
278278
*
279279
* @return Projected input matrix
280280
*/
281-
def SRHT(
281+
def SDCT(
282282
dataMat : DenseMatrix[Double],
283283
nProjDim : Int,
284284
seed : Int,
@@ -292,7 +292,7 @@ object ProjectionUtils {
292292
// dimension to be compressed
293293
val dim = if(cols) p else n
294294

295-
// compute SRHT constant
295+
// compute scaling factor
296296
val srhtConst = math.sqrt(dim / nProjDim.toDouble)
297297

298298
// sample from Rademacher distribution and compute diagonal

0 commit comments

Comments
 (0)
0