SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
Loading...
Searching...
No Matches
conductor.h
Go to the documentation of this file.
1#ifndef CONDUCTOR_H
2#define CONDUCTOR_H
3
4#include <string>
5#include <map>
6#include <vector>
7#include <memory>
8
9#include "sourcesinkdata.h"
10#include "GA.h"
11#include "MCMC.h"
12#include "results.h"
13
14class MainWindow;
15class QString;
16
39{
40public:
46
69 bool Execute(const std::string& command, std::map<std::string, std::string> arguments);
70
75 SourceSinkData* Data() { return data; }
76
81 void SetData(SourceSinkData* _data) { data = _data; }
82
96 Results* GetResults() { return new Results(results); }
97
102 void SetWorkingFolder(const QString& wf) { workingfolder = wf; }
103
108 QString WorkingFolder() const { return workingfolder; }
109
124
136 bool CheckNegativeElements(std::map<std::string, std::vector<std::string>> negative_elements);
137
138private:
140 std::unique_ptr<CGA<SourceSinkData>> GA;
141 std::unique_ptr<CMCMC<SourceSinkData>> MCMC;
145
160 bool ExecuteGA(const std::map<std::string, std::string>& arguments);
161
175 bool ExecuteGA_FixedProfile(const std::map<std::string, std::string>& arguments);
176
190 bool ExecuteGA_NoTargets(const std::map<std::string, std::string>& arguments);
191
206 bool ExecuteLevenbergMarquardt(const std::map<std::string, std::string>& arguments);
207
221 bool ExecuteLevenbergMarquardtBatch(const std::map<std::string, std::string>& arguments);
222
237 bool ExecuteOMSizeCorrect(const std::map<std::string, std::string>& arguments);
238
255 bool ExecuteMLR(const std::map<std::string, std::string>& arguments);
256
268 bool ExecuteCovarianceMatrix(const std::map<std::string, std::string>& arguments);
269
286 bool ExecuteCorrelationMatrix(const std::map<std::string, std::string>& arguments);
287
305 bool ExecuteDFA(const std::map<std::string, std::string>& arguments);
306
323 bool ExecuteDFAOnevsRest(const std::map<std::string, std::string>& arguments);
340 bool ExecuteDFAM(const std::map<std::string, std::string>& arguments);
341
360 bool ExecuteSDFA(const std::map<std::string, std::string>& arguments);
361
380 bool ExecuteSDFAM(const std::map<std::string, std::string>& arguments);
381
399 bool ExecuteSDFAOnevsRest(const std::map<std::string, std::string>& arguments);
400
414 bool ExecuteKolmogorovSmirnov(const std::map<std::string, std::string>& arguments);
415
430 bool ExecuteKolmogorovSmirnovIndividual(const std::map<std::string, std::string>& arguments);
431
448 bool ExecuteCMBBayesian(const std::map<std::string, std::string>& arguments);
449
464 bool ExecuteCMBBayesianBatch(const std::map<std::string, std::string>& arguments);
465
482 bool ExecuteTestCMBBayesian(const std::map<std::string, std::string>& arguments);
483
502 bool ExecuteDistributionFitting(const std::map<std::string, std::string>& arguments);
503
520 bool ExecuteBracketingAnalysis(const std::map<std::string, std::string>& arguments);
521
538 bool ExecuteBracketingAnalysisBatch(const std::map<std::string, std::string>& arguments);
539
552 bool ExecuteBoxCox(const std::map<std::string, std::string>& arguments);
553
570 bool ExecuteOutlierAnalysis(const std::map<std::string, std::string>& arguments);
571
591 bool ExecuteEDP(const std::map<std::string, std::string>& arguments);
592
611 bool ExecuteEDPM(const std::map<std::string, std::string>& arguments);
612
634 bool ExecuteANOVA(const std::map<std::string, std::string>& arguments);
635
654 bool ExecuteErrorAnalysis(const std::map<std::string, std::string>& arguments);
655
673 bool ExecuteSourceVerify(const std::map<std::string, std::string>& arguments);
674
692 bool ExecuteAutoSelect(const std::map<std::string, std::string>& arguments);
693};
694
695#endif // CONDUCTOR_H
Orchestrates execution of source apportionment analysis operations.
Definition conductor.h:39
bool ExecuteOutlierAnalysis(const std::map< std::string, std::string > &arguments)
Executes outlier detection analysis for a source/target group.
bool ExecuteTestCMBBayesian(const std::map< std::string, std::string > &arguments)
Executes MCMC test with a simple analytical model.
bool ExecuteCMBBayesian(const std::map< std::string, std::string > &arguments)
Executes Bayesian Chemical Mass Balance using MCMC sampling.
bool ExecuteDFAM(const std::map< std::string, std::string > &arguments)
Executes multi-way Discriminant Function Analysis across all groups.
bool ExecuteDFA(const std::map< std::string, std::string > &arguments)
Executes Discriminant Function Analysis between two groups.
bool ExecuteSDFAM(const std::map< std::string, std::string > &arguments)
Executes multi-way Stepwise Discriminant Function Analysis across all groups.
bool ExecuteBoxCox(const std::map< std::string, std::string > &arguments)
Calculates optimal Box-Cox transformation parameters.
bool ExecuteKolmogorovSmirnovIndividual(const std::map< std::string, std::string > &arguments)
Executes Kolmogorov-Smirnov test for a single constituent in a group.
bool CheckNegativeElements(SourceSinkData *data=nullptr)
Validates that all element concentrations are non-negative.
bool ExecuteCMBBayesianBatch(const std::map< std::string, std::string > &arguments)
Executes Bayesian Chemical Mass Balance across all target samples.
bool ExecuteAutoSelect(const std::map< std::string, std::string > &arguments)
Executes automatic element selection based on discriminant power.
bool ExecuteSDFA(const std::map< std::string, std::string > &arguments)
Executes Stepwise Discriminant Function Analysis between two groups.
Results * GetResults()
Creates and returns a heap-allocated copy of current results.
Definition conductor.h:96
bool ExecuteBracketingAnalysisBatch(const std::map< std::string, std::string > &arguments)
Executes bracketing analysis across all target samples.
void SetWorkingFolder(const QString &wf)
Sets the working directory for output files.
Definition conductor.h:102
bool ExecuteANOVA(const std::map< std::string, std::string > &arguments)
Executes Analysis of Variance (ANOVA) for element discrimination.
QString workingfolder
Output directory path.
Definition conductor.h:143
std::unique_ptr< CGA< SourceSinkData > > GA
Genetic Algorithm optimizer (owned)
Definition conductor.h:140
bool ExecuteGA_NoTargets(const std::map< std::string, std::string > &arguments)
Executes Genetic Algorithm disregarding target constraints.
bool ExecuteGA(const std::map< std::string, std::string > &arguments)
Executes Genetic Algorithm optimization.
bool ExecuteSourceVerify(const std::map< std::string, std::string > &arguments)
Executes source verification analysis.
bool ExecuteGA_FixedProfile(const std::map< std::string, std::string > &arguments)
Executes Genetic Algorithm with fixed elemental profiles.
void SetData(SourceSinkData *_data)
Sets the SourceSinkData for analysis.
Definition conductor.h:81
bool ExecuteMLR(const std::map< std::string, std::string > &arguments)
Executes multiple linear regression versus organic matter and particle size.
MainWindow * mainwindow
Non-owning pointer to parent window.
Definition conductor.h:144
bool ExecuteDistributionFitting(const std::map< std::string, std::string > &arguments)
Executes distribution fitting analysis for a constituent.
bool ExecuteLevenbergMarquardtBatch(const std::map< std::string, std::string > &arguments)
Executes Levenberg-Marquardt optimization across all target samples.
bool ExecuteKolmogorovSmirnov(const std::map< std::string, std::string > &arguments)
Executes Kolmogorov-Smirnov goodness-of-fit test for a source/target group.
bool ExecuteErrorAnalysis(const std::map< std::string, std::string > &arguments)
Executes bootstrap error analysis for uncertainty quantification.
SourceSinkData * Data()
Returns pointer to the current SourceSinkData.
Definition conductor.h:75
SourceSinkData * data
Non-owning pointer to analysis data.
Definition conductor.h:139
bool ExecuteSDFAOnevsRest(const std::map< std::string, std::string > &arguments)
Executes Stepwise Discriminant Function Analysis for one group versus all others.
bool Execute(const std::string &command, std::map< std::string, std::string > arguments)
Executes a specified analysis command with given parameters.
Definition conductor.cpp:18
bool ExecuteBracketingAnalysis(const std::map< std::string, std::string > &arguments)
Executes bracketing analysis for a single target sample.
bool ExecuteDFAOnevsRest(const std::map< std::string, std::string > &arguments)
Executes Discriminant Function Analysis for one group versus all others.
bool ExecuteCovarianceMatrix(const std::map< std::string, std::string > &arguments)
Calculates covariance matrix for a source or target group.
Results results
Current analysis results (cleared each Execute)
Definition conductor.h:142
QString WorkingFolder() const
Returns the current working directory path.
Definition conductor.h:108
bool ExecuteOMSizeCorrect(const std::map< std::string, std::string > &arguments)
Executes organic matter and particle size correction.
bool ExecuteLevenbergMarquardt(const std::map< std::string, std::string > &arguments)
Executes Levenberg-Marquardt nonlinear optimization.
bool ExecuteEDP(const std::map< std::string, std::string > &arguments)
Calculates two-way element discriminant power between two groups.
bool ExecuteEDPM(const std::map< std::string, std::string > &arguments)
Calculates multi-way element discriminant power across all groups.
bool ExecuteCorrelationMatrix(const std::map< std::string, std::string > &arguments)
Calculates correlation matrix for a source or target group.
std::unique_ptr< CMCMC< SourceSinkData > > MCMC
MCMC sampler (owned)
Definition conductor.h:141
Main application window for SedSAT3 source apportionment analysis.
Definition mainwindow.h:41