SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
Loading...
Searching...
No Matches
Elemental_Profile_Set Class Reference

Manages a collection of elemental profiles (samples) for source fingerprinting analysis. More...

#include <elemental_profile_set.h>

Inheritance diagram for Elemental_Profile_Set:
Inheritance graph
Collaboration diagram for Elemental_Profile_Set:
Collaboration graph

Public Member Functions

 Elemental_Profile_Set ()
 
 Elemental_Profile_Set (const Elemental_Profile_Set &other)
 
Elemental_Profile_Setoperator= (const Elemental_Profile_Set &other)
 
Elemental_ProfileAppendProfile (const string &name, const Elemental_Profile &profile=Elemental_Profile(), map< string, element_information > *elementinfo=nullptr)
 Add a new sample profile to the set.
 
void AppendProfiles (const Elemental_Profile_Set &profiles, map< string, element_information > *elementinfo)
 Add multiple profiles from another set.
 
void UpdateElementDistributions ()
 Rebuild element distributions from all profiles.
 
Elemental_ProfileGetProfile (const string &name)
 Get profile by sample name (mutable)
 
Elemental_Profile GetProfile (const string &name) const
 Get profile by sample name (const)
 
Elemental_ProfileGetProfile (unsigned int index)
 Get profile by index (mutable)
 
Elemental_Profile GetProfile (unsigned int index) const
 Get profile by index (const)
 
vector< string > GetSampleNames () const
 Get all sample names in the set.
 
vector< string > GetElementNames () const
 Get all element names (from first profile)
 
vector< double > GetAllConcentrationsFor (const string &element_name)
 Get all concentration values for a specific element across samples.
 
vector< double > GetConcentrationsForSample (const string &sample_name) const
 Get all element concentrations for a specific sample.
 
bool ContainsElement (const string &element_name) const
 Check if an element exists in ALL profiles.
 
Elemental_Profile_Set ExtractElements (const vector< string > &element_list) const
 Create subset with only specified elements.
 
Elemental_Profile_Set ExtractChemicalElements (const map< string, element_information > *elementinfo, bool isotopes) const
 Create subset with only chemical elements (and optionally isotopes)
 
Elemental_Profile_Set CreateCorrectedSet (bool exclude_samples, bool exclude_elements, bool omnsizecorrect, const vector< double > &om_size, const map< string, element_information > *elementinfo=nullptr) const
 Create corrected and filtered subset.
 
Elemental_Profile_Set CopyIncludedInAnalysis (bool applyomsizecorrection, const vector< double > &om_size, map< string, element_information > *elementinfo=nullptr)
 Copy only samples marked for inclusion in analysis.
 
Elemental_Profile_Set EliminateSamples (vector< string > samples_to_eliminate, map< string, element_information > *elementinfo) const
 Create subset excluding specified samples.
 
ConcentrationSetGetElementDistribution (const string &element_name)
 Get distribution for a specific element (mutable)
 
ConcentrationSet GetElementDistribution (const string &element_name) const
 Get distribution for a specific element (const)
 
distribution_type GetAssignedDistribution (const string &element_name) const
 Get assigned distribution type for an element.
 
CVector CalculateElementMeans (const vector< string > &element_order=vector< string >()) const
 Calculate mean concentration for each element.
 
CMBMatrix CalculateCovarianceMatrix ()
 Calculate covariance matrix across elements.
 
CMBMatrix CalculateCorrelationMatrix ()
 Calculate correlation matrix across elements.
 
CMBVector CalculateKolmogorovSmirnovStatistics (distribution_type dist_type)
 Calculate Kolmogorov-Smirnov statistics for all elements.
 
double GetMaximum () const
 Get maximum concentration across all elements and samples.
 
double GetMinimum () const
 Get minimum concentration across all elements and samples.
 
double GetEstimatedMu (const string &element) const
 Get estimated mu parameter for an element.
 
