IMP logo
IMP Reference Guide  2.22.0
The Integrative Modeling Platform
IMP::bff::DecayScore Class Reference

Class for scoring model fluorescence decay. More...

#include <IMP/bff/DecayScore.h>

+ Inheritance diagram for IMP::bff::DecayScore:

Detailed Description

Class for scoring model fluorescence decay.

This class provides functionality for scoring the fluorescence decay of a model against experimental data. It calculates the score based on various scoring types, such as Poisson, Pearson, Gauss, CNP, and SSWR (Sum of Weighted Squared Residuals). The score can be calculated for a specific range of data points.

Definition at line 34 of file DecayScore.h.

Public Member Functions

 DecayScore (DecayCurve *model=nullptr, DecayCurve *data=nullptr, std::string score_type="poisson", int start=0, int stop=-1)
 Constructs a DecayScore object with the specified model, experimental data, score type, and range of data points. More...
 
 ~DecayScore () override
 Destroys the DecayScore object and frees any allocated memory. More...
 
DecayCurveget_data ()
 
DecayCurveget_model ()
 
double get_score (int start=0, int stop=-1, const char *score_type=nullptr)
 
std::string get_score_type ()
 
std::vector< double > & get_weighted_residuals ()
 
double score (DecayCurve *model=nullptr)
 
void set (DecayCurve *model, DecayCurve *data, std::string score_type="poisson", int start=0, int stop=-1)
 
void set_data (DecayCurve *v)
 
void set_model (DecayCurve *v)
 
void set_score_type (std::string v)
 
- Public Member Functions inherited from IMP::bff::DecayRange
 DecayRange (int start, int stop)
 Constructor. More...
 
virtual ~DecayRange ()=default
 Destructor. More...
 
std::vector< int > get_range (DecayCurve *d=nullptr)
 Get the range as a vector of indices. More...
 
size_t get_start (DecayCurve *d=nullptr) const
 Get the start index of the decay range. More...
 
size_t get_stop (DecayCurve *d=nullptr) const
 Get the stop index of the decay range. More...
 
void set (int start=0, int stop=-1)
 Set the start and stop indices of the decay range. More...
 
void set_range (std::vector< int > v)
 Set the range using a vector of indices. More...
 
void set_start (int v)
 Set the start index of the decay range. More...
 
void set_stop (int v)
 Set the stop index of the decay range. More...
 
void show (std::ostream &out=std::cout) const
 

Constructor & Destructor Documentation

IMP::bff::DecayScore::DecayScore ( DecayCurve model = nullptr,
DecayCurve data = nullptr,
std::string  score_type = "poisson",
int  start = 0,
int  stop = -1 
)

Constructs a DecayScore object with the specified model, experimental data, score type, and range of data points.

Parameters
modelPointer to the model decay curve
dataPointer to the experimental data decay curve
score_typeType of score to calculate (default: "poisson")
startStart index of the range of data points to consider (default: 0)
stopStop index of the range of data points to consider (default: -1, i.e., all points)
IMP::bff::DecayScore::~DecayScore ( )
override

Destroys the DecayScore object and frees any allocated memory.

Definition at line 134 of file DecayScore.h.

Member Function Documentation

DecayCurve* IMP::bff::DecayScore::get_data ( )

Get the experimental data decay curve.

Returns
Pointer to the experimental data decay curve
DecayCurve* IMP::bff::DecayScore::get_model ( )

Get the model decay curve.

Returns
Pointer to the model decay curve
double IMP::bff::DecayScore::get_score ( int  start = 0,
int  stop = -1,
const char *  score_type = nullptr 
)

Calculate the score based on the specified scoring type.

Parameters
startStart index of the range of data points to consider (default: 0)
stopStop index of the range of data points to consider (default: -1, i.e., all points)
score_typeType of score to calculate (default: nullptr, i.e., use the current score type)
Returns
The calculated score
std::string IMP::bff::DecayScore::get_score_type ( )

Get the score type.

Returns
The current score type
std::vector<double>& IMP::bff::DecayScore::get_weighted_residuals ( )

Get the vector of weighted residuals.

Returns
Reference to the vector of weighted residuals
double IMP::bff::DecayScore::score ( DecayCurve model = nullptr)

Evaluate and return the score.

Parameters
modelPointer to the model decay curve (default: nullptr, i.e., use the current model)
Returns
The calculated score
void IMP::bff::DecayScore::set ( DecayCurve model,
DecayCurve data,
std::string  score_type = "poisson",
int  start = 0,
int  stop = -1 
)

Set the model and experimental data decay curves, score type, and range of data points.

Parameters
modelPointer to the model decay curve
dataPointer to the experimental data decay curve
score_typeType of score to calculate (default: "poisson")
startStart index of the range of data points to consider (default: 0)
stopStop index of the range of data points to consider (default: -1, i.e., all points)
void IMP::bff::DecayScore::set_data ( DecayCurve v)

Set the experimental data decay curve.

Parameters
vPointer to the experimental data decay curve
void IMP::bff::DecayScore::set_model ( DecayCurve v)

Set the model decay curve.

Parameters
vPointer to the model decay curve
void IMP::bff::DecayScore::set_score_type ( std::string  v)

Set the score type.

Parameters
vThe score type to set

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