Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further development for after release #327

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 77 additions & 69 deletions docs/HTML/AffinityPropVisitor.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions docs/HTML/DataFrame.html
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,18 @@ <H2 ID="2"><font color="blue">API Reference with code samples <font size="+4">&#
<td title="Gets data or view between specified times"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/get_data_between_times.html">get_data_between_times()<BR>get_view_between_times()</a></td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Gets data or views by applying Affinity Propagation algorithm"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/get_data_by_affin.html">get_data_by_affin()<BR>get_view_by_affin()</a></td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Gets data or view by index"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/get_data_by_idx.html">get_data_by_idx( 2 )<BR>get_view_by_idx( 2 )</a></td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Gets data or views by applying k-means clustering algorithm"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/get_data_by_kmeans.html">get_data_by_kmeans()<BR>get_view_by_kmeans()</a></td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Gets data or view by applying Glob-like (SQL like clause) pattern matching"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/get_data_by_like.html">get_data_by_like( 2 )<BR>get_view_by_like( 2 )</a></td>
</tr>
Expand Down Expand Up @@ -506,6 +514,10 @@ <H2 ID="2"><font color="blue">API Reference with code samples <font size="+4">&#
<td title="Removes column data by index"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/remove_data_by_idx.html">remove_data_by_idx</a>()</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Removes column data by using a Hampel filter"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/remove_data_by_hampel.html">remove_data_by_hampel</a>()</td>
</tr>

<tr class="item" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td title="Removes column data by applying Glob-like (SQL like clause) pattern matching"><a href="https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/remove_data_by_like.html">remove_data_by_like</a>( 2 )</td>
</tr>
Expand Down
33 changes: 17 additions & 16 deletions docs/HTML/ExponentiallyWeightedMeanVisitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
<td bgcolor="blue"> <font color="white">
<PRE><B>
enum class exponential_decay_spec : unsigned char {
center_of_gravity = 1, // Decay = 1 / (1 + value) For value >= 0
span = 2, // Decay = 2 / (1 + value) For value >= 1
halflife = 3, // Decay = 1 - e<sup>log(0.5)/value</sup> For value > 0
fixed = 4, // Decay = value For 0 < value <= 1
center_of_gravity = 1, // Decay = 1 / (1 + &alpha;) For &alpha; >= 0
span = 2, // Decay = 2 / (1 + &alpha;) For &alpha; >= 1
halflife = 3, // Decay = 1 - e<sup>log(0.5)/&alpha; </sup> For &alpha; > 0
fixed = 4, // Decay = &alpha; For 0 < &alpha; <= 1
};</B></PRE></font>
</td>
<td>
This spec determines how an exponentially moving stat decays. Based on this spec, the value parameter is converted to decay.
This spec determines how an exponentially moving stat decays. Based on this spec, the value (&alpha;) parameter is converted to decay.
</td>
</tr>

Expand Down Expand Up @@ -91,17 +91,18 @@
</PRE></I>
Formula if finite_adjust is true:<BR>
<I><PRE>
X<SUB>t</SUB> + (1 - decay) * X<SUB>t-1</SUB> + (1 - decay)<SUP>2</SUP> * X<SUB>t-2</SUB> + ... + (1 - decay)<SUP>t</SUP> * X<SUB>0</SUB>
Y<SUB>t</SUB> = ------------------------------------------------------------------------
1 + (1 - decay) + (1 - decay)<SUP>2</SUP> + ... + (1 - decay)<SUP>t</SUP>
X<SUB>t</SUB>+(1-decay)*X<SUB>t-1</SUB>+(1-decay)<SUP>2</SUP>*X<SUB>t-2</SUB>+ ... +(1-decay)<SUP>t</SUP>*X<SUB>0</SUB>
Y<SUB>t</SUB> = ------------------------------------------------------
1+(1-decay)+(1-decay)<SUP>2</SUP>+ ... +(1-decay)<SUP>t</SUP>
</PRE></I>
Constructor:<BR>
<I>
<PRE>
ExponentiallyWeightedMeanVisitor(
exponential_decay_spec eds, // See exponential_decay_spec type
double value, // Value to be decayed
bool finite_adjust = false); // Adjust for the fact that this is not an infinite data set
double value, // Value (&alpha;) to be decayed
bool finite_adjust = false); // Adjust for the fact that this
// is not an infinite data set
</PRE>
</I>
</td>
Expand Down Expand Up @@ -135,8 +136,8 @@
<I>
<PRE>
ExponentiallyWeightedVarVisitor(
exponential_decay_spec eds, // See exponential_decay_spec type
double value); // Value to be decayed
exponential_decay_spec eds, // See exponential_decay_spec type
double value); // Value (&alpha;) to be decayed
</PRE>
</I>
</td>
Expand Down Expand Up @@ -170,8 +171,8 @@
<I>
<PRE>
ExponentiallyWeightedCovVisitor(
exponential_decay_spec eds, // See exponential_decay_spec type
double value); // Value to be decayed
exponential_decay_spec eds, // See exponential_decay_spec type
double value); // Value (&alpha;) to be decayed
</PRE>
</I>
</td width="30%">
Expand Down Expand Up @@ -205,8 +206,8 @@
<I>
<PRE>
ExponentiallyWeightedCorrVisitor(
exponential_decay_spec eds, // See exponential_decay_spec type
double value); // Value to be decayed
exponential_decay_spec eds, // See exponential_decay_spec type
double value); // Value (&alpha;) to be decayed
</PRE>
</I>
</td>
Expand Down
15 changes: 12 additions & 3 deletions docs/HTML/HampelFilterVisitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
<td bgcolor="blue"> <font color="white">
<PRE><B>#include &lt;DataFrame/DataFrameTransformVisitors.h&gt;

