From 0d775acbe6c274a7ff373c8d9a1c8a7db5e2f14b Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 16 May 2010 19:11:48 +0000 Subject: [PATCH] Added some comments --HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403635 --- examples/linear_manifold_regularizer_ex.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/linear_manifold_regularizer_ex.cpp b/examples/linear_manifold_regularizer_ex.cpp index 6379f0aae..4c4682241 100755 --- a/examples/linear_manifold_regularizer_ex.cpp +++ b/examples/linear_manifold_regularizer_ex.cpp @@ -193,6 +193,9 @@ void test_manifold_regularization ( // Now create the manifold regularizer. The result is a transformation matrix that // embodies the manifold assumption discussed above. linear_manifold_regularizer lmr; + // use_gaussian_weights is a function object that tells lmr how to weight each edge. In this + // case we let the weight decay as edges get longer. So shorter edges are more important than + // longer edges. lmr.build(samples, edges, use_gaussian_weights(0.1)); const matrix T = lmr.get_transformation_matrix(intrinsic_regularization_strength); @@ -203,7 +206,7 @@ void test_manifold_regularization ( // For convenience, generate a projection_function and merge the transformation - // matrix T into it. So proj(x) == T*ekm.project(x). + // matrix T into it. That is, we will have: proj(x) == T*ekm.project(x). projection_function proj = ekm.get_projection_function(); proj.weights = T*proj.weights;