double GetEstimatedSigma (const string &element) const
 Get estimated sigma parameter for an element.
 
bool SetEstimatedMu (const string &element, const double &value)
 Set estimated mu parameter for an element.
 
bool SetEstimatedSigma (const string &element, const double &value)
 Set estimated sigma parameter for an element.
 
DistributionGetEstimatedDistribution (const string &element_name)
 Get estimated distribution for an element (for MCMC optimization)
 
DistributionGetFittedDistribution (const string &element_name)
 Get fitted distribution for an element (from data, for likelihood)
 
MultipleLinearRegressionSet BuildRegressionModels (const string &om, const string &d, regression_form form=regression_form::linear, const double &p_value_threshold=0.05)
 Build MLR models for all elements vs OM and particle size.
 
MultipleLinearRegression BuildRegressionModel (const string &element, const string &om, const string &d, regression_form form=regression_form::linear, const double &p_value_threshold=0.05)
 Build MLR model for single element vs OM and particle size.
 
void SetRegressionModels (const string &om, const string &d, regression_form form=regression_form::linear, const double &p_value_threshold=0.05)
 Set regression models (build new)
 
void SetRegressionModels (const MultipleLinearRegressionSet *mlrset)
 Set regression models (copy existing)
 
MultipleLinearRegressionSetGetRegressionModels ()
 Get internal regression model set.
 
ResultItem GetRegressionsAsResult ()
 Get regressions wrapped in ResultItem for display.
 
Elemental_Profile_Set ApplyOrganicMatterAndSizeCorrections (const vector< double > &om_size, map< string, element_information > *elementinfo=nullptr)
 Apply OM and particle size corrections to all profiles.
 
CMBVector CalculateBoxCoxParameters ()
 Calculate optimal Box-Cox lambda for each element.
 
Elemental_Profile_Set ApplyBoxCoxTransform (CMBVector *lambda_vals=nullptr)
 Apply Box-Cox transformation to all profiles.
 
CMBMatrix DetectOutliers (const double &lowerlimit=0, const double &upperlimit=0)
 Detect outliers using Box-Cox transformation and standardization.
 
bool OutlierAnalysisDone () const
 Check if outlier analysis has been performed.
 
vector< string > CheckForNegativeValues (const vector< string > &element_names) const
 Check for elements with negative values.
 
bool SetContribution (const double &value)
 Set contribution value for this source.
 
double GetContribution () const
 Get contribution value.
 
bool SetContributionSoftmax (const double &value)
 Set softmax-transformed contribution.
 
double GetContributionSoftmax () const
 Get softmax-transformed contribution.
 
Elemental_Profile SelectTopElementsAggregate (int n) const
 Select top N elements across all samples (aggregate minimum)
 
CMBVector CalculateDotProduct (const CVector &v) const
 Calculate dot product of each profile with weight vector.
 
CMBMatrix ToMatrix () const
 Convert to matrix format (samples × elements)
 
gsl_matrix * CopyToGSLMatrix () const
 Convert to GSL matrix for statistical functions.
 
string ToString () const override
 Convert object to string representation.
 
QTableWidget * ToTable () override
 Create a Qt table widget representation of the data.
 
bool writetofile (QFile *file) override
 Write object data to a file.
 
QJsonObject toJsonObject () const override
 Serialize object to JSON format.
 
bool ReadFromJsonObject (const QJsonObject &jsonobject) override
 Deserialize object from JSON format.
 
bool Read (const QStringList &strlist) override
 Parse object data from a string list.
 
- Public Member Functions inherited from Interface
 Interface ()
 Default constructor.
 
 Interface (const Interface &intf)
 Copy constructor.
 
Interfaceoperator= (const Interface &intf)
 Assignment operator.
 
string GetNotes () const
 Get the notes/annotations associated with this object.
 
void SetNotes (const string &note)
 Set the notes for this object, replacing any existing notes.
 
void AppendtoNotes (const string &note)
 Append a note to existing notes.
 
