Vespucci
1.0.0
|
A namespace for math functions relating to linear least squares regression. More...
Namespaces | |
Baseline | |
Clustering | |
DimensionReduction | |
A namespace for math functions relating to dimension reduction. | |
LinLeastSq | |
NonLinLeastSq | |
Normalization | |
A namespace for math functions relating to normalization. | |
PeakFinding | |
A namespace for math functions relating to peak detection and counting. | |
Quantification | |
A namespace for math functions relating to peak quantification. | |
Smoothing | |
Stats | |
Transform | |
Classes | |
class | DistanceMetricWrapper |
class | KMeansWrapper |
The KMeansWrapper class mlpack relies heavily on template metaprogramming. This means that you only need to compile what you actually use. But Vespucci must be precompiled with all possible options availible at runtime. Here, we instantiate supported combinations of template parameters for the kmeans class in mlpack. More... | |
Functions | |
VESPUCCI_EXPORT arma::uword | LocalMaximum (const arma::vec &X, double &value) |
Vespucci::Math::LocalMaximum. More... | |
VESPUCCI_EXPORT arma::uword | LocalMaximum (const arma::vec &dX, const arma::vec &d2X, double &value) |
VESPUCCI_EXPORT arma::uword | LocalMaximum (const arma::vec &X, const arma::vec &dX, const arma::vec &d2X, double &value) |
Vespucci::Math::LocalMaximum. More... | |
VESPUCCI_EXPORT arma::uword | LocalMinimum (const arma::mat &X, double &value) |
Vespucci::Math::LocalMinimum. More... | |
VESPUCCI_EXPORT arma::uword | LocalMinimum (const arma::vec &dX, const arma::vec &d2X, double &value) |
VESPUCCI_EXPORT arma::uword | LocalMinimum (const arma::vec &X, const arma::vec &dX, const arma::mat &d2X, double &value) |
Vespucci::Math::LocalMinimum. More... | |
VESPUCCI_EXPORT arma::sp_mat | LocalMaxima (const arma::mat &X) |
Vespucci::Math::LocalMaxima. More... | |
VESPUCCI_EXPORT arma::sp_mat | LocalMaxima (const arma::mat &X, const arma::mat &dX, const arma::mat &d2X) |
Vespucci::Math::LocalMaxima. More... | |
VESPUCCI_EXPORT arma::sp_mat | LocalMinima (const arma::mat &X) |
Vespucci::Math::LocalMinima. More... | |
VESPUCCI_EXPORT arma::sp_mat | LocalMinima (const arma::mat &X, const arma::mat &dX, const arma::mat &d2X) |
Vespucci::Math::LocalMinima. More... | |
VESPUCCI_EXPORT arma::sp_mat | LocalMinimaWindow (const arma::mat &X, const int window_size) |
Vespucci::Math::LocalMinimaWindow. More... | |
VESPUCCI_EXPORT arma::sp_mat | LocalMaximaWindow (const arma::mat &X, const int window_size) |
Vespucci::Math::LocalMaximaWindow "Cleans" local maximum by window search to remove extraneous values. More... | |
VESPUCCI_EXPORT arma::sp_mat | LocalMinimaCWT (arma::mat coefs, arma::uvec scales, arma::uword min_window_size, double amplitude_threshold) |
VESPUCCI_EXPORT arma::sp_mat | LocalMaximaCWT (arma::mat coefs, arma::uvec scales, arma::uword min_window_size) |
VESPUCCI_EXPORT double | quantile (arma::vec &data, double probs) |
VESPUCCI_EXPORT arma::vec | ExtendToNextPow (arma::vec X, arma::uword n) |
VESPUCCI_EXPORT arma::uword | NextPow (arma::uword number, arma::uword power) |
VESPUCCI_EXPORT arma::mat | spdiags (arma::mat B, arma::ivec d, arma::uword m, arma::uword n) |
spdiags analgous to the Octave/arma::matLAB function A = spdiags(B, d, m, n). More... | |
VESPUCCI_EXPORT arma::mat | orth (arma::mat X) |
orth Returns an orthonormal basis of the range space of A More... | |
VESPUCCI_EXPORT arma::uword | min (arma::uword a, arma::uword b) |
Vespucci::Math::min. More... | |
VESPUCCI_EXPORT arma::uword | max (arma::uword a, arma::uword b) |
Vespucci::Math::max. More... | |
VESPUCCI_EXPORT void | position (arma::uword index, arma::uword n_rows, arma::uword n_cols, arma::uword &i, arma::uword &j) |
Vespucci::Math::position Find row and column numbers for index. More... | |
VESPUCCI_EXPORT arma::umat | to_row_column (arma::uvec indices, arma::uword n_rows, arma::uword n_cols) |
VESPUCCI_EXPORT double | RecalculateAverage (double new_value, double old_average, double old_count) |
Vespucci::Math::RecalculateAverage Recalculate the average value when a new value is added to a list for which only the previous means, stddevs and counts are known. More... | |
VESPUCCI_EXPORT double | RecalculateStdDev (double new_value, double old_mean, double old_stddev, double old_count) |
Vespucci::Math::RecalculateStdDev Recalculate a standard deviation when a new value is added to a list for which only the previous means, stddevs and counts are known. More... | |
VESPUCCI_EXPORT arma::umat | GetClosestValues (arma::vec query, arma::vec target, const arma::uword k=5) |
Vespucci::Math::GetClosestValues. More... | |
VESPUCCI_EXPORT double | CalcPoly (const double x, const arma::vec &coefs) |
Vespucci::Math::CalcPoly Calculate the value of a polynomial at particular point. More... | |
VESPUCCI_EXPORT arma::vec | RepresentativeSpectrum (const arma::mat &spectra, arma::uword &index, std::string metric_name="euclidean", std::string center="centroid") |
Vespucci::Math::RepresentativeSpectrum. More... | |
VESPUCCI_EXPORT arma::vec | WavelengthToFrequency (const arma::vec &x, double freq_factor, double wl_factor) |
Vespucci::Math::WavelengthToFrequency. More... | |
VESPUCCI_EXPORT arma::vec | FrequencyToWavelength (const arma::vec &x, double wl_factor, double freq_factor) |
Vespucci::Math::FrequencyToWavelength. More... | |
VESPUCCI_EXPORT arma::vec | FrequencyToEnergy (const arma::vec &x, double energy_factor, double freq_factor) |
Vespucci::Math::FrequencyToEnergy. More... | |
VESPUCCI_EXPORT arma::vec | EnergyToFrequency (const arma::vec &x, double freq_factor, double energy_factor) |
Vespucci::Math::EnergyToFrequency. More... | |
VESPUCCI_EXPORT arma::vec | WavenumberToFrequency (const arma::vec &x, double freq_factor, double wn_factor) |
Vespucci::Math::WavenumberToFrequency. More... | |
VESPUCCI_EXPORT arma::vec | FrequencyToWavenumber (const arma::vec &x, double wn_factor, double freq_factor) |
Vespucci::Math::FrequencyToWavenumber. More... | |
VESPUCCI_EXPORT arma::vec | WavenumberToWavelength (const arma::vec &x, double wn_factor, double wl_factor) |
Vespucci::Math::WavenumberToWavelength. More... | |
VESPUCCI_EXPORT arma::vec | WavelengthToWavenumber (const arma::vec &x, double wl_factor, double wn_factor) |
Vespucci::Math::WavelengthToWavenumber. More... | |
VESPUCCI_EXPORT arma::vec | WavelengthToEnergy (const arma::vec &x, double energy_factor, double wl_factor) |
Vespucci::Math::WavelengthToEnergy. More... | |
VESPUCCI_EXPORT arma::vec | EnergyToWavelength (const arma::vec &x, double wl_factor, double energy_factor) |
Vespucci::Math::EnergyToWavelength. More... | |
VESPUCCI_EXPORT arma::vec | EnergyToWavenumber (const arma::vec &x, double wn_factor, double energy_factor) |
Vespucci::Math::EnergyToWavenumber. More... | |
VESPUCCI_EXPORT arma::vec | WavenumberToEnergy (const arma::vec &x, double energy_factor, double wn_factor) |
Vespucci::Math::WavenumberToEnergy. More... | |
VESPUCCI_EXPORT bool | AreEqual (const arma::vec &a, const arma::vec &b) |
AreEqual. More... | |
VESPUCCI_EXPORT bool | IsMonotonic (const arma::vec &x) |
IsMonotonic. More... | |
VESPUCCI_EXPORT bool | IsIncreasing (const arma::vec &x) |
IsIncreasing. More... | |
VESPUCCI_EXPORT arma::cx_vec | cx_zeros (arma::uword n) |
Vespucci::Math::cx_zeros. More... | |
VESPUCCI_EXPORT arma::cx_mat | cx_zeros (arma::uword m, arma::uword n) |
Vespucci::Math::cx_zeros. More... | |
VESPUCCI_EXPORT arma::uword | ClosestIndex (double value, const arma::vec &vector) |
Vespucci::Math::ClosestIndex. More... | |
VESPUCCI_EXPORT arma::uvec | Intersection (arma::uvec &x, arma::uvec &y) |
Vespucci::Math::Intersection. More... | |
VESPUCCI_EXPORT double | CalculateRSquared (const arma::vec &data, const arma::vec &fit, arma::vec &residuals) |
Vespucci::Math::CalculateRSquared. More... | |
VESPUCCI_EXPORT arma::mat | SafeRows (const arma::mat &x, arma::uword a, arma::uword b) |
Vespucci::Math::SafeRows. More... | |
template<typename T > | |
T | conv_fft (const T &A, const T &B, std::string type) |
template<typename T > | |
T | rotate (const T &X, arma::uword shift_by, bool slide_back=true) |
template<typename T > | |
T | diff (const T &X, arma::uword deriv_order=1) |
Vespucci::Math::diff. More... | |
A namespace for math functions relating to linear least squares regression.
A namespace for math functions.
:::LinLeastSq
bool Vespucci::Math::AreEqual | ( | const arma::vec & | a, |
const arma::vec & | b | ||
) |
AreEqual.
a | |
b |
Definition at line 858 of file accessory.cpp.
double Vespucci::Math::CalcPoly | ( | const double | x, |
const arma::vec & | coefs | ||
) |
Vespucci::Math::CalcPoly Calculate the value of a polynomial at particular point.
x | The value at which to evaluate a polynomial. |
coefs | The coefficients of the polynomial ordered from constant to highest order |
Definition at line 599 of file accessory.cpp.
double Vespucci::Math::CalculateRSquared | ( | const arma::vec & | data, |
const arma::vec & | fit, | ||
arma::vec & | residuals | ||
) |
Vespucci::Math::CalculateRSquared.
data | |
fit | |
residuals |
Definition at line 1008 of file accessory.cpp.
arma::uword Vespucci::Math::ClosestIndex | ( | double | value, |
const arma::vec & | vector | ||
) |
value | |
vector |
Definition at line 932 of file accessory.cpp.
T Vespucci::Math::conv_fft | ( | const T & | A, |
const T & | B, | ||
std::string | type | ||
) |
Definition at line 102 of file accessory_impl.h.
arma::cx_vec Vespucci::Math::cx_zeros | ( | arma::uword | n | ) |
arma::cx_mat Vespucci::Math::cx_zeros | ( | arma::uword | m, |
arma::uword | n | ||
) |
T Vespucci::Math::diff | ( | const T & | X, |
arma::uword | deriv_order = 1 |
||
) |
X | A vector represetning a signal or a arma::matrix where each column is a signal |
deriv_order | The derivative order to calculate |
Perform arithmetic differentiation of a vector or arma::matrix (if X is a arma::matrix, the differentiation is performed to all the columns).
Definition at line 47 of file accessory_impl.h.
arma::vec Vespucci::Math::EnergyToFrequency | ( | const arma::vec & | x, |
double | freq_factor, | ||
double | energy_factor | ||
) |
Vespucci::Math::EnergyToFrequency.
x | |
freq_factor | |
energy_factor |
Definition at line 657 of file accessory.cpp.
arma::vec Vespucci::Math::EnergyToWavelength | ( | const arma::vec & | x, |
double | wl_factor, | ||
double | energy_factor | ||
) |
Vespucci::Math::EnergyToWavelength.
x | |
wl_factor | |
energy_factor |
Definition at line 746 of file accessory.cpp.
arma::vec Vespucci::Math::EnergyToWavenumber | ( | const arma::vec & | x, |
double | wn_factor, | ||
double | energy_factor | ||
) |
Vespucci::Math::EnergyToWavenumber.
x | |
wn_factor | |
energy_factor |
Definition at line 760 of file accessory.cpp.
arma::vec Vespucci::Math::ExtendToNextPow | ( | arma::vec | X, |
arma::uword | n | ||
) |
Definition at line 259 of file accessory.cpp.
arma::vec Vespucci::Math::FrequencyToEnergy | ( | const arma::vec & | x, |
double | energy_factor, | ||
double | freq_factor | ||
) |
Vespucci::Math::FrequencyToEnergy.
x | |
energy_factor | |
freq_factor |
Definition at line 643 of file accessory.cpp.
arma::vec Vespucci::Math::FrequencyToWavelength | ( | const arma::vec & | x, |
double | wl_factor, | ||
double | freq_factor | ||
) |
Vespucci::Math::FrequencyToWavelength.
x | |
wl_factor | |
freq_factor |
Definition at line 629 of file accessory.cpp.
arma::vec Vespucci::Math::FrequencyToWavenumber | ( | const arma::vec & | x, |
double | wn_factor, | ||
double | freq_factor | ||
) |
Vespucci::Math::FrequencyToWavenumber.
x | |
wn_factor | |
freq_factor |
Definition at line 686 of file accessory.cpp.
arma::umat Vespucci::Math::GetClosestValues | ( | arma::vec | query, |
arma::vec | target, | ||
const arma::uword | k = 5 |
||
) |
Vespucci::Math::GetClosestValues.
query | |
target | |
k |
Definition at line 576 of file accessory.cpp.
arma::uvec Vespucci::Math::Intersection | ( | arma::uvec & | x, |
arma::uvec & | y | ||
) |
x | |
y |
Definition at line 990 of file accessory.cpp.
bool Vespucci::Math::IsIncreasing | ( | const arma::vec & | x | ) |
bool Vespucci::Math::IsMonotonic | ( | const arma::vec & | x | ) |
arma::sp_mat Vespucci::Math::LocalMaxima | ( | const arma::mat & | X | ) |
X | A matrix with signals as columns |
Definition at line 294 of file accessory.cpp.
arma::sp_mat Vespucci::Math::LocalMaxima | ( | const arma::mat & | X, |
const arma::mat & | dX, | ||
const arma::mat & | d2X | ||
) |
X | A matrix of signals |
dX | A matrix of first derivatives of signals (numerical, S-G, wavelet, etc) |
d2X | A matrix of second derivatives of signals (numerical, S-G, wavelet, etc). |
Definition at line 317 of file accessory.cpp.
arma::sp_mat Vespucci::Math::LocalMaximaCWT | ( | arma::mat | coefs, |
arma::uvec | scales, | ||
arma::uword | min_window_size | ||
) |
Definition at line 780 of file accessory.cpp.
arma::sp_mat Vespucci::Math::LocalMaximaWindow | ( | const arma::mat & | X, |
const int | window_size | ||
) |
Vespucci::Math::LocalMaximaWindow "Cleans" local maximum by window search to remove extraneous values.
X | |
window_size |
Definition at line 830 of file accessory.cpp.
arma::uword Vespucci::Math::LocalMaximum | ( | const arma::vec & | X, |
double & | value | ||
) |
VESPUCCI_EXPORT arma::uword Vespucci::Math::LocalMaximum | ( | const arma::vec & | dX, |
const arma::vec & | d2X, | ||
double & | value | ||
) |
arma::uword Vespucci::Math::LocalMaximum | ( | const arma::vec & | X, |
const arma::vec & | dX, | ||
const arma::vec & | d2X, | ||
double & | value | ||
) |
arma::sp_mat Vespucci::Math::LocalMinima | ( | const arma::mat & | X | ) |
arma::sp_mat Vespucci::Math::LocalMinima | ( | const arma::mat & | X, |
const arma::mat & | dX, | ||
const arma::mat & | d2X | ||
) |
VESPUCCI_EXPORT arma::sp_mat Vespucci::Math::LocalMinimaCWT | ( | arma::mat | coefs, |
arma::uvec | scales, | ||
arma::uword | min_window_size, | ||
double | amplitude_threshold | ||
) |
arma::sp_mat Vespucci::Math::LocalMinimaWindow | ( | const arma::mat & | X, |
const int | window_size | ||
) |
Vespucci::Math::LocalMinimaWindow.
X | |
window_size |
Definition at line 801 of file accessory.cpp.
arma::uword Vespucci::Math::LocalMinimum | ( | const arma::mat & | X, |
double & | value | ||
) |
VESPUCCI_EXPORT arma::uword Vespucci::Math::LocalMinimum | ( | const arma::vec & | dX, |
const arma::vec & | d2X, | ||
double & | value | ||
) |
arma::uword Vespucci::Math::LocalMinimum | ( | const arma::vec & | X, |
const arma::vec & | dX, | ||
const arma::mat & | d2X, | ||
double & | value | ||
) |
arma::uword Vespucci::Math::max | ( | arma::uword | a, |
arma::uword | b | ||
) |
a | |
b |
Definition at line 237 of file accessory.cpp.
arma::uword Vespucci::Math::min | ( | arma::uword | a, |
arma::uword | b | ||
) |
a | |
b |
Definition at line 249 of file accessory.cpp.
arma::uword Vespucci::Math::NextPow | ( | arma::uword | number, |
arma::uword | power | ||
) |
Definition at line 281 of file accessory.cpp.
arma::mat Vespucci::Math::orth | ( | arma::mat | X | ) |
orth Returns an orthonormal basis of the range space of A
X | arma::matrix |
Definition at line 208 of file accessory.cpp.
void Vespucci::Math::position | ( | arma::uword | index, |
arma::uword | n_rows, | ||
arma::uword | n_cols, | ||
arma::uword & | i, | ||
arma::uword & | j | ||
) |
Vespucci::Math::position Find row and column numbers for index.
index | |
n_rows | Number of rows |
n_cols | Number of columns |
i | Row number |
j | Column number |
Definition at line 469 of file accessory.cpp.
double Vespucci::Math::quantile | ( | arma::vec & | data, |
double | probs | ||
) |
Definition at line 503 of file accessory.cpp.
double Vespucci::Math::RecalculateAverage | ( | double | new_value, |
double | old_average, | ||
double | old_count | ||
) |
Vespucci::Math::RecalculateAverage Recalculate the average value when a new value is added to a list for which only the previous means, stddevs and counts are known.
new_value | |
old_average | |
old_count |
Definition at line 535 of file accessory.cpp.
double Vespucci::Math::RecalculateStdDev | ( | double | new_value, |
double | old_mean, | ||
double | old_stddev, | ||
double | old_count | ||
) |
Vespucci::Math::RecalculateStdDev Recalculate a standard deviation when a new value is added to a list for which only the previous means, stddevs and counts are known.
new_value | |
old_mean | |
old_stddev | |
old_count |
Definition at line 552 of file accessory.cpp.
arma::vec Vespucci::Math::RepresentativeSpectrum | ( | const arma::mat & | spectra, |
arma::uword & | index, | ||
std::string | metric_name = "euclidean" , |
||
std::string | center_type = "centroid" |
||
) |
Vespucci::Math::RepresentativeSpectrum.
spectra | |
metric | Distance metric |
center |
Definition at line 953 of file accessory.cpp.
T Vespucci::Math::rotate | ( | const T & | X, |
arma::uword | shift_by, | ||
bool | slide_back = true |
||
) |
Definition at line 65 of file accessory_impl.h.
arma::mat Vespucci::Math::SafeRows | ( | const arma::mat & | x, |
arma::uword | a, | ||
arma::uword | b | ||
) |
x | |
a | |
b |
Definition at line 1030 of file accessory.cpp.
arma::mat Vespucci::Math::spdiags | ( | arma::mat | B, |
arma::ivec | d, | ||
arma::uword | m, | ||
arma::uword | n | ||
) |
spdiags analgous to the Octave/arma::matLAB function A = spdiags(B, d, m, n).
B | a arma::matrix containing the new diagonal vectors as columns |
d | a vector containing the row numbers to set. The first column vector of B corresponds to the first entry in d. |
m | the number of rows of the output arma::matrix |
n | the number of columns of the output arma::matrix |
Definition at line 137 of file accessory.cpp.
arma::umat Vespucci::Math::to_row_column | ( | arma::uvec | indices, |
arma::uword | n_rows, | ||
arma::uword | n_cols | ||
) |
Definition at line 488 of file accessory.cpp.
arma::vec Vespucci::Math::WavelengthToEnergy | ( | const arma::vec & | x, |
double | energy_factor, | ||
double | wl_factor | ||
) |
Vespucci::Math::WavelengthToEnergy.
x | |
energy_factor | |
wl_factor |
Definition at line 731 of file accessory.cpp.
arma::vec Vespucci::Math::WavelengthToFrequency | ( | const arma::vec & | x, |
double | freq_factor, | ||
double | wl_factor | ||
) |
Vespucci::Math::WavelengthToFrequency.
x | |
freq_factor | |
wl_factor |
Definition at line 614 of file accessory.cpp.
arma::vec Vespucci::Math::WavelengthToWavenumber | ( | const arma::vec & | x, |
double | wl_factor, | ||
double | wn_factor | ||
) |
Vespucci::Math::WavelengthToWavenumber.
x | |
wl_factor | |
wn_factor |
Definition at line 716 of file accessory.cpp.
arma::vec Vespucci::Math::WavenumberToEnergy | ( | const arma::vec & | x, |
double | energy_factor, | ||
double | wn_factor | ||
) |
Vespucci::Math::WavenumberToEnergy.
x | |
energy_factor | |
wn_factor |
Definition at line 773 of file accessory.cpp.
arma::vec Vespucci::Math::WavenumberToFrequency | ( | const arma::vec & | x, |
double | freq_factor, | ||
double | wn_factor | ||
) |
Vespucci::Math::WavenumberToFrequency.
x | |
freq_factor | |
wn_factor |
Definition at line 671 of file accessory.cpp.
arma::vec Vespucci::Math::WavenumberToWavelength | ( | const arma::vec & | x, |
double | wn_factor, | ||
double | wl_factor | ||
) |
Vespucci::Math::WavenumberToWavelength.
x | |
wn_factor | |
wl_factor |
Definition at line 701 of file accessory.cpp.