template&lt;typename T, typename I = unsigned long&gt;
template&lt;typename T, typename I = unsigned long
std::size_t A = 0&gt;
struct HampelFilterVisitor;

// -------------------------------------
Expand All @@ -81,17 +82,25 @@
This is a "single action visitor", meaning it is passed the whole data vector in one call and you must use the single_act_visit() interface.<BR><BR>
This is a transformer visitor. It means the column(s) passed to this visitor is not read-only and its values may change<BR><BR>
This functor class applies Hampel filter to weed out outliers. It replaces the outliers with NaN. The functor result is number of items replaced. The filter is done by using either mean absolute deviation or median absolute deviation<BR><BR>

The Hampel filter is used to detect anomalies in data with a timeseries structure. It consists of a sliding window of a parameterizable size. For each window, each observation will be compared with the Median or Mean Absolute Deviation (MAD). The observation will be considered an outlier in the case in which it exceeds the MAD by n standard deviation * <I>1.4826</I> times.<BR><BR>

<I><PRE>
explicit
HampelFilterVisitor(std::size_t window_size,
hampel_type ht = hampel_type::median,
T num_of_std = 3);
T num_of_std = 3,
bool populate_idxs = false);
</PRE>
</I>
If <I>populate_idxs</I> is true, the input data column will be unchanged. Instead, a vector of indices to datapoints affected will be populated and can be accessed by calling <I>get_idxs()</I>.<BR><BR>
<I>get_result()</I> returns number of data points affected<BR>
<I>get_idxs()</I> returns a std::vector of indices of datapoints affected<BR>
</td>
<td width="30%">
<B>T</B>: Column data type.<BR>
<B>I</B>: Index type.
<B>I</B>: Index type.<BR>
<B>A</B>: Memory alignment boundary for vectors. Default is system default alignment<BR>
</td>
</tr>

Expand Down
7 changes: 4 additions & 3 deletions docs/HTML/KMeansVisitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@
</I>
</LI>
</OL>
<I>get_results()</I> returns an array of K means.<BR>
There is also a <I>get_clusters()</I> method that returns an array of K <I>VectorPtrView</I>'s which contain the data clustered around the K-Means. The first element in each <I>VectorPtrView</I> is the mean and the reset are the data points belonging to that cluster.<BR>
</td>
<I>get_results()</I> returns an array of K means.<BR><BR>
<I>get_clusters()</I> returns an array of K <I>VectorPtrView</I>'s which contain the data clustered around the K-Means. The first element in each <I>VectorPtrView</I> is the mean and the reset are the data points belonging to that cluster.<BR><BR>
<I>get_clusters_idxs()</I> returns an array of K <I>std::vector&lt;size_type&gt;</I>'s which contains indices of the data in each cluster.<BR>
</td>
<td width="30%">
<B>K</B>: Number of means to find<BR>
<B>T</B>: Column data type<BR>
Expand Down
4 changes: 2 additions & 2 deletions docs/HTML/ModeVisitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
<PRE>
template&lt;typename U&gt;
using vec_type = std::vector&lt;U, typename allocator_declare&lt;U, A&gt;::type&gt;;

struct DataItem {
T value; // Value of the column item
T value; // Value of the column item
VectorConstPtrView&lt;I, A&gt; indices; // List of indices where value occurred

// Number of times value occurred
Expand Down
2 changes: 1 addition & 1 deletion docs/HTML/TrueRangeVisitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</td>
<td>
This is a "single action visitor", meaning it is passed the whole data vector in one call and you must use the single_act_visit() interface.<BR><BR>
This visitor calculates price range based on low, high, and close. It requires 3 input columns in order of <I>low</I>, <I>highme</I>, <I>close</I>.<BR>
This visitor calculates price range based on low, high, and close. It requires 3 input columns in order of <I>low</I>, <I>high</I>, <I>close</I>.<BR>
The result is a vector of values with same number of items as the given columns. The first <I>roll_peiord - 1</I> items, in the result will be NAN, if <I>rolling_avg</I> is true.<BR><BR>
The true range indicator is taken as the greatest of the following: current high less the current low; the absolute value of the current high less the previous close; and the absolute value of the current low less the previous close.<BR>
<I>
Expand Down
Loading
Loading