void ClearNotes ()
 Clear all notes associated with this object.
 
void SetLimit (_range lowhigh, const double &value)
 Set upper or lower limit for value highlighting.
 
void SetOption (options_key opt, bool val)
 Set a configuration option.
 
bool Option (options_key opt)
 Get the current value of a configuration option.
 
optionsGetOptions ()
 Get reference to the options structure.
 
QString XAxisLabel () const
 Get the X-axis label.
 
QString YAxisLabel () const
 Get the Y-axis label.
 
bool SetXAxisLabel (const QString &label)
 Set the X-axis label.
 
bool SetYAxisLabel (const QString &label)
 Set the Y-axis label.
 

Private Attributes

map< string, ConcentrationSetelement_distributions_
 Concentration distributions for each element.
 
MultipleLinearRegressionSet mlr_vs_om_size_
 MLR models for OM/size corrections.
 
double contribution_ = 0.0
 Source contribution (for CMB)
 
double contribution_softmax_ = 0.0
 Softmax-transformed contribution.
 
bool outlierdone_ = false
 Flag indicating outlier analysis performed.
 

Additional Inherited Members

- Public Attributes inherited from Interface
double lowlimit
 Lower threshold for value highlighting (when enabled)
 
double highlimit
 Upper threshold for value highlighting (when enabled)
 
bool highlightoutsideoflimit = false
 Flag indicating whether to highlight values outside defined limits.
 

Detailed Description

Manages a collection of elemental profiles (samples) for source fingerprinting analysis.

This class stores multiple Elemental_Profile objects (one per sample) and provides:

  • Statistical analysis across samples (distributions, covariance, correlation)
  • Data extraction and filtering operations
  • Organic matter and particle size corrections via multiple linear regression
  • Box-Cox transformations and outlier detection
  • Source contribution tracking for CMB (Chemical Mass Balance) analysis

Definition at line 27 of file elemental_profile_set.h.

Constructor & Destructor Documentation

◆ Elemental_Profile_Set() [1/2]

Elemental_Profile_Set::Elemental_Profile_Set ( )

Definition at line 8 of file elemental_profile_set.cpp.

References string.

◆ Elemental_Profile_Set() [2/2]

Elemental_Profile_Set::Elemental_Profile_Set ( const Elemental_Profile_Set other)

Definition at line 19 of file elemental_profile_set.cpp.

References string.

Member Function Documentation

◆ AppendProfile()

Elemental_Profile * Elemental_Profile_Set::AppendProfile ( const string &  name,
const Elemental_Profile profile = Elemental_Profile(),
map< string, element_information > *  elementinfo = nullptr 
)

◆ AppendProfiles()

void Elemental_Profile_Set::AppendProfiles ( const Elemental_Profile_Set profiles,
map< string, element_information > *  elementinfo 
)

Add multiple profiles from another set.

Parameters
profilesSource profile set
elementinfoOptional element metadata for filtering

Definition at line 221 of file elemental_profile_set.cpp.

References AppendProfile(), and UpdateElementDistributions().

Referenced by SourceSinkData::LumpAllProfileSets().

◆ ApplyBoxCoxTransform()

Elemental_Profile_Set Elemental_Profile_Set::ApplyBoxCoxTransform ( CMBVector lambda_vals = nullptr)

Apply Box-Cox transformation to all profiles.

Definition at line 876 of file elemental_profile_set.cpp.

References ConcentrationSet::ApplyBoxCoxTransform(), CalculateBoxCoxParameters(), distribution, and element_distributions_.

◆ ApplyOrganicMatterAndSizeCorrections()

Elemental_Profile_Set Elemental_Profile_Set::ApplyOrganicMatterAndSizeCorrections ( const vector< double > &  om_size,
map< string, element_information > *  elementinfo = nullptr 
)

Apply OM and particle size corrections to all profiles.

Definition at line 772 of file elemental_profile_set.cpp.

