PosteriorErrorProbabilityModel#

class pyopenms.PosteriorErrorProbabilityModel#

Bases: object

Cython implementation of _PosteriorErrorProbabilityModel

Original C++ documentation is available here

– Inherits from [‘DefaultParamHandler’]

__init__(self) None#

Methods

__init__(self)

computeLogLikelihood(self, ...)

Computes the Maximum Likelihood with a log-likelihood function

computeProbability(self, score)

Returns the computed posterior error probability for a given score

fillDensities(self, x_scores, ...)

Writes the distributions densities into the two vectors for a set of scores.

fillLogDensities(self, x_scores, ...)

Writes the log distributions densities into the two vectors for a set of scores.

fit

Overload:

getBothGnuplotFormula(self, incorrect, correct)

Returns the gnuplot formula of the fitted mixture distribution

getCorrectlyAssignedFitResult(self)

Returns estimated parameters for correctly assigned sequences.

getDefaults(self)

Returns the default parameters

getGaussGnuplotFormula(self, params)

Returns the gnuplot formula of the fitted gauss distribution

getGumbelGnuplotFormula(self, params)

Returns the gnuplot formula of the fitted gumbel distribution

getIncorrectlyAssignedFitResult(self)

Returns estimated parameters for correctly assigned sequences.

getName(self)

Returns the name

getNegativePrior(self)

Returns the estimated negative prior probability

getParameters(self)

Returns the parameters

getSmallestScore(self)

Returns the smallest score used in the last fit

getSubsections(self)

initPlots(self, x_scores)

Initializes the plots

plotTargetDecoyEstimation(self, target, decoy)

Plots the estimated distribution against target and decoy hits

pos_neg_mean_weighted_posteriors(self, ...)

setName(self, in_0)

Sets the name

setParameters(self, param)

Sets the parameters

tryGnuplot(self, gp_file)

computeLogLikelihood(self, incorrect_density: List[float], correct_density: List[float]) float#

Computes the Maximum Likelihood with a log-likelihood function

computeProbability(self, score: float) float#

Returns the computed posterior error probability for a given score

fillDensities(self, x_scores: List[float], incorrect_density: List[float], correct_density: List[float]) None#

Writes the distributions densities into the two vectors for a set of scores. Incorrect_densities represent the incorrectly assigned sequences

fillLogDensities(self, x_scores: List[float], incorrect_density: List[float], correct_density: List[float]) None#

Writes the log distributions densities into the two vectors for a set of scores. Incorrect_densities represent the incorrectly assigned sequences

fit()#

Overload:

fit(self, search_engine_scores: List[float], outlier_handling: bytes | str | String) bool

Fits the distributions to the data points(search_engine_scores). Estimated parameters for the distributions are saved in member variables computeProbability can be used afterwards Uses two Gaussians to fit. And Gauss+Gauss or Gumbel+Gauss to plot and calculate final probabilities

Parameters:

search_engine_scores – A vector which holds the data points

Returns:

true if algorithm has run through. Else false will be returned. In that case no plot and no probabilities are calculated

Overload:

fit(self, search_engine_scores: List[float], probabilities: List[float], outlier_handling: bytes | str | String) bool

Fits the distributions to the data points(search_engine_scores). Estimated parameters for the distributions are saved in member variables computeProbability can be used afterwards Uses two Gaussians to fit. And Gauss+Gauss or Gumbel+Gauss to plot and calculate final probabilities

Parameters:
  • search_engine_scores – A vector which holds the data points

  • probabilities – A vector which holds the probability for each data point after running this function. If it has some content it will be overwritten

Returns:

true if algorithm has run through. Else false will be returned. In that case no plot and no probabilities are calculated

getBothGnuplotFormula(self, incorrect: GaussFitResult, correct: GaussFitResult) bytes | str | String#

Returns the gnuplot formula of the fitted mixture distribution

getCorrectlyAssignedFitResult(self) GaussFitResult#

Returns estimated parameters for correctly assigned sequences. Fit should be used before

getDefaults(self) Param#

Returns the default parameters

getGaussGnuplotFormula(self, params: GaussFitResult) bytes | str | String#

Returns the gnuplot formula of the fitted gauss distribution

getGumbelGnuplotFormula(self, params: GaussFitResult) bytes | str | String#

Returns the gnuplot formula of the fitted gumbel distribution

getIncorrectlyAssignedFitResult(self) GaussFitResult#

Returns estimated parameters for correctly assigned sequences. Fit should be used before

getName(self) bytes | str | String#

Returns the name

getNegativePrior(self) float#

Returns the estimated negative prior probability

getParameters(self) Param#

Returns the parameters

getSmallestScore(self) float#

Returns the smallest score used in the last fit

getSubsections(self) List[bytes]#
initPlots(self, x_scores: List[float]) TextFile#

Initializes the plots

plotTargetDecoyEstimation(self, target: List[float], decoy: List[float]) None#

Plots the estimated distribution against target and decoy hits

pos_neg_mean_weighted_posteriors(self, x_scores: List[float], incorrect_posteriors: List[float]) List[float, float]#
setName(self, in_0: bytes | str | String) None#

Sets the name

setParameters(self, param: Param) None#

Sets the parameters

tryGnuplot(self, gp_file: bytes | str | String) None#