[mlpack] 12/58: Some brackets and stuff like that.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Tue Sep 9 13:19:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit 325e9ca1ee086cadb9c8d5649d56fe4e9caee870
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Sun Aug 17 19:52:49 2014 +0000

    Some brackets and stuff like that.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@17058 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/methods/kernel_pca/kernel_pca_main.cpp | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/mlpack/methods/kernel_pca/kernel_pca_main.cpp b/src/mlpack/methods/kernel_pca/kernel_pca_main.cpp
index 6bc1ccb..c0e963d 100644
--- a/src/mlpack/methods/kernel_pca/kernel_pca_main.cpp
+++ b/src/mlpack/methods/kernel_pca/kernel_pca_main.cpp
@@ -106,23 +106,24 @@ void RunKPCA(arma::mat& dataset,
              const string& sampling,
              KernelType& kernel)
 {
-  if (nystroem) {
+  if (nystroem)
+  {
     // Make sure the sampling scheme is valid.
     if (sampling == "kmeans")
     {
-      KernelPCA<KernelType, NystroemKernelRule<KernelType, 
+      KernelPCA<KernelType, NystroemKernelRule<KernelType,
           KMeansSelection<> > >kpca;
       kpca.Apply(dataset, newDim);
     }
     else if (sampling == "random")
     {
-      KernelPCA<KernelType, NystroemKernelRule<KernelType, 
+      KernelPCA<KernelType, NystroemKernelRule<KernelType,
           RandomSelection> > kpca;
       kpca.Apply(dataset, newDim);
     }
     else if (sampling == "ordered")
     {
-      KernelPCA<KernelType, NystroemKernelRule<KernelType, 
+      KernelPCA<KernelType, NystroemKernelRule<KernelType,
           OrderedSelection> > kpca;
       kpca.Apply(dataset, newDim);
     }
@@ -133,9 +134,10 @@ void RunKPCA(arma::mat& dataset,
         << "choices are 'kmeans', 'random' and 'ordered'" << endl;
     }
   }
-  else {
+  else
+  {
     KernelPCA<KernelType> kpca(kernel, centerTransformedData);
-    kpca.Apply(dataset, newDim);    
+    kpca.Apply(dataset, newDim);
   }
 }
 
@@ -173,7 +175,7 @@ int main(int argc, char** argv)
   if (kernelType == "linear")
   {
     LinearKernel kernel;
-    RunKPCA<LinearKernel>(dataset, centerTransformedData, nystroem, newDim, 
+    RunKPCA<LinearKernel>(dataset, centerTransformedData, nystroem, newDim,
         sampling, kernel);
   }
   else if (kernelType == "gaussian")

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list