References AppendProfile(), Elemental_Profile::ApplyOrganicMatterAndSizeCorrections(), and mlr_vs_om_size_.

Referenced by CopyIncludedInAnalysis().

◆ BuildRegressionModel()

MultipleLinearRegression Elemental_Profile_Set::BuildRegressionModel ( const string &  element,
const string &  om,
const string &  d,
regression_form  form = regression_form::linear,
const double &  p_value_threshold = 0.05 
)

◆ BuildRegressionModels()

MultipleLinearRegressionSet Elemental_Profile_Set::BuildRegressionModels ( const string &  om,
const string &  d,
regression_form  form = regression_form::linear,
const double &  p_value_threshold = 0.05 
)

Build MLR models for all elements vs OM and particle size.

Definition at line 494 of file elemental_profile_set.cpp.

References BuildRegressionModel(), and GetElementNames().

Referenced by SetRegressionModels().

◆ CalculateBoxCoxParameters()

CMBVector Elemental_Profile_Set::CalculateBoxCoxParameters ( )

Calculate optimal Box-Cox lambda for each element.

Definition at line 794 of file elemental_profile_set.cpp.

References distribution, element_distributions_, and CMBVector::SetLabel().

Referenced by ApplyBoxCoxTransform(), and DetectOutliers().

◆ CalculateCorrelationMatrix()

CMBMatrix Elemental_Profile_Set::CalculateCorrelationMatrix ( )

Calculate correlation matrix across elements.

Definition at line 621 of file elemental_profile_set.cpp.

References CopyToGSLMatrix(), GetElementNames(), CMBMatrix::SetColumnLabel(), and CMBMatrix::SetRowLabel().

◆ CalculateCovarianceMatrix()

CMBMatrix Elemental_Profile_Set::CalculateCovarianceMatrix ( )

Calculate covariance matrix across elements.

Definition at line 578 of file elemental_profile_set.cpp.

References CopyToGSLMatrix(), GetElementNames(), CMBMatrix::SetColumnLabel(), and CMBMatrix::SetRowLabel().

◆ CalculateDotProduct()

CMBVector Elemental_Profile_Set::CalculateDotProduct ( const CVector &  v) const

Calculate dot product of each profile with weight vector.

Definition at line 984 of file elemental_profile_set.cpp.

References CMBVector::SetLabel().

◆ CalculateElementMeans()

CVector Elemental_Profile_Set::CalculateElementMeans ( const vector< string > &  element_order = vector<string>()) const

Calculate mean concentration for each element.

Definition at line 700 of file elemental_profile_set.cpp.

References element_distributions_, and GetElementNames().

◆ CalculateKolmogorovSmirnovStatistics()

CMBVector Elemental_Profile_Set::CalculateKolmogorovSmirnovStatistics ( distribution_type  dist_type)

Calculate Kolmogorov-Smirnov statistics for all elements.

Definition at line 684 of file elemental_profile_set.cpp.

References GetElementDistribution(), GetElementNames(), and CMBVector::SetLabels().

◆ CheckForNegativeValues()

vector< string > Elemental_Profile_Set::CheckForNegativeValues ( const vector< string > &  element_names) const

Check for elements with negative values.

Definition at line 936 of file elemental_profile_set.cpp.

References GetElementDistribution(), and ConcentrationSet::GetMinimum().

◆ ContainsElement()

bool Elemental_Profile_Set::ContainsElement ( const string &  element_name) const

Check if an element exists in ALL profiles.

Definition at line 339 of file elemental_profile_set.cpp.

◆ CopyIncludedInAnalysis()

Elemental_Profile_Set Elemental_Profile_Set::CopyIncludedInAnalysis ( bool  applyomsizecorrection,
const vector< double > &  om_size,
map< string, element_information > *  elementinfo = nullptr 
)

Copy only samples marked for inclusion in analysis.

Definition at line 114 of file elemental_profile_set.cpp.

