Correlation: Fix formating problems with documentation
diff --git a/doc/mainpage.dox.in b/doc/mainpage.dox.in
index b7aadcb..71d11f5 100644
--- a/doc/mainpage.dox.in
+++ b/doc/mainpage.dox.in
@@ -1,4 +1,4 @@
-/**  
+/**
 @mainpage
 MADlib is an open-source library for scalable in-database analytics. It provides data-parallel implementations of mathematical, statistical and machine learning methods for structured and unstructured data.
 
@@ -94,6 +94,9 @@
     @defgroup grp_summary Summary
     @ingroup grp_desc_stats
 
+    @defgroup grp_correlation Pearson's correlation
+    @ingroup grp_desc_stats
+
     @defgroup grp_quantile Quantile
     @ingroup grp_desc_stats
 
@@ -121,7 +124,7 @@
 
     @defgroup grp_sample Random Sampling
     @ingroup grp_support
-    
+
     @defgroup grp_compatibility Compatibility
     @ingroup grp_support
 
diff --git a/src/ports/postgres/modules/stats/correlation.sql_in b/src/ports/postgres/modules/stats/correlation.sql_in
index 18268b5..a2926b6 100644
--- a/src/ports/postgres/modules/stats/correlation.sql_in
+++ b/src/ports/postgres/modules/stats/correlation.sql_in
@@ -16,19 +16,25 @@
 /**
 @addtogroup grp_correlation
 
-@about A correlation function is the degree and direction of association of two
-variables; how well can one random variable be predicted from the other. The
-coefficient of correlation varies from -1 to 1: 1 implies perfect correlation,
-0 means no correlation, and -1 means perfectly anti-correlated.
 
-This function provides a correlation matrix for all the numeric columns in a
-<em>source_table</em>. A Correlation matrix describes correlation among \f$ M \f$ variables.
-It is a square symmetrical \f$ MxM \f$ matrix with the \f$ (ij) \f$th element equal to the
-correlation coefficient between the (\f$i\f$)th and the (\f$j\f$)th variable. The diagonal elements (correlations of variables with themselves) are always equal to 1.0.
+@about
+
+A correlation function is the degree and direction of association of two
+variables; how well can one random variable be predicted from the other. The
+coefficient of correlation varies from -1 to 1. Coefficient of 1 implies perfect
+correlation, 0 means no correlation, and -1 means perfect anti-correlation.
+
+This function provides a cross-correlation matrix for all pairs of numeric
+columns in a <em>source_table</em>. A Correlation matrix describes correlation
+among \f$ M \f$ variables. It is a square symmetrical \f$ M \f$x \f$M \f$ matrix
+with the \f$ (ij) \f$th element equal to the correlation coefficient between the
+\f$i\f$th and the \f$j\f$th variable. The diagonal elements (correlations of
+variables with themselves) are always equal to 1.0.
 
 @usage
+
 Currently the correlation function can be used in the following way:
------------------------------------------------------------------------
+@verbatim
 SELECT {schema_madlib}.correlation
 (
     source_table        TEXT,       -- Source table name (Required)
@@ -36,22 +42,25 @@
     target_cols         TEXT,       -- Comma separated columns for which summary is desired
                                         --   (Default: NULL - produces result for all columns)
 )
------------------------------------------------------------------------
+@endverbatim
 
-Output will be a table with N+2 columns and N rows, where N is the number of target
-columns. The first column of the table provides the row-header for each variable,
-and the second column provides the position of the variable in the
-`source_table'. The rest of the table is the NxN correlation matrix for all
-numeric columns in `source_table'.
+Output will be a table with N+2 columns and N rows, where N is the number of
+target columns.
 
-The output table is arranged as a lower-traingular matrix
-with the upper triangle set to NULL and the diagonal elements set to 1.0.
-To obtain the result from the output_table in this matrix format ensure to
-order the elements select the elements
+- column_position: The first column provides position of the variable in
+                            the '<em>source_table</em>'
+- variable:         The second column gives the row-header for each
+                            variable
+The rest of the table is the NxN correlation matrix for all pairs of
+numeric columns in `<em>source_table</em>'.
 
-The output can be obtained as
+The output table is arranged as a lower-traingular matrix with the upper
+triangle set to NULL and the diagonal elements set to 1.0. To obtain the result
+from the '<em>output_table</em>' in this matrix format ensure to order the
+elements using the '<em>column_position</em>', as given in the example below.
+
 @verbatim
-sql> SELECT * FROM 'output_table' order by 'column_position';
+sql> SELECT * FROM output_table order by column_position;
 @endverbatim
 
 @examp