|
SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
|
Manages a collection of elemental profiles (samples) for source fingerprinting analysis. More...
#include <elemental_profile_set.h>


Public Member Functions | |
| Elemental_Profile_Set () | |
| Elemental_Profile_Set (const Elemental_Profile_Set &other) | |
| Elemental_Profile_Set & | operator= (const Elemental_Profile_Set &other) |
| Elemental_Profile * | AppendProfile (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_Profile * | GetProfile (const string &name) |
| Get profile by sample name (mutable). | |
| Elemental_Profile | GetProfile (const string &name) const |
| Get profile by sample name (const). | |
| Elemental_Profile * | GetProfile (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 (const vector< string > &samples_to_eliminate, map< string, element_information > *elementinfo) const |
| Create subset excluding specified samples. | |
| ConcentrationSet * | GetElementDistribution (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. | |
| Distribution * | GetEstimatedDistribution (const string &element_name) |
| Get estimated distribution for an element (for MCMC optimization). | |
| Distribution * | GetFittedDistribution (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). | |
| MultipleLinearRegressionSet * | GetRegressionModels () |
| 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. | |
| vector< string > | ElementsNotBoxCoxTransformable () const |
| Elements with a zero or negative value, which Box-Cox leaves untransformed. | |
| 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 | ReadFromJsonObject (const QJsonObject &jsonobject, QString &error) |
| Reads every profile, refusing any value that is not a finite number. | |
| 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. | |
| Interface & | operator= (const Interface &intf) |
| Assignment operator. | |
| string | GetNotes () const |
| Get the notes/annotations associated with this object. | |
| void | SetNotes (const string ¬e) |
| Set the notes for this object, replacing any existing notes. | |
| void | AppendtoNotes (const string ¬e) |
| 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. | |
| options & | GetOptions () |
| 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, ConcentrationSet > | element_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. | |
Manages a collection of elemental profiles (samples) for source fingerprinting analysis.
This class stores multiple Elemental_Profile objects (one per sample) and provides:
Definition at line 30 of file elemental_profile_set.h.
| Elemental_Profile_Set::Elemental_Profile_Set | ( | ) |
Definition at line 12 of file elemental_profile_set.cpp.
References Interface::Interface(), contribution_, contribution_softmax_, element_distributions_, mlr_vs_om_size_, and outlierdone_.
Referenced by Elemental_Profile_Set(), AppendProfiles(), ApplyBoxCoxTransform(), ApplyOrganicMatterAndSizeCorrections(), CopyIncludedInAnalysis(), CreateCorrectedSet(), EliminateSamples(), ExtractChemicalElements(), ExtractElements(), operator=(), and SetEstimatedSigma().
| Elemental_Profile_Set::Elemental_Profile_Set | ( | const Elemental_Profile_Set & | other | ) |
Definition at line 23 of file elemental_profile_set.cpp.
References Elemental_Profile_Set(), Interface::Interface(), contribution_, contribution_softmax_, element_distributions_, mlr_vs_om_size_, and outlierdone_.
| Elemental_Profile * Elemental_Profile_Set::AppendProfile | ( | const string & | name, |
| const Elemental_Profile & | profile = Elemental_Profile(), | ||
| map< string, element_information > * | elementinfo = nullptr ) |
Add a new sample profile to the set.
| name | Sample identifier |
| profile | Elemental profile data |
| elementinfo | Optional element metadata for filtering |
Definition at line 183 of file elemental_profile_set.cpp.
References Elemental_Profile::CreateAnalysisProfile(), element_distributions_, and name.
Referenced by AppendProfiles(), ApplyOrganicMatterAndSizeCorrections(), CopyIncludedInAnalysis(), SourceSinkData::CreateCorrectedDataset(), CreateCorrectedSet(), SourceSinkData::DifferentiationPower(), SourceSinkData::DifferentiationPower_P_value(), SourceSinkData::DifferentiationPower_Percentage(), EliminateSamples(), ExtractChemicalElements(), ExtractElements(), SourceSinkData::ExtractSamplesAsProfileSet(), SourceSinkData::GetCalculatedElementMeans(), SourceSinkData::GetCalculatedElementMu(), SourceSinkData::GetCalculatedElementSigma(), SourceSinkData::GetEstimatedElementMean(), SourceSinkData::GetEstimatedElementMu(), SourceSinkData::GetEstimatedElementSigma(), SourceSinkData::GetObservedvsModeledElementalProfile(), SourceSinkData::GetObservedvsModeledElementalProfile_Isotope(), ReadFromJsonObject(), SourceSinkData::ReplaceSourceAsTarget(), and SourceSinkData::TheRest().
| void Elemental_Profile_Set::AppendProfiles | ( | const Elemental_Profile_Set & | profiles, |
| map< string, element_information > * | elementinfo ) |
Add multiple profiles from another set.
| profiles | Source profile set |
| elementinfo | Optional element metadata for filtering |
Definition at line 208 of file elemental_profile_set.cpp.
References Elemental_Profile_Set(), AppendProfile(), and UpdateElementDistributions().
Referenced by SourceSinkData::LumpAllProfileSets().
| Elemental_Profile_Set Elemental_Profile_Set::ApplyBoxCoxTransform | ( | CMBVector * | lambda_vals = nullptr | ) |
Apply Box-Cox transformation to all profiles.
Definition at line 892 of file elemental_profile_set.cpp.
References Elemental_Profile_Set(), ConcentrationSet::ApplyBoxCoxTransform(), CalculateBoxCoxParameters(), distribution, and element_distributions_.
| 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 770 of file elemental_profile_set.cpp.
References Elemental_Profile_Set(), AppendProfile(), Elemental_Profile::ApplyOrganicMatterAndSizeCorrections(), and mlr_vs_om_size_.
Referenced by CopyIncludedInAnalysis().
| 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 ) |
Build MLR model for single element vs OM and particle size.
Definition at line 510 of file elemental_profile_set.cpp.
References GetAllConcentrationsFor(), MultipleLinearRegression::Regress(), MultipleLinearRegression::SetDependentVariableName(), MultipleLinearRegression::SetEquation(), and MultipleLinearRegression::SetPValueThreshold().
Referenced by 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 492 of file elemental_profile_set.cpp.
References BuildRegressionModel(), and GetElementNames().
Referenced by SetRegressionModels().
| CMBVector Elemental_Profile_Set::CalculateBoxCoxParameters | ( | ) |
Calculate optimal Box-Cox lambda for each element.
Definition at line 803 of file elemental_profile_set.cpp.
References distribution, element_distributions_, and CMBVector::SetLabel().
Referenced by ApplyBoxCoxTransform(), and DetectOutliers().
| CMBMatrix Elemental_Profile_Set::CalculateCorrelationMatrix | ( | ) |
Calculate correlation matrix across elements.
Definition at line 619 of file elemental_profile_set.cpp.
References CopyToGSLMatrix(), GetElementNames(), CMBMatrix::SetColumnLabel(), and CMBMatrix::SetRowLabel().
| CMBMatrix Elemental_Profile_Set::CalculateCovarianceMatrix | ( | ) |
Calculate covariance matrix across elements.
Definition at line 576 of file elemental_profile_set.cpp.
References CopyToGSLMatrix(), GetElementNames(), CMBMatrix::SetColumnLabel(), and CMBMatrix::SetRowLabel().
| CMBVector Elemental_Profile_Set::CalculateDotProduct | ( | const CVector & | v | ) | const |
Calculate dot product of each profile with weight vector.
Definition at line 1000 of file elemental_profile_set.cpp.
References CMBVector::SetLabel().
| CVector Elemental_Profile_Set::CalculateElementMeans | ( | const vector< string > & | element_order = vector<string>() | ) | const |
Calculate mean concentration for each element.
Definition at line 698 of file elemental_profile_set.cpp.
References element_distributions_, and GetElementNames().
| CMBVector Elemental_Profile_Set::CalculateKolmogorovSmirnovStatistics | ( | distribution_type | dist_type | ) |
Calculate Kolmogorov-Smirnov statistics for all elements.
Definition at line 682 of file elemental_profile_set.cpp.
References GetElementDistribution(), GetElementNames(), and CMBVector::SetLabels().
| vector< string > Elemental_Profile_Set::CheckForNegativeValues | ( | const vector< string > & | element_names | ) | const |
Check for elements with negative values.
Definition at line 952 of file elemental_profile_set.cpp.
References GetElementDistribution(), and GetMinimum().
| bool Elemental_Profile_Set::ContainsElement | ( | const string & | element_name | ) | const |
Check if an element exists in ALL profiles.
Definition at line 337 of file elemental_profile_set.cpp.
| 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 118 of file elemental_profile_set.cpp.
References Elemental_Profile_Set(), AppendProfile(), ApplyOrganicMatterAndSizeCorrections(), mlr_vs_om_size_, and SetRegressionModels().
| gsl_matrix * Elemental_Profile_Set::CopyToGSLMatrix | ( | ) | const |
Convert to GSL matrix for statistical functions.
Definition at line 658 of file elemental_profile_set.cpp.
References GetElementNames(), and matrix.
Referenced by CalculateCorrelationMatrix(), and CalculateCovarianceMatrix().
| 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.
| exclude_samples | If true, exclude samples marked as excluded |
| exclude_elements | If true, exclude elements marked as excluded |
| omnsizecorrect | If true, apply organic matter and size corrections |
| om_size | Target OM and size values for correction |
| elementinfo | Element metadata for filtering |
Definition at line 56 of file elemental_profile_set.cpp.
References Elemental_Profile_Set(), AppendProfile(), mlr_vs_om_size_, and SetRegressionModels().
| CMBMatrix Elemental_Profile_Set::DetectOutliers | ( | const double & | lowerlimit = 0, |
| const double & | upperlimit = 0 ) |
Detect outliers using Box-Cox transformation and standardization.
| lowerlimit | Lower threshold for standardized values |
| upperlimit | Upper threshold for standardized values |
Definition at line 819 of file elemental_profile_set.cpp.
References ConcentrationSet::ApplyBoxCoxTransform(), ConcentrationSet::BoxCoxTransformValue(), CalculateBoxCoxParameters(), ConcentrationSet::CalculateMean(), ConcentrationSet::CalculateStdDev(), distribution, element_distributions_, outlierdone_, CMBMatrix::SetColumnLabel(), and CMBMatrix::SetRowLabel().
Elements with a zero or negative value, which Box-Cox leaves untransformed.
Definition at line 792 of file elemental_profile_set.cpp.
References distribution, and element_distributions_.
| Elemental_Profile_Set Elemental_Profile_Set::EliminateSamples | ( | const vector< string > & | samples_to_eliminate, |
| map< string, element_information > * | elementinfo ) const |
Create subset excluding specified samples.
Definition at line 145 of file elemental_profile_set.cpp.
References Elemental_Profile_Set(), AppendProfile(), mlr_vs_om_size_, and SetRegressionModels().
| 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).
| elementinfo | Element metadata for classification |
| isotopes | Whether to include isotopes |
Definition at line 91 of file elemental_profile_set.cpp.
References Elemental_Profile_Set(), and AppendProfile().
| Elemental_Profile_Set Elemental_Profile_Set::ExtractElements | ( | const vector< string > & | element_list | ) | const |
Create subset with only specified elements.
Definition at line 105 of file elemental_profile_set.cpp.
References Elemental_Profile_Set(), and AppendProfile().
Get all concentration values for a specific element across samples.
Definition at line 423 of file elemental_profile_set.cpp.
Referenced by BuildRegressionModel().
| distribution_type Elemental_Profile_Set::GetAssignedDistribution | ( | const string & | element_name | ) | const |
Get assigned distribution type for an element.
| vector< double > Elemental_Profile_Set::GetConcentrationsForSample | ( | const string & | sample_name | ) | const |
Get all element concentrations for a specific sample.
Definition at line 442 of file elemental_profile_set.cpp.
Referenced by SourceSinkData::ExtractConcentrationData().
|
inline |
Get contribution value.
Definition at line 356 of file elemental_profile_set.h.
References contribution_.
Referenced by SourceSinkData::GetContributionVector().
|
inline |
Get softmax-transformed contribution.
Definition at line 366 of file elemental_profile_set.h.
References contribution_softmax_.
Referenced by SourceSinkData::GetContributionVectorSoftmax().
| ConcentrationSet * Elemental_Profile_Set::GetElementDistribution | ( | const string & | element_name | ) |
Get distribution for a specific element (mutable).
Definition at line 1017 of file elemental_profile_set.cpp.
References element_distributions_.
Referenced by SourceSinkData::ANOVA(), CalculateKolmogorovSmirnovStatistics(), CheckForNegativeValues(), SourceSinkData::GetElementDistribution(), and SourceSinkData::LogLikelihoodSourceElementalDistributions().
| ConcentrationSet Elemental_Profile_Set::GetElementDistribution | ( | const string & | element_name | ) | const |
Get distribution for a specific element (const).
Definition at line 1025 of file elemental_profile_set.cpp.
References element_distributions_.
Get all element names (from first profile).
Definition at line 354 of file elemental_profile_set.cpp.
Referenced by BuildRegressionModels(), CalculateCorrelationMatrix(), CalculateCovarianceMatrix(), CalculateElementMeans(), CalculateKolmogorovSmirnovStatistics(), CopyToGSLMatrix(), GeneralChart::PlotProfileSet(), ToMatrix(), ToString(), and ToTable().
| Distribution * Elemental_Profile_Set::GetEstimatedDistribution | ( | const string & | element_name | ) |
Get estimated distribution for an element (for MCMC optimization).
Definition at line 1036 of file elemental_profile_set.cpp.
References element_distributions_.
Referenced by SourceSinkData::BuildSourceMeanMatrix(), SourceSinkData::BuildSourceMeanMatrix_Isotopes(), and SourceSinkData::IsotopeBaseMean().
| double Elemental_Profile_Set::GetEstimatedMu | ( | const string & | element | ) | const |
Get estimated mu parameter for an element.
| double Elemental_Profile_Set::GetEstimatedSigma | ( | const string & | element | ) | const |
Get estimated sigma parameter for an element.
| Distribution * Elemental_Profile_Set::GetFittedDistribution | ( | const string & | element_name | ) |
Get fitted distribution for an element (from data, for likelihood).
Definition at line 1044 of file elemental_profile_set.cpp.
References element_distributions_.
Referenced by SourceSinkData::IsotopeBaseMean().
| double Elemental_Profile_Set::GetMaximum | ( | ) | const |
Get maximum concentration across all elements and samples.
Definition at line 453 of file elemental_profile_set.cpp.
Referenced by GeneralChart::PlotProfileSet().
| double Elemental_Profile_Set::GetMinimum | ( | ) | const |
Get minimum concentration across all elements and samples.
Definition at line 472 of file elemental_profile_set.cpp.
Referenced by CheckForNegativeValues(), and GeneralChart::PlotProfileSet().
| Elemental_Profile * Elemental_Profile_Set::GetProfile | ( | const string & | name | ) |
Get profile by sample name (mutable).
Definition at line 373 of file elemental_profile_set.cpp.
References name.
Referenced by SourceSinkData::ObservedDataforSelectedSample(), SourceSinkData::ObservedDataforSelectedSample_Isotope(), and SourceSinkData::ObservedDataforSelectedSample_Isotope_delta().
| Elemental_Profile Elemental_Profile_Set::GetProfile | ( | const string & | name | ) | const |
Get profile by sample name (const).
Definition at line 397 of file elemental_profile_set.cpp.
References name.
| Elemental_Profile * Elemental_Profile_Set::GetProfile | ( | unsigned int | index | ) |
Get profile by index (mutable).
Definition at line 384 of file elemental_profile_set.cpp.
| Elemental_Profile Elemental_Profile_Set::GetProfile | ( | unsigned int | index | ) | const |
Get profile by index (const).
Definition at line 408 of file elemental_profile_set.cpp.
| MultipleLinearRegressionSet * Elemental_Profile_Set::GetRegressionModels | ( | ) |
Get internal regression model set.
Definition at line 569 of file elemental_profile_set.cpp.
References mlr_vs_om_size_.
| ResultItem Elemental_Profile_Set::GetRegressionsAsResult | ( | ) |
Get regressions wrapped in ResultItem for display.
Definition at line 561 of file elemental_profile_set.cpp.
References mlr_vs_om_size_, mlrset, ResultItem::SetResult(), and ResultItem::SetType().
Get all sample names in the set.
Definition at line 222 of file elemental_profile_set.cpp.
Referenced by SourceSinkData::GetSampleNames().
| Elemental_Profile_Set & Elemental_Profile_Set::operator= | ( | const Elemental_Profile_Set & | other | ) |
Definition at line 34 of file elemental_profile_set.cpp.
References Elemental_Profile_Set(), contribution_, contribution_softmax_, element_distributions_, mlr_vs_om_size_, Interface::operator=(), and outlierdone_.
|
inline |
Check if outlier analysis has been performed.
Definition at line 339 of file elemental_profile_set.h.
References outlierdone_.
|
overridevirtual |
Parse object data from a string list.
| strlist | List of strings containing the data to parse |
Pure virtual method for text-based deserialization. Each string in the list typically represents one line of input data.
Reimplemented from Interface.
Definition at line 328 of file elemental_profile_set.cpp.
|
overridevirtual |
Deserialize object from JSON format.
| jsonobject | The JSON object to read from |
Pure virtual method for JSON deserialization. Derived classes must implement this to reconstruct their data structure from a JSON object.
Reimplemented from Interface.
Definition at line 298 of file elemental_profile_set.cpp.
References ReadFromJsonObject().
Referenced by Results::ReadFromJson(), and ReadFromJsonObject().
| bool Elemental_Profile_Set::ReadFromJsonObject | ( | const QJsonObject & | jsonobject, |
| QString & | error ) |
Reads every profile, refusing any value that is not a finite number.
| error | Set to "sample 'S', constituent 'X': <reason>" if a value is refused |
Definition at line 304 of file elemental_profile_set.cpp.
References AppendProfile(), and Elemental_Profile::ReadFromJsonObject().
| Elemental_Profile Elemental_Profile_Set::SelectTopElementsAggregate | ( | int | n | ) | const |
Select top N elements across all samples (aggregate minimum).
Definition at line 970 of file elemental_profile_set.cpp.
References Elemental_Profile::AppendElement(), and CMBVector::Label().
Referenced by Conductor::ExecuteAutoSelect().
| bool Elemental_Profile_Set::SetContribution | ( | const double & | value | ) |
Set contribution value for this source.
Definition at line 1052 of file elemental_profile_set.cpp.
References contribution_, and x.
Referenced by SourceSinkData::InitializeContributionsRandomly(), SourceSinkData::InitializeContributionsRandomlySoftmax(), SourceSinkData::SetContribution(), and SourceSinkData::SetParameterValue().
| bool Elemental_Profile_Set::SetContributionSoftmax | ( | const double & | value | ) |
Set softmax-transformed contribution.
Definition at line 1030 of file elemental_profile_set.cpp.
References contribution_softmax_, and x.
Referenced by SourceSinkData::SetContributionSoftmax().
| bool Elemental_Profile_Set::SetEstimatedMu | ( | const string & | element, |
| const double & | value ) |
Set estimated mu parameter for an element.
| bool Elemental_Profile_Set::SetEstimatedSigma | ( | const string & | element, |
| const double & | value ) |
Set estimated sigma parameter for an element.
References Elemental_Profile_Set(), and linear.
| void Elemental_Profile_Set::SetRegressionModels | ( | const MultipleLinearRegressionSet * | mlrset | ) |
Set regression models (copy existing).
Definition at line 554 of file elemental_profile_set.cpp.
References mlr_vs_om_size_, and mlrset.
| 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 545 of file elemental_profile_set.cpp.
References BuildRegressionModels(), and mlr_vs_om_size_.
Referenced by CopyIncludedInAnalysis(), SourceSinkData::CreateCorrectedDataset(), CreateCorrectedSet(), and EliminateSamples().
|
overridevirtual |
Serialize object to JSON format.
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.
Reimplemented from Interface.
Definition at line 278 of file elemental_profile_set.cpp.
| CMBMatrix Elemental_Profile_Set::ToMatrix | ( | ) | const |
Convert to matrix format (samples × elements).
Definition at line 923 of file elemental_profile_set.cpp.
References GetElementNames(), and matrix.
|
overridevirtual |
Convert object to string representation.
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.
Reimplemented from Interface.
Definition at line 237 of file elemental_profile_set.cpp.
References GetElementNames(), and string.
Referenced by writetofile().
|
overridevirtual |
Create a Qt table widget representation of 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.
Reimplemented from Interface.
Definition at line 717 of file elemental_profile_set.cpp.
References GetElementNames(), Interface::highlightoutsideoflimit, Interface::highlimit, and Interface::lowlimit.
| void Elemental_Profile_Set::UpdateElementDistributions | ( | ) |
Rebuild element distributions from all profiles.
Call this after adding/modifying profiles to update statistical distributions
Definition at line 166 of file elemental_profile_set.cpp.
References element_distributions_.
Referenced by AppendProfiles(), and SourceSinkData::LumpAllProfileSets().
|
overridevirtual |
Write object data to a file.
| file | Pointer to an open QFile object for writing |
Pure virtual method for file output. Derived classes implement this to write their data to an open file stream in their preferred text format.
Reimplemented from Interface.
Definition at line 268 of file elemental_profile_set.cpp.
References ToString().
|
private |
Source contribution (for CMB).
Definition at line 409 of file elemental_profile_set.h.
Referenced by Elemental_Profile_Set(), Elemental_Profile_Set(), GetContribution(), operator=(), and SetContribution().
|
private |
Softmax-transformed contribution.
Definition at line 410 of file elemental_profile_set.h.
Referenced by Elemental_Profile_Set(), Elemental_Profile_Set(), GetContributionSoftmax(), operator=(), and SetContributionSoftmax().
|
private |
Concentration distributions for each element.
Definition at line 407 of file elemental_profile_set.h.
Referenced by Elemental_Profile_Set(), Elemental_Profile_Set(), AppendProfile(), ApplyBoxCoxTransform(), CalculateBoxCoxParameters(), CalculateElementMeans(), DetectOutliers(), ElementsNotBoxCoxTransformable(), GetElementDistribution(), GetElementDistribution(), GetEstimatedDistribution(), GetFittedDistribution(), operator=(), and UpdateElementDistributions().
|
private |
MLR models for OM/size corrections.
Definition at line 408 of file elemental_profile_set.h.
Referenced by Elemental_Profile_Set(), Elemental_Profile_Set(), ApplyOrganicMatterAndSizeCorrections(), CopyIncludedInAnalysis(), CreateCorrectedSet(), EliminateSamples(), GetRegressionModels(), GetRegressionsAsResult(), operator=(), SetRegressionModels(), and SetRegressionModels().
|
private |
Flag indicating outlier analysis performed.
Definition at line 411 of file elemental_profile_set.h.
Referenced by Elemental_Profile_Set(), Elemental_Profile_Set(), DetectOutliers(), operator=(), and OutlierAnalysisDone().