References AppendProfile(), ApplyOrganicMatterAndSizeCorrections(), mlr_vs_om_size_, and SetRegressionModels().

◆ CopyToGSLMatrix()

gsl_matrix * Elemental_Profile_Set::CopyToGSLMatrix ( ) const

Convert to GSL matrix for statistical functions.

Definition at line 660 of file elemental_profile_set.cpp.

References GetElementNames(), and matrix.

Referenced by CalculateCorrelationMatrix(), and CalculateCovarianceMatrix().

◆ CreateCorrectedSet()

Elemental_Profile_Set Elemental_Profile_Set::CreateCorrectedSet ( bool  exclude_samples,
bool  exclude_elements,
bool  omnsizecorrect,
const vector< double > &  om_size,
const map< string, element_information > *  elementinfo = nullptr 
) const

Create corrected and filtered subset.

Parameters
exclude_samplesIf true, exclude samples marked as excluded
exclude_elementsIf true, exclude elements marked as excluded
omnsizecorrectIf true, apply organic matter and size corrections
om_sizeTarget OM and size values for correction
elementinfoElement metadata for filtering

Definition at line 52 of file elemental_profile_set.cpp.

References AppendProfile(), mlr_vs_om_size_, and SetRegressionModels().

◆ DetectOutliers()

CMBMatrix Elemental_Profile_Set::DetectOutliers ( const double &  lowerlimit = 0,
const double &  upperlimit = 0 
)

Detect outliers using Box-Cox transformation and standardization.

Parameters
lowerlimitLower threshold for standardized values
upperlimitUpper threshold for standardized values
Returns
Matrix of outlier magnitudes

Definition at line 810 of file elemental_profile_set.cpp.

References Interface::AppendtoNotes(), ConcentrationSet::ApplyBoxCoxTransform(), CalculateBoxCoxParameters(), ConcentrationSet::CalculateMean(), ConcentrationSet::CalculateStdDev(), distribution, element_distributions_, outlierdone_, CMBMatrix::SetColumnLabel(), and CMBMatrix::SetRowLabel().

◆ EliminateSamples()

Elemental_Profile_Set Elemental_Profile_Set::EliminateSamples ( vector< string >  samples_to_eliminate,
map< string, element_information > *  elementinfo 
) const

Create subset excluding specified samples.

Definition at line 141 of file elemental_profile_set.cpp.

References AppendProfile(), mlr_vs_om_size_, and SetRegressionModels().

◆ ExtractChemicalElements()

Elemental_Profile_Set Elemental_Profile_Set::ExtractChemicalElements ( const map< string, element_information > *  elementinfo,
bool  isotopes 
) const

Create subset with only chemical elements (and optionally isotopes)

Parameters
elementinfoElement metadata for classification
isotopesWhether to include isotopes

Definition at line 87 of file elemental_profile_set.cpp.

References AppendProfile().

◆ ExtractElements()

Elemental_Profile_Set Elemental_Profile_Set::ExtractElements ( const vector< string > &  element_list) const

Create subset with only specified elements.

Definition at line 101 of file elemental_profile_set.cpp.

References AppendProfile().

◆ GetAllConcentrationsFor()

vector< double > Elemental_Profile_Set::GetAllConcentrationsFor ( const string &  element_name)

Get all concentration values for a specific element across samples.

Definition at line 425 of file elemental_profile_set.cpp.

Referenced by BuildRegressionModel().

◆ GetAssignedDistribution()

distribution_type Elemental_Profile_Set::GetAssignedDistribution ( const string &  element_name) const

Get assigned distribution type for an element.

◆ GetConcentrationsForSample()

vector< double > Elemental_Profile_Set::GetConcentrationsForSample ( const string &  sample_name) const

Get all element concentrations for a specific sample.

Definition at line 444 of file elemental_profile_set.cpp.

Referenced by SourceSinkData::ExtractConcentrationData().

◆ GetContribution()

double Elemental_Profile_Set::GetContribution ( ) const
inline

