shapeworks::ParticleShapeStatistics
#include <ParticleShapeStatistics.h>
Public Functions
Name | |
---|---|
ParticleShapeStatistics() | |
ParticleShapeStatistics(std::shared_ptr< Project > project) | |
~ParticleShapeStatistics() | |
int | DoPCA(std::vector< std::vector< Point >> global_pts, int domainsPerShape =1) |
int | DoPCA(ParticleSystem particleSystem, int domainsPerShape =1) |
itkStaticConstMacro(Dimension , unsigned int , VDimension ) Dimensionality of the domain of the particle system. |
|
int | ImportPoints(std::vector< Eigen::VectorXd > points, std::vector< int > group_ids) Loads a set of point files and pre-computes some statistics. |
int | ReadPointFiles(const std::string & s) Loads a set of point files and pre-computes some statistics. |
int | ReloadPointFiles() Reloads a set of point files and recomputes some statistics. |
int | WriteCSVFile(const std::string & s) Writes a text file in comma-separated format. Suitable for reading into excel or R or Matlab for analysis. |
int | WriteCSVFile2(const std::string & s) |
int | ComputeModes() Computes PCA modes from the set of correspondence mode positions. Requires that ReadPointFiles be called first. |
int | PrincipalComponentProjections() |
int | FisherLinearDiscriminant(unsigned int numModes) Computes fishers linear discriminant line for best group separation. |
int | SampleSize() const Returns the sample size. |
int | Group1SampleSize() const |
int | Group2SampleSize() const |
int | NumberOfDimensions() const Returns the number of dimensions (this is number of points times Dimension) |
int | GroupID(unsigned int i) const Returns the group ids. |
const std::vector< int > & | GroupID() const |
const Eigen::MatrixXd & | Eigenvectors() const Returns the eigenvectors/values. |
const std::vector< double > & | Eigenvalues() const |
const Eigen::VectorXd & | Mean() const Returns the mean shape. |
const Eigen::VectorXd & | Group1Mean() const |
const Eigen::VectorXd & | Group2Mean() const |
const Eigen::VectorXd & | NormalizedGroupDifference() const Returns group2 - group1 mean. |
const Eigen::VectorXd & | GroupDifference() const |
int | ComputeMedianShape(const int ID) |
double | L1Norm(unsigned int a, unsigned int b) Returns the euclidean L1 norm between shape a and b. |
Eigen::MatrixXd & | PCALoadings() Returns the component loadings. |
const Eigen::VectorXd & | FishersLDA() const Returns the Fisher linear discriminant. |
const Eigen::MatrixXd & | ShapeMatrix() const Returns the shape matrix. |
const Eigen::MatrixXd & | RecenteredShape() const Returns the shape with the mean subtracted. |
const std::vector< double > & | PercentVarByMode() const |
int | SimpleLinearRegression(const std::vector< double > & y, const std::vector< double > & x, double & a, double & b) const |
Eigen::VectorXd | get_compactness(std::function< void(float)> progress_callback) |
Eigen::VectorXd | get_specificity(std::function< void(float)> progress_callback) |
Eigen::VectorXd | get_generalization(std::function< void(float)> progress_callback) |
Eigen::MatrixXd | get_group1_matrix() |
Eigen::MatrixXd | get_group2_matrix() |
Public Attributes
Name | |
---|---|
constexpr static int | VDimension |
Detailed Description
class shapeworks::ParticleShapeStatistics;
This class computes various statistics for a set of correspondence positions and group ids.
Public Functions Documentation
function ParticleShapeStatistics
inline ParticleShapeStatistics()
function ParticleShapeStatistics
ParticleShapeStatistics(
std::shared_ptr< Project > project
)
function ~ParticleShapeStatistics
inline ~ParticleShapeStatistics()
function DoPCA
int DoPCA(
std::vector< std::vector< Point >> global_pts,
int domainsPerShape =1
)
function DoPCA
int DoPCA(
ParticleSystem particleSystem,
int domainsPerShape =1
)
function itkStaticConstMacro
itkStaticConstMacro(
Dimension ,
unsigned int ,
VDimension
)
Dimensionality of the domain of the particle system.
function ImportPoints
int ImportPoints(
std::vector< Eigen::VectorXd > points,
std::vector< int > group_ids
)
Loads a set of point files and pre-computes some statistics.
function ReadPointFiles
int ReadPointFiles(
const std::string & s
)
Loads a set of point files and pre-computes some statistics.
function ReloadPointFiles
int ReloadPointFiles()
Reloads a set of point files and recomputes some statistics.
function WriteCSVFile
int WriteCSVFile(
const std::string & s
)
Writes a text file in comma-separated format. Suitable for reading into excel or R or Matlab for analysis.
function WriteCSVFile2
int WriteCSVFile2(
const std::string & s
)
function ComputeModes
int ComputeModes()
Computes PCA modes from the set of correspondence mode positions. Requires that ReadPointFiles be called first.
function PrincipalComponentProjections
int PrincipalComponentProjections()
Computes the principal component loadings, or projections onto the principal componenent axes for each of the samples. ComputeModes must be called first.
function FisherLinearDiscriminant
int FisherLinearDiscriminant(
unsigned int numModes
)
Computes fishers linear discriminant line for best group separation.
function SampleSize
inline int SampleSize() const
Returns the sample size.
function Group1SampleSize
inline int Group1SampleSize() const
function Group2SampleSize
inline int Group2SampleSize() const
function NumberOfDimensions
inline int NumberOfDimensions() const
Returns the number of dimensions (this is number of points times Dimension)
function GroupID
inline int GroupID(
unsigned int i
) const
Returns the group ids.
function GroupID
inline const std::vector< int > & GroupID() const
function Eigenvectors
inline const Eigen::MatrixXd & Eigenvectors() const
Returns the eigenvectors/values.
function Eigenvalues
inline const std::vector< double > & Eigenvalues() const
function Mean
inline const Eigen::VectorXd & Mean() const
Returns the mean shape.
function Group1Mean
inline const Eigen::VectorXd & Group1Mean() const
function Group2Mean
inline const Eigen::VectorXd & Group2Mean() const
function NormalizedGroupDifference
inline const Eigen::VectorXd & NormalizedGroupDifference() const
Returns group2 - group1 mean.
function GroupDifference
inline const Eigen::VectorXd & GroupDifference() const
function ComputeMedianShape
int ComputeMedianShape(
const int ID
)
Returns the median shape for the set of shapes with Group ID equal to the integer argument. For example, ComputeMedianShape(0) returns the median shape for the set of shapes with m_groupIDs == 0. The median shape is defined as the shape with the minimum sum of Euclidean L1 norms to all other shapes in that group. Arguments passed to this function are set to the index number of the median shape for Group A and Group B, respectively.*/
function L1Norm
double L1Norm(
unsigned int a,
unsigned int b
)
Returns the euclidean L1 norm between shape a and b.
function PCALoadings
inline Eigen::MatrixXd & PCALoadings()
Returns the component loadings.
function FishersLDA
inline const Eigen::VectorXd & FishersLDA() const
Returns the Fisher linear discriminant.
function ShapeMatrix
inline const Eigen::MatrixXd & ShapeMatrix() const
Returns the shape matrix.
function RecenteredShape
inline const Eigen::MatrixXd & RecenteredShape() const
Returns the shape with the mean subtracted.
function PercentVarByMode
inline const std::vector< double > & PercentVarByMode() const
function SimpleLinearRegression
int SimpleLinearRegression(
const std::vector< double > & y,
const std::vector< double > & x,
double & a,
double & b
) const
Computes a simple linear regression of the first list of values with respect to the second y=a + bx. Returns the estimated parameters a & b. Returns 0 on success and -1 on fail.*/
function get_compactness
Eigen::VectorXd get_compactness(
std::function< void(float)> progress_callback
)
function get_specificity
Eigen::VectorXd get_specificity(
std::function< void(float)> progress_callback
)
function get_generalization
Eigen::VectorXd get_generalization(
std::function< void(float)> progress_callback
)
function get_group1_matrix
Eigen::MatrixXd get_group1_matrix()
function get_group2_matrix
Eigen::MatrixXd get_group2_matrix()
Public Attributes Documentation
variable VDimension
static constexpr static int VDimension = 3;
Updated on 2022-07-23 at 17:50:03 -0600