35#ifndef STK_STAT_TRANSFORM_H
36#define STK_STAT_TRANSFORM_H
51template <
class Array,
class RowVector>
54 typedef typename Array::Type Type;
57 sizeRows_ = Array::sizeRows_,
58 sizeCols_ = Array::sizeCols_
63template <
class Array,
class RowVector>
71template <
class Array,
class ColVector>
74 typedef typename Array::Type Type;
77 sizeRows_ = Array::sizeRows_,
78 sizeCols_ = Array::sizeCols_
88template <
class Array,
class Weights,
class RowVector>
91 typedef typename Array::Type Type;
94 sizeRows_ = Array::sizeRows_,
95 sizeCols_ = Array::sizeCols_
100template <
class Array,
class Weights,
class RowVector>
108template <
class Array,
class Weights,
class ColVector>
111 typedef typename Array::Type Type;
114 sizeRows_ = Array::sizeRows_,
115 sizeCols_ = Array::sizeCols_
128template <
class Array,
class RowVector>
131 typedef typename Array::Type Type;
134 sizeRows_ = Array::sizeRows_,
135 sizeCols_ = Array::sizeCols_
141 for (
int j=
m.beginCols();
j<
m.endCols();
j++)
148template <
class RowVector,
class Array >
159template <
class Array,
class ColVector>
162 typedef typename Array::Type Type;
165 sizeRows_ = Array::sizeRows_,
166 sizeCols_ = Array::sizeCols_
172 for (
int i=
m.beginRows();
i<
m.endRows();
i++)
187template <
class Array,
class Weights,
class RowVector>
190 typedef typename Array::Type Type;
193 sizeRows_ = Array::sizeRows_,
194 sizeCols_ = Array::sizeCols_
201 for (
int j=
m.beginCols();
j<
m.endCols();
j++)
208 if (
dev) {
m.col(
j) /= std[
j];}
211template <
class Array,
class Weights,
class RowVector>
222template <
class Array,
class Weights,
class ColVector>
225 typedef typename Array::Type Type;
228 sizeRows_ = Array::sizeRows_,
229 sizeCols_ = Array::sizeCols_
236 for (
int i=
m.beginRows();
i<
m.endRows();
i++)
243 if (
dev) {
m.row(
i) /= std[
i];}
251template <
class RowVector,
class Array >
254 typedef typename Array::Type Type;
257 sizeRows_ = Array::sizeRows_,
258 sizeCols_ = Array::sizeCols_
260 if (
m.cols() !=
mean.range())
265template <
class RowVector,
class Array >
273template <
class ColVector,
class Array >
276 typedef typename Array::Type Type;
279 sizeRows_ = Array::sizeRows_,
280 sizeCols_ = Array::sizeCols_
282 if (
m.rows() !=
mean.range())
291template <
class Array,
class RowVector>
294 typedef typename Array::Type Type;
297 sizeRows_ = Array::sizeRows_,
298 sizeCols_ = Array::sizeCols_
300 if (
m.cols() != std.range())
304template <
class Array,
class RowVector>
312template <
class Array,
class ColVector>
315 typedef typename Array::Type Type;
318 sizeRows_ = Array::sizeRows_,
319 sizeCols_ = Array::sizeCols_
321 if (
m.rows() != std.range())
330template <
class Array,
class RowVector>
336template <
class Array,
class RowVector>
344template <
class Array,
class ColVector>
In this file we define the constant Arrays.
#define STKRUNTIME_ERROR_NO_ARG(Where, Error)
This file contain the functors computings statistics.
Define the constant point.
Define the constant point.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
double Real
STK fundamental type of Real values.
void centerByRow(Array &m, ColVector &mean)
Compute the mean by row of the variables in the container V and center V.
void center(Array &m, RowVector &mean)
Compute the mean by column of the variables in the container m and center it.
void unstandardizeByRow(Array &m, ColVector const &std)
undo the standardization by rows of the standardized variable m.
void unstandardize(Array &m, RowVector const &std)
undo the standardization by columns of the standardized variable m.
hidden::FunctorTraits< Derived, MeanOp >::Row mean(Derived const &A)
Compute the mean(s) value(s) of A.
void standardize(Array &m, RowVector &mean, RowVector &std, bool unbiased=false)
Compute the mean and the standard deviation by columns of the variable m and standardize it.
void standardizeByRow(Array &m, ColVector &mean, ColVector &std, bool unbiased=false)
Compute the mean and the standard deviation by rows of the variable m and standardize it.
hidden::FunctorTraits< Derived, MeanOp >::Row meanByCol(Derived const &A)
hidden::FunctorTraits< Derived, MeanOp >::Col meanByRow(Derived const &A)
void uncenter(Array &m, RowVector const &mean)
Add the means to the columns of the container m.
void uncenterByRow(Array &m, ColVector const &mean)
Add the means to the rows of the container m.
void unstandardizeByCol(Array &m, RowVector const &std)
hidden::FunctorTraits< Derived, VarianceWithFixedMeanOp >::Row varianceWithFixedMeanByCol(Derived const &A, MeanType const &mean, bool unbiased)
void standardizeByCol(Array &m, RowVector &mean, RowVector &std, bool unbiased=false)
void uncenterByCol(Array &m, RowVector const &mean)
hidden::FunctorTraits< Derived, VarianceWithFixedMeanOp >::Col varianceWithFixedMeanByRow(Derived const &A, MeanType const &mean, bool unbiased=false)
void centerByCol(Array &m, RowVector &mean)
The namespace STK is the main domain space of the Statistical ToolKit project.
static bool isFinite(Type const &x)