Get contribution value.

Definition at line 346 of file elemental_profile_set.h.

References contribution_.

Referenced by SourceSinkData::GetContributionVector().

◆ GetContributionSoftmax()

double Elemental_Profile_Set::GetContributionSoftmax ( ) const
inline

Get softmax-transformed contribution.

Definition at line 356 of file elemental_profile_set.h.

References contribution_softmax_.

Referenced by SourceSinkData::GetContributionVectorSoftmax().

◆ GetElementDistribution() [1/2]

ConcentrationSet * Elemental_Profile_Set::GetElementDistribution ( const string &  element_name)

◆ GetElementDistribution() [2/2]

ConcentrationSet Elemental_Profile_Set::GetElementDistribution ( const string &  element_name) const

Get distribution for a specific element (const)

Definition at line 1009 of file elemental_profile_set.cpp.

References element_distributions_.

◆ GetElementNames()

vector< string > Elemental_Profile_Set::GetElementNames ( ) const

◆ GetEstimatedDistribution()

Distribution * Elemental_Profile_Set::GetEstimatedDistribution ( const string &  element_name)

Get estimated distribution for an element (for MCMC optimization)

Definition at line 1020 of file elemental_profile_set.cpp.

References element_distributions_.

Referenced by SourceSinkData::BuildSourceMeanMatrix(), and SourceSinkData::BuildSourceMeanMatrix_Isotopes().

◆ GetEstimatedMu()

double Elemental_Profile_Set::GetEstimatedMu ( const string &  element) const

Get estimated mu parameter for an element.

◆ GetEstimatedSigma()

double Elemental_Profile_Set::GetEstimatedSigma ( const string &  element) const

Get estimated sigma parameter for an element.

◆ GetFittedDistribution()

Distribution * Elemental_Profile_Set::GetFittedDistribution ( const string &  element_name)

Get fitted distribution for an element (from data, for likelihood)

Definition at line 1028 of file elemental_profile_set.cpp.

References element_distributions_.

◆ GetMaximum()

double Elemental_Profile_Set::GetMaximum ( ) const

Get maximum concentration across all elements and samples.

Definition at line 455 of file elemental_profile_set.cpp.

Referenced by GeneralChart::PlotProfileSet().

◆ GetMinimum()

double Elemental_Profile_Set::GetMinimum ( ) const

Get minimum concentration across all elements and samples.

Definition at line 474 of file elemental_profile_set.cpp.

Referenced by GeneralChart::PlotProfileSet().

◆ GetProfile() [1/4]

Elemental_Profile * Elemental_Profile_Set::GetProfile ( const string &  name)

Get profile by sample name (mutable)

Returns
Pointer to profile, or nullptr if not found

Definition at line 375 of file elemental_profile_set.cpp.

References name.

Referenced by SourceSinkData::ObservedDataforSelectedSample(), SourceSinkData::ObservedDataforSelectedSample_Isotope(), and SourceSinkData::ObservedDataforSelectedSample_Isotope_delta().

◆ GetProfile() [2/4]

Elemental_Profile Elemental_Profile_Set::GetProfile ( const string &  name) const

Get profile by sample name (const)

Returns
Copy of profile, or empty profile if not found

Definition at line 399 of file elemental_profile_set.cpp.

References name.

◆ GetProfile() [3/4]

Elemental_Profile * Elemental_Profile_Set::GetProfile ( unsigned int  index)

Get profile by index (mutable)

Returns
Pointer to profile, or nullptr if index out of range

Definition at line 386 of file elemental_profile_set.cpp.

◆ GetProfile() [4/4]

Elemental_Profile Elemental_Profile_Set::GetProfile ( unsigned int  index) const

Get profile by index (const)

Returns
Copy of profile, or empty profile if index out of range

Definition at line 410 of file elemental_profile_set.cpp.

◆ GetRegressionModels()

MultipleLinearRegressionSet * Elemental_Profile_Set::GetRegressionModels ( )

