Skip to content

Commit

Permalink
Merge branch 'master' into Hossein/FastHierVisitor
Browse files Browse the repository at this point in the history
  • Loading branch information
hosseinmoein committed Oct 28, 2024
2 parents 2945f83 + 31a1105 commit 6e87352
Show file tree
Hide file tree
Showing 9 changed files with 335 additions and 110 deletions.
12 changes: 11 additions & 1 deletion docs/HTML/BetaVisitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,17 @@
</td>
<td>
This functor class calculates the beta (i.e. exposure) of the given first column to the given second column (benchmark).<BR>
<I>explicit BetaVisitor (bool bias = true);</I><BR>
<I>
<PRE>
explicit
BetaVisitor(bool bias = false,
bool skipnan = false,
bool stable_algo = false);
</PRE>
</I>
<B>bias</B>: If true it divides by n - 1, otherwise by n.<BR>
<B>skip_nan</B>: If true it skips over nan numbers as if they didn't exist.<BR>
<B>stable_algo</B>: If true, it uses a version of Kahan summation that is numerically stable for data with very large values. Kahan summation is slower than regular summation, so only use it, if your data contains very large values.<BR>
</td>
<td width="18%">
<B>T</B>: Column data type<BR>
Expand Down
11 changes: 9 additions & 2 deletions docs/HTML/CorrVisitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,17 @@
This functor class calculates the correlation of two given columns.<BR>
<I>
<PRE>
explicit CorrVisitor(correlation_type t = correlation_type::pearson,
bool bias = true);
explicit
CorrVisitor(correlation_type t = correlation_type::pearson,
bool bias = false,
bool skipnan = false,
bool stable_algo = false);
</PRE>
</I>
<B>correlation_type</B>: Correlation type from above.<BR>
<B>bias</B>: If true it divides by n - 1, otherwise by n.<BR>
<B>skip_nan</B>: If true it skips over nan numbers as if they didn't exist.<BR>
<B>stable_algo</B>: If true, it uses a version of Kahan summation that is numerically stable for data with very large values. Kahan summation is slower than regular summation, so only use it, if your data contains very large values.<BR>
</td>
<td>
<B>T</B>: Column data type. T must be an arithmetic-enabled type<BR>
Expand Down
8 changes: 7 additions & 1 deletion docs/HTML/CovVisitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,15 @@
This functor class calculates the covariance of two given columns. In addition, it provides the variances of both columns.<BR>
<I>
<PRE>
explicit CovVisitor(bool bias = true, bool skipnan = true);
explicit
CovVisitor(bool bias = false,
bool skipnan = false,
bool stable_algo = false);
</PRE>
</I>
<B>bias</B>: If true it divides by n - 1, otherwise by n.<BR>
<B>skip_nan</B>: If true it skips over nan numbers as if they didn't exist.<BR>
<B>stable_algo</B>: If true, it uses a version of Kahan summation that is numerically stable for data with very large values. Kahan summation is slower than regular summation, so only use it, if your data contains very large values.<BR>
</td>
<td width="30%">
<B>T</B>: Column data type. T must be an arithmetic-enabled type<BR>
Expand Down
4 changes: 4 additions & 0 deletions docs/HTML/DataFrame.html
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,10 @@ <H2 ID="2"><font color="blue">API Reference with code samples <font size="+4">&#
<td title="Calculates Student t-test">struct <a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/TTestVisitor.html">TTestVisitor</a>{}</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Calculates variance">struct <a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/VarVisitor.html">VarVisitor</a>{}</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Calculates z-score">struct <a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/ZScoreVisitor.html">ZScoreVisitor</a>{}</td>
</tr>
Expand Down
8 changes: 7 additions & 1 deletion docs/HTML/StdVisitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,15 @@
This functor class calculates the standard deviation of a given column.<BR>
<I>
<PRE>
explicit StdVisitor (bool bias = true);
explicit
StdVisitor(bool bias = false,
bool skipnan = false,
bool stable_algo = false);
</PRE>
</I>
<B>bias</B>: If true it divides by n - 1, otherwise by n.<BR>
<B>skip_nan</B>: If true it skips over nan numbers as if they didn't exist.<BR>
<B>stable_algo</B>: If true, it uses a version of Kahan summation that is numerically stable for data with very large values. Kahan summation is slower than regular summation, so only use it, if your data contains very large values.<BR>
</td>
<td width="30%">
<B>T</B>: Column data type.<BR>
Expand Down
86 changes: 86 additions & 0 deletions docs/HTML/VarVisitor.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<!--
Copyright (c) 2019-2026, Hossein Moein
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Hossein Moein and/or the DataFrame nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL Hossein Moein BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!DOCTYPE html>
<html>

<head>
<style>
body {
background-image: linear-gradient(Azure, AliceBlue, GhostWhite, WhiteSmoke);
}
</style>
</head>

<body style="font-family: Georgia, serif">
<font size="+3">&#8592;</font> <a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/DataFrame.html">Back to Documentations</a><BR><BR>

<table border="1">

<tr bgcolor="lightblue">
<th>Signature</th> <th>Description</th> <th>Parameters</th>
</tr>
<tr bgcolor="Azure">
<td bgcolor="blue"> <font color="white">
<PRE><B>#include &lt;DataFrame/DataFrameStatsVisitors.h&gt;

template&lt;typename T, typename I = unsigned long&gt;
struct VarVisitor;
</B></PRE></font>
</td>
<td>
This functor class calculates the variance of a given column.<BR>
<I>
<PRE>
explicit
VarVisitor(bool bias = false,
bool skipnan = false,
bool stable_algo = false);
</PRE>
</I>
<B>bias</B>: If true it divides by n - 1, otherwise by n.<BR>
<B>skip_nan</B>: If true it skips over nan numbers as if they didn't exist.<BR>
<B>stable_algo</B>: If true, it uses a version of Kahan summation that is numerically stable for data with very large values. Kahan summation is slower than regular summation, so only use it, if your data contains very large values.<BR>
</td>
<td width="30%">
<B>T</B>: Column data type.<BR>
<B>I</B>: Index type.
</td>
</tr>

</table>

<BR><img src="https://github.com/hosseinmoein/DataFrame/blob/master/docs/LionLookingUp.jpg?raw=true" alt="C++ DataFrame"
width="200" height="200" style="float:right"/>

</body>
</html>

<!--
Local Variables:
mode:HTML
tab-width:4
c-basic-offset:4
End:
-->
Loading

0 comments on commit 6e87352

Please sign in to comment.