![]() |
slope 6.2.1
|
Mathematical support functions for the slope package. More...
#include "eigen_compat.h"#include "clusters.h"#include "jit_normalization.h"#include "utils.h"#include <Eigen/Core>#include <Eigen/SparseCore>#include <numeric>#include <vector>

Go to the source code of this file.
Namespaces | |
| namespace | slope |
| Namespace containing SLOPE regression implementation. | |
Functions | |
| template<typename T > | |
| int | slope::sign (T val) |
| Returns the sign of a given value. | |
| template<typename T > | |
| Eigen::ArrayXd | slope::cumSum (const T &x, const bool leading_zero=false) |
| template<typename T > | |
| T | slope::sigmoid (const T &x) |
| template<typename T > | |
| T | slope::logit (const T &x) |
| template<typename T > | |
| T | slope::clamp (const T &x, const T &lo, const T &hi) |
| Eigen::VectorXd | slope::logSumExp (const Eigen::MatrixXd &a) |
| Eigen::MatrixXd | slope::softmax (const Eigen::MatrixXd &x) |
| template<typename T > | |
| Eigen::MatrixXd | slope::linearPredictor (const T &x, const std::vector< int > &active_set, const Eigen::VectorXd &beta0, const Eigen::VectorXd &beta, const Eigen::VectorXd &x_centers, const Eigen::VectorXd &x_scales, const JitNormalization jit_normalization, const bool intercept) |
| template<typename T > | |
| void | slope::updateGradient (Eigen::VectorXd &gradient, const T &x, const Eigen::MatrixXd &residual, const std::vector< int > &active_set, const Eigen::VectorXd &x_centers, const Eigen::VectorXd &x_scales, const Eigen::VectorXd &w, const JitNormalization jit_normalization) |
| template<typename T > | |
| void | slope::offsetGradient (Eigen::VectorXd &gradient, const T &x, const Eigen::VectorXd &offset, const std::vector< int > &active_set, const Eigen::VectorXd &x_centers, const Eigen::VectorXd &x_scales, const JitNormalization jit_normalization) |
| std::vector< int > | slope::setUnion (const std::vector< int > &a, const std::vector< int > &b) |
| Computes the union of two sorted integer vectors. | |
| std::vector< int > | slope::setDiff (const std::vector< int > &a, const std::vector< int > &b) |
| Computes the set difference of two sorted integer vectors. | |
| template<typename T > | |
| int | slope::whichMax (const T &x) |
| Returns the index of the maximum element in a container. | |
| template<typename T > | |
| int | slope::whichMin (const T &x) |
| Returns the index of the minimum element in a container. | |
| template<typename T , typename Comparator > | |
| int | slope::whichBest (const T &x, const Comparator &comp) |
| Returns the index of the minimum element in a container. | |
| Eigen::ArrayXd | slope::geomSpace (const double start, const double end, const int n) |
| Creates an array of n numbers in geometric progression from start to end. | |
| template<typename T > | |
| Eigen::VectorXd | slope::l1Norms (const T &x) |
| Computes the L1 (Manhattan) norms for each column of a matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::l2Norms (const Eigen::SparseMatrixBase< T > &x) |
| Computes the L2 (Euclidean) norms for each column of a sparse matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::l2Norms (const Eigen::MatrixBase< T > &x) |
| Computes the L2 (Euclidean) norms for each column of a dense matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::maxAbs (const Eigen::SparseMatrixBase< T > &x) |
| Computes the maximum absolute value for each column of a matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::maxAbs (const Eigen::MatrixBase< T > &x) |
| Computes the maximum absolute value for each column of a dense matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::means (const Eigen::SparseMatrixBase< T > &x) |
| Computes the arithmetic mean for each column of a sparse matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::means (const Eigen::MatrixBase< T > &x) |
| Computes the arithmetic mean for each column of a dense matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::stdDevs (const Eigen::SparseMatrixBase< T > &x) |
| Computes the standard deviation for each column of a matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::stdDevs (const Eigen::MatrixBase< T > &x) |
| Computes the standard deviation for each column of a matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::ranges (const Eigen::SparseMatrixBase< T > &x) |
| Computes the range (max - min) for each column of a matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::ranges (const Eigen::MatrixBase< T > &x) |
| Computes the range (max - min) for each column of a dense matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::mins (const Eigen::SparseMatrixBase< T > &x) |
| Computes the minimum value for each column of a sparse matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::mins (const Eigen::MatrixBase< T > &x) |
| Computes the minimum value for each column of a dense matrix. | |
| template<typename T > | |
| Eigen::VectorXd | slope::clusterGradient (Eigen::VectorXd &beta, Eigen::MatrixXd &residual, Clusters &clusters, const T &x, const Eigen::MatrixXd &w, const Eigen::VectorXd &x_centers, const Eigen::VectorXd &x_scales, const JitNormalization jit_normalization) |
Mathematical support functions for the slope package.
Definition in file math.h.