Get internal regression model set.

Definition at line 571 of file elemental_profile_set.cpp.

References mlr_vs_om_size_.

◆ GetRegressionsAsResult()

ResultItem Elemental_Profile_Set::GetRegressionsAsResult ( )

Get regressions wrapped in ResultItem for display.

Definition at line 563 of file elemental_profile_set.cpp.

References mlr_vs_om_size_, mlrset, ResultItem::SetResult(), and ResultItem::SetType().

◆ GetSampleNames()

vector< string > Elemental_Profile_Set::GetSampleNames ( ) const

Get all sample names in the set.

Definition at line 235 of file elemental_profile_set.cpp.

Referenced by SourceSinkData::GetSampleNames(), and MainWindow::on_tree_selectionChanged().

◆ operator=()

◆ OutlierAnalysisDone()

bool Elemental_Profile_Set::OutlierAnalysisDone ( ) const
inline

Check if outlier analysis has been performed.

Definition at line 329 of file elemental_profile_set.h.

References outlierdone_.

◆ Read()

bool Elemental_Profile_Set::Read ( const QStringList &  strlist)
overridevirtual

Parse object data from a string list.

Parameters
strlistList of strings containing the data to parse
Returns
true if parsing was successful, false otherwise

Pure virtual method for text-based deserialization. Each string in the list typically represents one line of input data.

Note
Format and parsing rules are determined by the derived class

Reimplemented from Interface.

Definition at line 330 of file elemental_profile_set.cpp.

◆ ReadFromJsonObject()

bool Elemental_Profile_Set::ReadFromJsonObject ( const QJsonObject &  jsonobject)
overridevirtual

Deserialize object from JSON format.

Parameters
jsonobjectThe JSON object to read from
Returns
true if deserialization was successful, false otherwise

Pure virtual method for JSON deserialization. Derived classes must implement this to reconstruct their data structure from a JSON object.

Warning
Implementations should validate JSON structure and handle missing fields gracefully

Reimplemented from Interface.

Definition at line 311 of file elemental_profile_set.cpp.

References AppendProfile(), and Elemental_Profile::ReadFromJsonObject().

Referenced by SourceSinkData::ReadElementDatafromJsonObject(), and Results::ReadFromJson().

◆ SelectTopElementsAggregate()

Elemental_Profile Elemental_Profile_Set::SelectTopElementsAggregate ( int  n) const

Select top N elements across all samples (aggregate minimum)

Definition at line 954 of file elemental_profile_set.cpp.

References Elemental_Profile::AppendElement(), and CMBVector::Label().

Referenced by Conductor::ExecuteAutoSelect().

◆ SetContribution()

bool Elemental_Profile_Set::SetContribution ( const double &  value)

◆ SetContributionSoftmax()

bool Elemental_Profile_Set::SetContributionSoftmax ( const double &  value)

Set softmax-transformed contribution.

Definition at line 1014 of file elemental_profile_set.cpp.

References contribution_softmax_, and x.

Referenced by SourceSinkData::SetContributionSoftmax().

◆ SetEstimatedMu()

bool Elemental_Profile_Set::SetEstimatedMu ( const string &  element,
const double &  value 
)

Set estimated mu parameter for an element.

◆ SetEstimatedSigma()

bool Elemental_Profile_Set::SetEstimatedSigma ( const string &  element,
const double &  value 
)

Set estimated sigma parameter for an element.

◆ SetRegressionModels() [1/2]

void Elemental_Profile_Set::SetRegressionModels ( const MultipleLinearRegressionSet mlrset)

Set regression models (copy existing)

Definition at line 556 of file elemental_profile_set.cpp.

References mlr_vs_om_size_, and mlrset.

◆ SetRegressionModels() [2/2]

void Elemental_Profile_Set::SetRegressionModels ( const string &  om,
const string &  d,
regression_form  form = regression_form::linear,
const double &  p_value_threshold = 0.05 
)

