35 #ifndef OPENMS_MATH_STATISTICS_POSTERIORERRORPROBABILITYMODEL_H 36 #define OPENMS_MATH_STATISTICS_POSTERIORERRORPROBABILITYMODEL_H 80 bool fit(std::vector<double> & search_engine_scores);
89 bool fit(std::vector<double> & search_engine_scores, std::vector<double> & probabilities);
92 void fillDensities(std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density);
94 double computeMaxLikelihood(std::vector<double> & incorrect_density, std::vector<double> & correct_density);
96 double one_minus_sum_post(std::vector<double> & incorrect_density, std::vector<double> & correct_density);
98 double sum_post(std::vector<double> & incorrect_density, std::vector<double> & correct_density);
100 double sum_pos_x0(std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density);
102 double sum_neg_x0(std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density);
104 double sum_pos_sigma(std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density,
double positive_mean);
106 double sum_neg_sigma(std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density,
double positive_mean);
112 return correctly_assigned_fit_param_;
118 return incorrectly_assigned_fit_param_;
124 return negative_prior_;
130 return params.
A * exp(-1.0 * pow(x - params.
x0, 2) / (2 * pow(params.
sigma, 2)));
136 double z = exp((params.
x0 - x) / params.
sigma);
137 return (z * exp(-1 * z)) / params.
sigma;
144 double computeProbability(
double score);
147 TextFile initPlots(std::vector<double> & x_scores);
159 void plotTargetDecoyEstimation(std::vector<double> & target, std::vector<double> & decoy);
164 return smallest_score_;
168 void tryGnuplot(
const String& gp_file);
200 #endif // OPENMS_MATH_STATISTICS_POSTERIORERRORPROBABILITYMODEL_H
A more convenient string class.
Definition: String.h:57
double max_incorrectly_
peak of the incorrectly assigned sequences distribution
Definition: PosteriorErrorProbabilityModel.h:182
double x0
parameter x0 of Gaussian distribution (center position)
Definition: GaussFitter.h:76
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
double sigma
parameter sigma of Gaussian distribution (width)
Definition: GaussFitter.h:79
GaussFitter::GaussFitResult incorrectly_assigned_fit_param_
stores parameters for incorrectly assigned sequences. If gumbel fit was used, A can be ignored...
Definition: PosteriorErrorProbabilityModel.h:176
double A
parameter A of Gaussian distribution (amplitude)
Definition: GaussFitter.h:73
double getNegativePrior() const
returns the estimated negative prior probability.
Definition: PosteriorErrorProbabilityModel.h:122
double getSmallestScore()
returns the smallest score used in the last fit
Definition: PosteriorErrorProbabilityModel.h:162
double max_correctly_
peak of the gauss distribution (correctly assigned sequences)
Definition: PosteriorErrorProbabilityModel.h:184
double getGumbel(double x, const GaussFitter::GaussFitResult ¶ms)
computes the gumbel density at position x with parameters params.
Definition: PosteriorErrorProbabilityModel.h:134
GaussFitter::GaussFitResult getIncorrectlyAssignedFitResult() const
returns estimated parameters for correctly assigned sequences. Fit should be used before...
Definition: PosteriorErrorProbabilityModel.h:116
GaussFitter::GaussFitResult getCorrectlyAssignedFitResult() const
returns estimated parameters for correctly assigned sequences. Fit should be used before...
Definition: PosteriorErrorProbabilityModel.h:110
double getGauss(double x, const GaussFitter::GaussFitResult ¶ms)
computes the gaussian density at position x with parameters params.
Definition: PosteriorErrorProbabilityModel.h:128
GaussFitter::GaussFitResult correctly_assigned_fit_param_
stores gauss parameters
Definition: PosteriorErrorProbabilityModel.h:178
struct of parameters of a Gaussian distribution
Definition: GaussFitter.h:64
Implements a mixture model of the inverse gumbel and the gauss distribution or a gaussian mixture...
Definition: PosteriorErrorProbabilityModel.h:63
double negative_prior_
stores final prior probability for negative peptides
Definition: PosteriorErrorProbabilityModel.h:180
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
double smallest_score_
smallest score which was used for fitting the model
Definition: PosteriorErrorProbabilityModel.h:186
This class provides some basic file handling methods for text files.
Definition: TextFile.h:47