Set regression models (build new)

Definition at line 547 of file elemental_profile_set.cpp.

References BuildRegressionModels(), and mlr_vs_om_size_.

Referenced by CopyIncludedInAnalysis(), CreateCorrectedSet(), and EliminateSamples().

◆ toJsonObject()

QJsonObject Elemental_Profile_Set::toJsonObject ( ) const
overridevirtual

Serialize object to JSON format.

Returns
QJsonObject containing the serialized data

Pure virtual method for JSON serialization. Derived classes must implement this to convert their data structure to a JSON object suitable for saving to .json files or transmitting over network.

Note
The JSON structure is determined by the derived class

Reimplemented from Interface.

Definition at line 291 of file elemental_profile_set.cpp.

◆ ToMatrix()

CMBMatrix Elemental_Profile_Set::ToMatrix ( ) const

Convert to matrix format (samples × elements)

Definition at line 907 of file elemental_profile_set.cpp.

References GetElementNames(), and matrix.

◆ ToString()

string Elemental_Profile_Set::ToString ( ) const
overridevirtual

Convert object to string representation.

Returns
String representation of the object's data

Pure virtual method that must be implemented by derived classes to provide a human-readable string representation of their data. Typically used for text file export or debugging.

Note
Format is determined by the derived class implementation

Reimplemented from Interface.

Definition at line 250 of file elemental_profile_set.cpp.

References GetElementNames(), and string.

Referenced by writetofile().

◆ ToTable()

QTableWidget * Elemental_Profile_Set::ToTable ( )
overridevirtual

Create a Qt table widget representation of the data.

Returns
Pointer to a newly allocated QTableWidget displaying the data

Pure virtual method that creates a visual table representation of the object's data suitable for display in the Qt GUI. The returned widget is dynamically allocated and should be managed by Qt's parent-child ownership system.

Note
Caller does not need to delete the returned widget if added to a parent
Highlighting based on limit settings is applied if enabled

Reimplemented from Interface.

Definition at line 719 of file elemental_profile_set.cpp.

References GetElementNames(), Interface::highlightoutsideoflimit, Interface::highlimit, and Interface::lowlimit.

◆ UpdateElementDistributions()

void Elemental_Profile_Set::UpdateElementDistributions ( )

Rebuild element distributions from all profiles.

Call this after adding/modifying profiles to update statistical distributions

Definition at line 162 of file elemental_profile_set.cpp.

References element_distributions_.

Referenced by AppendProfiles(), and SourceSinkData::LumpAllProfileSets().

◆ writetofile()

bool Elemental_Profile_Set::writetofile ( QFile *  file)
overridevirtual

Write object data to a file.

Parameters
filePointer to an open QFile object for writing
Returns
true if write was successful, false otherwise

Pure virtual method for file output. Derived classes implement this to write their data to an open file stream in their preferred text format.

Precondition
file must be opened in write mode
Note
File is not closed by this method

Reimplemented from Interface.

Definition at line 281 of file elemental_profile_set.cpp.

References ToString().

Member Data Documentation

◆ contribution_

double Elemental_Profile_Set::contribution_ = 0.0
private

Source contribution (for CMB)

Definition at line 392 of file elemental_profile_set.h.

Referenced by GetContribution(), operator=(), and SetContribution().

◆ contribution_softmax_

double Elemental_Profile_Set::contribution_softmax_ = 0.0
private

Softmax-transformed contribution.

Definition at line 393 of file elemental_profile_set.h.

Referenced by GetContributionSoftmax(), operator=(), and SetContributionSoftmax().

◆ element_distributions_

◆ mlr_vs_om_size_

◆ outlierdone_

bool Elemental_Profile_Set::outlierdone_ = false
private

Flag indicating outlier analysis performed.

Definition at line 394 of file elemental_profile_set.h.

Referenced by DetectOutliers(), operator=(), and OutlierAnalysisDone().


The documentation for this class was generated from the following files: