COPASI API
4.40.278
|
#include <CExperiment.h>
Public Member Functions | |
bool | calculateStatistics () |
bool | calculateWeights () |
CExperiment (const CCopasiParameterGroup &group, const CDataContainer *pParent) | |
CExperiment (const CDataContainer *pParent, const std::string &name="Experiment") | |
CExperiment (const CExperiment &src, const CDataContainer *pParent) | |
bool | compile (const CMathContainer *pMathContainer) |
virtual bool | elevateChildren () |
size_t | extendedTimeSeriesSize () const |
void | fixBuild55 () |
const std::vector< std::string > & | getColumnNames () const |
size_t | getColumnValidValueCount (const CObjectInterface *pObject) const |
C_FLOAT64 | getDefaultScale (const CObjectInterface *pObject) const |
const CMatrix< C_FLOAT64 > & | getDependentData () const |
const std::map< const CObjectInterface *, size_t > & | getDependentObjectsMap () const |
const C_FLOAT64 & | getErrorMean () const |
const C_FLOAT64 & | getErrorMeanSD () const |
C_FLOAT64 | getErrorMeanSD (const CObjectInterface *pObject, const C_FLOAT64 &errorMean) const |
C_FLOAT64 | getErrorSum (const CObjectInterface *pObject) const |
const CTaskEnum::Task & | getExperimentType () const |
const std::string & | getFileName () const |
const std::string & | getFileNameOnly () const |
const unsigned C_INT32 & | getFirstRow () const |
const CDataVector< CFittingPoint > & | getFittingPoints () const |
const unsigned C_INT32 & | getHeaderRow () const |
const CMatrix< C_FLOAT64 > & | getIndependentData () const |
const CObjectInterface::ObjectSet & | getIndependentObjects () const |
const unsigned C_INT32 & | getLastRow () const |
bool | getNormalizeWeightsPerExperiment () const |
const unsigned C_INT32 & | getNumColumns () const |
size_t | getNumDataRows () const |
const C_FLOAT64 & | getObjectiveValue () const |
C_FLOAT64 | getObjectiveValue (const CObjectInterface *pObject) const |
CExperimentObjectMap & | getObjectMap () |
const CExperimentObjectMap & | getObjectMap () const |
const C_FLOAT64 & | getRMS () const |
C_FLOAT64 | getRMS (const CObjectInterface *pObject) const |
const C_FLOAT64 * | getScale (const CObjectInterface *pObject) const |
const CMatrix< C_FLOAT64 > & | getScalingMatrix () const |
const std::string & | getSeparator () const |
const CVector< C_FLOAT64 > & | getTimeData () const |
size_t | getTotalValueCount () const |
size_t | getValidValueCount () const |
const WeightMethod & | getWeightMethod () const |
size_t | guessColumnNumber () const |
void | initExtendedTimeSeries (size_t s) |
const bool & | isRowOriented () const |
CExperiment & | operator= (const CExperiment &rhs) |
virtual void | printResult (std::ostream *ostream) const |
bool | read (std::istream &in, size_t ¤tLine) |
bool | readColumnNames () |
bool | setExperimentType (const CTaskEnum::Task &type) |
bool | setFileName (const std::string &fileName) |
bool | setFirstRow (const unsigned C_INT32 &firstRow) |
bool | setHeaderRow (const unsigned C_INT32 &headerRow) |
bool | setIsRowOriented (const bool &isRowOriented) |
bool | setLastRow (const unsigned C_INT32 &lastRow) |
void | setNormalizeWeightsPerExperiment (bool flag) |
bool | setNumColumns (const unsigned C_INT32 &cols) |
bool | setSeparator (const std::string &seperator) |
bool | setWeightMethod (const WeightMethod &weightMethod) |
void | storeExtendedTimeSeriesData (C_FLOAT64 time) |
C_FLOAT64 | sumOfSquares (const size_t &index, C_FLOAT64 *&residuals) const |
C_FLOAT64 | sumOfSquaresStore (const size_t &index, C_FLOAT64 *&dependentValues) |
void | updateFittedPoints () |
void | updateFittedPointValues (const size_t &index) |
void | updateFittedPointValuesFromExtendedTimeSeries (const size_t &index) |
bool | updateModelWithIndependentData (const size_t &index) |
virtual | ~CExperiment () |
Public Member Functions inherited from CCopasiParameterGroup | |
bool | addGroup (const std::string &name) |
void | addParameter (CCopasiParameter *pParameter) |
bool | addParameter (const CCopasiParameter ¶meter) |
bool | addParameter (const std::string &name, const CCopasiParameter::Type type, const CCopasiParameter::UserInterfaceFlag &flag=CCopasiParameter::UserInterfaceFlag::All) |
template<class CType > | |
bool | addParameter (const std::string &name, const CCopasiParameter::Type type, const CType &value, const CCopasiParameter::UserInterfaceFlag &flag=CCopasiParameter::UserInterfaceFlag::All) |
virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
CCopasiParameterGroup * | assertGroup (const std::string &name, const CCopasiParameter::UserInterfaceFlag &flag=CCopasiParameter::UserInterfaceFlag::All) |
template<class CType > | |
CType * | assertParameter (const std::string &name, const CCopasiParameter::Type type, const CType &defaultValue, const CCopasiParameter::UserInterfaceFlag &flag=CCopasiParameter::UserInterfaceFlag::All) |
index_iterator | beginIndex () const |
const_name_iterator | beginName () const |
CCopasiParameterGroup (const CCopasiParameterGroup &src, const CDataContainer *pParent=NULL) | |
CCopasiParameterGroup (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &objectType="ParameterGroup") | |
void | clear () |
virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const |
index_iterator | endIndex () const |
const_name_iterator | endName () const |
CCopasiParameterGroup & | getElementTemplates () |
const CCopasiParameterGroup & | getElementTemplates () const |
CCopasiParameterGroup * | getGroup (const size_t &index) |
const CCopasiParameterGroup * | getGroup (const size_t &index) const |
CCopasiParameterGroup * | getGroup (const std::string &name) |
const CCopasiParameterGroup * | getGroup (const std::string &name) const |
virtual size_t | getIndex (const CDataObject *pObject) const |
size_t | getIndex (const std::string &name) const |
std::string | getKey (const size_t &index) const |
std::string | getKey (const std::string &name) const |
virtual const std::string & | getName (const size_t &index) const |
virtual const CObjectInterface * | getObject (const CCommonName &cn) const |
CCopasiParameter * | getParameter (const size_t &index) |
const CCopasiParameter * | getParameter (const size_t &index) const |
CCopasiParameter * | getParameter (std::string name) |
const CCopasiParameter * | getParameter (std::string name) const |
CCopasiParameter::Type | getType (const size_t &index) const |
CCopasiParameter::Type | getType (const std::string &name) const |
std::string | getUniqueParameterName (const CCopasiParameter *pParameter) const |
template<class CType > | |
CType & | getValue (const size_t &index) |
template<class CType > | |
const CType & | getValue (const size_t &index) const |
template<class CType > | |
CType & | getValue (const std::string &name) |
template<class CType > | |
const CType & | getValue (const std::string &name) const |
bool | haveTemplate () const |
virtual CUndoObjectInterface * | insert (const CData &data) |
CCopasiParameterGroup & | operator= (const CCopasiParameterGroup &rhs) |
virtual void | print (std::ostream *ostream) const |
virtual bool | remove (CDataObject *pObject) |
bool | removeParameter (CCopasiParameter *pParameter) |
bool | removeParameter (const size_t &index) |
bool | removeParameter (const std::string &name) |
virtual void | setUserInterfaceFlag (const UserInterfaceFlag &flag) |
template<class CType > | |
bool | setValue (const size_t &index, const CType &value) |
template<class CType > | |
bool | setValue (const std::string &name, const CType &value) |
size_t | size (const UserInterfaceFlag &require=UserInterfaceFlag::None, const UserInterfaceFlag &exclude=UserInterfaceFlag::None) const |
bool | swap (const size_t &iFrom, const size_t &iTo) |
bool | swap (index_iterator &from, index_iterator &to) |
virtual CData | toData () const |
virtual void | updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject) |
virtual | ~CCopasiParameterGroup () |
Public Member Functions inherited from CCopasiParameter | |
CCopasiParameter (const CCopasiParameter &src, const CDataContainer *pParent) | |
CCopasiParameter (const std::string &name, const Type &type, const void *pValue=NULL, const CDataContainer *pParent=NO_PARENT, const std::string &objectType="Parameter") | |
virtual CCommonName | getCN () const override |
template<class CType > | |
const CType & | getDefault () const |
virtual const std::string & | getKey () const override |
virtual std::string | getObjectDisplayName () const override |
const CCopasiParameter::Type & | getType () const |
const UserInterfaceFlag & | getUserInterfaceFlag () const |
template<class CType > | |
std::vector< std::pair< CType, CType > > & | getValidValues () |
template<class CType > | |
const std::vector< std::pair< CType, CType > > & | getValidValues () const |
void * | getValidValuesPointer () const |
template<class CType > | |
CType & | getValue () |
template<class CType > | |
const CType & | getValue () const |
virtual void * | getValuePointer () const override |
CDataObject * | getValueReference () const |
bool | hasValidValues () const |
bool | isBasic () const |
bool | isDefault () const |
bool | isEditable () const |
bool | isUnsupported () const |
bool | isValidValue (const bool &value) const |
bool | isValidValue (const C_FLOAT64 &value) const |
bool | isValidValue (const C_INT32 &value) const |
bool | isValidValue (const CCommonName &value) const |
template<class CType > | |
bool | isValidValue (const CType &) const |
bool | isValidValue (const std::string &value) const |
bool | isValidValue (const std::vector< CCopasiParameter * > &value) const |
bool | isValidValue (const unsigned C_INT32 &value) const |
CCopasiParameter & | operator= (const CCopasiParameter &rhs) |
template<class CType > | |
bool | setDefault (const CType &defaultValue) |
bool | setDefault (const std::vector< CCopasiParameter * > &defaultValue) |
virtual bool | setObjectParent (const CDataContainer *pParent) override |
template<class CType , class Enum > | |
bool | setValidValues (const CEnumAnnotation< CType, Enum > &validValues) |
template<class CType > | |
bool | setValidValues (const std::vector< std::pair< CType, CType > > &validValues) |
template<class CType > | |
bool | setValue (const CType &value) |
bool | setValue (const std::vector< CCopasiParameter * > &value) |
virtual | ~CCopasiParameter () |
Public Member Functions inherited from CDataContainer | |
virtual bool | add (CDataObject *pObject, const bool &adopt=true) |
virtual bool | appendDeletedDependentData (CUndoData &undoData) const |
CDataContainer (const CDataContainer &src, const CDataContainer *pParent) | |
CDataContainer (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
virtual std::string | getChildObjectUnits (const CDataObject *pObject) const |
void | getDescendants (CDataObject::DataObjectSet &descendants, const bool &recursive=false) const |
virtual objectMap & | getObjects () |
virtual const objectMap & | getObjects () const |
virtual const std::string | getUnits () const override |
virtual const CDataObject * | getValueObject () const override |
void | objectRenamed (CDataObject *pObject, const std::string &oldName) |
virtual | ~CDataContainer () |
Public Member Functions inherited from CDataObject | |
void | addIssue (const CIssue &issue) |
void | addReference (const CDataContainer *pReference) |
virtual void | calculateValue () override |
CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL) | |
virtual void | destruct () override |
virtual const CDataObject * | getDataObject () const override |
CDataContainer * | getObjectAncestor (const std::string &type) const |
CDataModel * | getObjectDataModel () const |
const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
const std::string & | getObjectName () const |
CDataContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
virtual const CValidity & | getValidity () const override |
bool | hasFlag (const Flag &flag) const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override |
bool | prerequisitsContains (const DataObjectSet &objects) const |
void | removeIssue (const CIssue &issue) |
void | removeReference (const CDataContainer *pReference) |
bool | setObjectName (const std::string &name) |
void | validityChanged (const CValidity &changedValidity) override |
void | validityRemoved (const CValidity &changedValidity) |
virtual | ~CDataObject () |
Public Member Functions inherited from CObjectInterface | |
CObjectInterface () | |
CObjectInterface (const CObjectInterface &src) | |
virtual | ~CObjectInterface () |
Public Member Functions inherited from CUndoObjectInterface | |
CUndoObjectInterface () | |
CUndoObjectInterface (const CUndoObjectInterface &src) | |
bool | generateUuid () |
const xg::Guid & | getUuid () const |
bool | setUuid (const std::string &uuid) |
bool | setUuid (const xg::Guid &uuid) |
virtual | ~CUndoObjectInterface () |
Static Public Member Functions | |
static bool | compare (const CExperiment *lhs, const CExperiment *rhs) |
Static Public Member Functions inherited from CCopasiParameter | |
static void | allocateValidValues (const Type &type, void *&pValidValues) |
static void | allocateValue (const Type &type, void *&pValue) |
static void | assignValue (const Type &type, void *&pValue, const void *pNewValue) |
static void | deleteValidValues (const Type &type, void *&pValidValues) |
static void | deleteValue (const Type &type, void *&pValue) |
static CCopasiParameter * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataContainer | |
static CDataContainer * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataObject | |
static CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static void | sanitizeObjectName (std::string &name) |
Static Public Member Functions inherited from CObjectInterface | |
static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
static CObjectInterface * | GetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName) |
Static Public Member Functions inherited from CUndoObjectInterface | |
template<class CType > | |
static CType * | fromData (const CData &, CUndoObjectInterface *) |
Static Public Attributes | |
static const std::string | TypeName [] |
static const std::string | WeightMethodName [] |
static const char * | WeightMethodType [] |
static const char * | XMLType [] |
Static Public Attributes inherited from CCopasiParameter | |
static const CEnumAnnotation< std::string, Type > | TypeName |
static const CEnumAnnotation< std::string, Type > | XMLType |
Static Public Attributes inherited from CDataContainer | |
static const CObjectInterface::ContainerList | EmptyList |
Protected Member Functions | |
CExperiment (const CExperiment &src) | |
Protected Member Functions inherited from CCopasiParameterGroup | |
CCopasiParameterGroup () | |
Protected Member Functions inherited from CCopasiParameter | |
CCopasiParameter (const CCopasiParameter &src) | |
Protected Member Functions inherited from CDataContainer | |
template<class CType > | |
CDataMatrixReference< CType > * | addMatrixReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataObjectReference< CType > * | addObjectReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataVectorReference< CType > * | addVectorReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
CDataContainer (const CDataContainer &src) | |
void | initObjects () |
Protected Member Functions inherited from CDataObject | |
CDataObject () | |
CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
Private Member Functions | |
void | initializeParameter () |
void | initializeScalingMatrix () |
Friends | |
bool | operator== (const CExperiment &lhs, const CExperiment &rhs) |
Additional Inherited Members | |
Protected Attributes inherited from CCopasiParameter | |
std::string | mKey |
void * | mpDefault |
void * | mpValidValues |
void * | mpValue |
CDataObject * | mpValueReference |
UserInterfaceFlag | mUserInterfaceFlag |
Protected Attributes inherited from CDataContainer | |
objectMap | mObjects |
Protected Attributes inherited from CDataObject | |
ObjectSet | mPrerequisits |
std::set< CDataContainer * > | mReferences |
Protected Attributes inherited from CObjectInterface | |
CValidity | mValidity |
enum CExperiment::Type |
|
protected |
CExperiment::CExperiment | ( | const CDataContainer * | pParent, |
const std::string & | name = "Experiment" |
||
) |
Default constructor
const | CDataContainer * pParent |
const | std::string & name (default: Experiment) |
References CVectorCore< CType >::array(), initializeParameter(), mExtendedTimeSeries, and mStorageIt.
CExperiment::CExperiment | ( | const CExperiment & | src, |
const CDataContainer * | pParent | ||
) |
Copy constructor
const | CExperiment & src |
const | CDataContainer * pParent (default: src data model) |
References CVectorCore< CType >::array(), initializeParameter(), mExtendedTimeSeries, and mStorageIt.
CExperiment::CExperiment | ( | const CCopasiParameterGroup & | group, |
const CDataContainer * | pParent | ||
) |
Specific constructor used for reading COPASI files
const | CCopasiParameterGroup & group |
const | CDataContainer * pParent (default: group data model) |
References CVectorCore< CType >::array(), initializeParameter(), mExtendedTimeSeries, and mStorageIt.
|
virtual |
Destructor
bool CExperiment::calculateStatistics | ( | ) |
Calculate statistics by comparing the stored calculated values with the measurements.
References CMatrix< CType >::array(), C_FLOAT64, CDataModel::getModel(), CDataObject::getObjectDataModel(), CModel::getTime(), max, mColumnObjectiveValue, mColumnRMS, mColumnValidValueCount, mDataDependent, mMean, mMeanSD, mObjectiveValue, mpDataDependentCalculated, mpTaskType, mRMS, mRowObjectiveValue, mRowRMS, mScale, mValidValueCount, CMatrix< CType >::numCols(), CMatrix< CType >::numRows(), CVector< CType >::resize(), and CTaskEnum::timeCourse.
bool CExperiment::calculateWeights | ( | ) |
Calculate/set the weights used in the sum of squares.
References CVectorCore< CType >::array(), C_FLOAT64, max, mColumnValidValueCount, mDataDependent, mDefaultColumnScale, MEAN, MEAN_SQUARE, mMeans, mMissingData, mNumDataRows, mpNormalizeWeightsPerExperiment, mpWeightMethod, SD, CVectorCore< CType >::size(), and VALUE_SCALING.
Referenced by read().
|
static |
Comparison used to evaluate the order of the experiment based on the filename and starting line number.
const | CExperiment * lhs; |
const | CExperiment * rhs; |
References mpFileName, and mpFirstRow.
Referenced by CExperimentSet::sort().
bool CExperiment::compile | ( | const CMathContainer * | pMathContainer | ) |
Compile the experiment. This function must be called before any evaluations can be performed.
const | CMathContainer * pMathContainer |
References C_FLOAT64, C_INVALID_INDEX, CExperimentObjectMap::compile(), CCore::Default, dependent, CCopasiMessage::ERROR, CMathObject::getDataObject(), CExperimentObjectMap::getDataObjects(), CMathContainer::getInitialDependencies(), CMathContainer::getInitialStateObjects(), CExperimentObjectMap::getLastColumn(), CExperimentObjectMap::getLastNotIgnoredColumn(), CMathContainer::getMathObject(), CDataObject::getObjectDisplayName(), CExperimentObjectMap::getRole(), CExperimentObjectMap::getScale(), CMathContainer::getSimulationUpToDateObjects(), CMathContainer::getStateObjects(), CMathContainer::getTransientDependencies(), CMathDependencyGraph::getUpdateSequence(), CMathObject::getValuePointer(), CDataObject::hasFlag(), ignore, independent, initializeScalingMatrix(), MCFitting, mColumnObjectiveValue, mColumnRMS, mColumnScale, mColumnValidValueCount, mDataDependent, mDataIndependent, mDependentObjectsMap, mDependentUpdateSequence, mDependentValues, mIndependentObjects, mIndependentUpdateSequence, mIndependentValues, mMean, mMeanSD, mObjectiveValue, mpContainer, mpNumColumns, mpObjectMap, mpTaskType, mRMS, mRowObjectiveValue, mRowRMS, CMatrix< CType >::numCols(), CMatrix< CType >::numRows(), pMathContainer, CVector< CType >::resize(), time, CTaskEnum::timeCourse, CCore::UpdateMoieties, and CDataObject::ValueDbl.
Referenced by CModel::createEventsForTimeseries().
|
virtual |
This methods must be called to elevate subgroups to derived objects. The default implementation does nothing.
Reimplemented from CCopasiParameterGroup.
References C_INT32, CCopasiParameterGroup::clear(), CCopasiParameterGroup::getGroup(), CExperimentObjectMap::getObjectCN(), CCopasiParameterGroup::getValue(), mpObjectMap, mpWeightMethod, CCopasiParameterGroup::removeParameter(), SD, CExperimentObjectMap::setNumCols(), CExperimentObjectMap::setObjectCN(), CExperimentObjectMap::setRole(), CCopasiParameterGroup::size(), StringPrint(), and updateFittedPoints().
Referenced by initializeParameter(), and operator=().
size_t CExperiment::extendedTimeSeriesSize | ( | ) | const |
References mExtendedTimeSeriesSize.
Referenced by updateFittedPointValuesFromExtendedTimeSeries().
void CExperiment::fixBuild55 | ( | ) |
Fix files written with Version 4.10.55, which wrote the square root of user defined weights for the parameter fitting task
References CExperimentObjectMap::fixBuild55(), and mpObjectMap.
const std::vector< std::string > & CExperiment::getColumnNames | ( | ) | const |
Retrieve the column names
References mColumnName.
size_t CExperiment::getColumnValidValueCount | ( | const CObjectInterface * | pObject | ) | const |
Retrieve the data point count for the object.
const | CObjectInterface * pObject |
References mColumnValidValueCount, and mDependentObjectsMap.
C_FLOAT64 CExperiment::getDefaultScale | ( | const CObjectInterface * | pObject | ) | const |
Retrieve the default scaling factor for the object.
const | CObjectInterface * pObject |
References mDefaultColumnScale, and mDependentObjectsMap.
Referenced by CExperimentObjectMap::CDataColumn::getDefaultScale().
Retrieve the dependent data of the experiment.
References mDataDependent.
Referenced by CFitProblem::calculate(), CModel::createEventsForTimeseries(), CExperimentSet::getDependentData(), and initExtendedTimeSeries().
const std::map< const CObjectInterface *, size_t > & CExperiment::getDependentObjectsMap | ( | ) | const |
Retrieve the mapping of dependent data objects to the index of the column, only counting columns with dependent data
References mDependentObjectsMap.
Referenced by CFitProblem::calculate(), CFitProblem::calculateStatistics(), and CModel::createEventsForTimeseries().
const C_FLOAT64 & CExperiment::getErrorMean | ( | ) | const |
const C_FLOAT64 & CExperiment::getErrorMeanSD | ( | ) | const |
Retrieve the std. deviation of the error
const | C_FLOAT64 & errorMeanSD |
References mMeanSD.
C_FLOAT64 CExperiment::getErrorMeanSD | ( | const CObjectInterface * | pObject, |
const C_FLOAT64 & | errorMean | ||
) | const |
Retrieve the error mean std. deviations for the object. More specifically this is the sum of the squared deviations of the residuals from the provided errorMean. The sum is over all data points for the object.
const | CObjectInterface * pObject |
C_FLOAT64 | errorMean |
References CMatrix< CType >::array(), C_FLOAT64, max, mDataDependent, mDependentObjectsMap, mpDataDependentCalculated, mScale, CMatrix< CType >::numCols(), and CMatrix< CType >::numRows().
C_FLOAT64 CExperiment::getErrorSum | ( | const CObjectInterface * | pObject | ) | const |
Retrieve the sum of errors (scaled residuals) for the object.
const | CObjectInterface * pObject |
References CMatrix< CType >::array(), C_FLOAT64, mColumnScale, mDataDependent, mDependentObjectsMap, mpDataDependentCalculated, CMatrix< CType >::numCols(), and CMatrix< CType >::numRows().
const CTaskEnum::Task & CExperiment::getExperimentType | ( | ) | const |
Retrieve the experiment type
References mpTaskType.
Referenced by CFitProblem::calculate(), CFitProblem::calculateCrossValidation(), COutputAssistant::createDefaultOutput(), CModel::createEventsForTimeseries(), and CExperimentSet::getExperimentType().
const std::string & CExperiment::getFileName | ( | ) | const |
Retrieve the file name in case it is a relative filename an absolute path to the file will be created.
References CDirEntry::fileName(), CDataObject::getObjectDataModel(), CDirEntry::isRelativePath(), CDirEntry::makePathAbsolute(), and mpFileName.
Referenced by CDataModel::copyExperimentalDataTo(), CModel::createEventsForTimeseries(), CDataModel::exportCombineArchive(), CDataModel::exportShinyArchive(), guessColumnNumber(), printResult(), readColumnNames(), and CExperimentFileInfo::sync().
const std::string & CExperiment::getFileNameOnly | ( | ) | const |
References mpFileName.
Referenced by CDataModel::exportCombineArchive(), CDataModel::exportShinyArchive(), and CDataModel::openCombineArchive().
const unsigned C_INT32 & CExperiment::getFirstRow | ( | ) | const |
const CDataVector< CFittingPoint > & CExperiment::getFittingPoints | ( | ) | const |
Retrieve the list of fitting points
References mFittingPoints.
Referenced by COutputAssistant::createDefaultOutput().
const unsigned C_INT32 & CExperiment::getHeaderRow | ( | ) | const |
Retrieve the independent data of the experiment.
References mDataIndependent.
Referenced by CExperimentSet::getIndependentData().
const CObjectInterface::ObjectSet & CExperiment::getIndependentObjects | ( | ) | const |
Retrieve the list of independent objects
References mIndependentObjects.
Referenced by CFitProblem::initialize().
const unsigned C_INT32 & CExperiment::getLastRow | ( | ) | const |
bool CExperiment::getNormalizeWeightsPerExperiment | ( | ) | const |
References mpNormalizeWeightsPerExperiment.
const unsigned C_INT32 & CExperiment::getNumColumns | ( | ) | const |
size_t CExperiment::getNumDataRows | ( | ) | const |
Retrieve the number of data rows
References mNumDataRows.
Referenced by CFitProblem::calculate(), CFitProblem::calculateCrossValidation(), CFitProblem::calculateStatistics(), CModel::createEventsForTimeseries(), and getTotalValueCount().
const C_FLOAT64 & CExperiment::getObjectiveValue | ( | ) | const |
Retrieve the value of the objective function
const | C_FLOAT64 & errorMean |
References mObjectiveValue.
C_FLOAT64 CExperiment::getObjectiveValue | ( | const CObjectInterface * | pObject | ) | const |
Retrieve the objective value for the object.
const | CObjectInterface * pObject |
References mColumnObjectiveValue, and mDependentObjectsMap.
CExperimentObjectMap & CExperiment::getObjectMap | ( | ) |
const CExperimentObjectMap & CExperiment::getObjectMap | ( | ) | const |
const C_FLOAT64 & CExperiment::getRMS | ( | ) | const |
C_FLOAT64 CExperiment::getRMS | ( | const CObjectInterface * | pObject | ) | const |
Retrieve the RMS for the object.
const | CObjectInterface * pObject |
References mColumnRMS, and mDependentObjectsMap.
const C_FLOAT64 * CExperiment::getScale | ( | const CObjectInterface * | pObject | ) | const |
Retrieve the scaling factor for the object.
const | CObjectInterface * pObject |
References mDependentObjectsMap, and mScale.
const std::string & CExperiment::getSeparator | ( | ) | const |
Retrieve the time data of the experiment.
References mDataTime.
Referenced by CFitProblem::calculate(), CFitProblem::calculateCrossValidation(), and CModel::createEventsForTimeseries().
size_t CExperiment::getTotalValueCount | ( | ) | const |
get number of independent data points expected given the number of rows and columns
References getNumDataRows(), mDataDependent, and CMatrix< CType >::numCols().
size_t CExperiment::getValidValueCount | ( | ) | const |
get number of independent data points for the whole experiment only valid data points (that contain actual data) are counted.
References mValidValueCount.
const CExperiment::WeightMethod & CExperiment::getWeightMethod | ( | ) | const |
Retrieve the method used for calculating the default weights.
References mpWeightMethod.
size_t CExperiment::guessColumnNumber | ( | ) | const |
Try to guess the number of columns
References CLocaleString::fromUtf8(), getFileName(), CTableRow::guessColumnNumber(), mpFirstRow, mpLastRow, mpSeparator, and skipLine().
void CExperiment::initExtendedTimeSeries | ( | size_t | s | ) |
Initialize the storage of an extended time series for plotting. This clears the storage, resizes it to the given size and sets the iterator to the start of the storage. The size given is the number of time points, not the number of data
References CVectorCore< CType >::array(), getDependentData(), mExtendedTimeSeries, mExtendedTimeSeriesSize, mStorageIt, and CVector< CType >::resize().
Referenced by CFitProblem::calculate(), and CFitProblem::calculateCrossValidation().
|
private |
Allocates all group parameters and assures that they are properly initialized.
References CKeyFactory::add(), CCopasiParameterGroup::assertGroup(), CCopasiParameterGroup::assertParameter(), CCopasiParameter::BOOL, C_INT32, elevateChildren(), CCopasiParameter::FILE, CRootContainer::getKeyFactory(), CCopasiParameterGroup::getParameter(), CCopasiParameter::getValue(), InvalidIndex, CCopasiParameter::KEY, MEAN_SQUARE, CCopasiParameter::mKey, mpFileName, mpFirstRow, mpHeaderRow, mpLastRow, mpNormalizeWeightsPerExperiment, mpNumColumns, mpRowOriented, mpSeparator, mpTaskType, mpWeightMethod, CKeyFactory::remove(), CCopasiParameterGroup::removeParameter(), CCopasiParameter::STRING, CCopasiParameter::UINT, and CTaskEnum::UnsetTask.
Referenced by CExperiment().
|
private |
Initialize the scaling matrix
References CMatrix< CType >::array(), CVectorCore< CType >::array(), C_FLOAT64, max, mColumnScale, mDataDependent, mpWeightMethod, mScale, CMatrix< CType >::numCols(), CMatrix< CType >::numRows(), CMatrix< CType >::resize(), CMatrix< CType >::size(), CVectorCore< CType >::size(), and VALUE_SCALING.
Referenced by compile().
const bool & CExperiment::isRowOriented | ( | ) | const |
Check whter the data is row oriented.
References mpRowOriented.
Referenced by setIsRowOriented().
CExperiment & CExperiment::operator= | ( | const CExperiment & | rhs | ) |
Assignment operator
const | CExperiment & rhs |
References CCopasiParameterGroup::clear(), elevateChildren(), mpFileName, mpFirstRow, mpHeaderRow, mpLastRow, mpNormalizeWeightsPerExperiment, mpNumColumns, mpRowOriented, mpSeparator, mpTaskType, mpWeightMethod, and CCopasiParameterGroup::setValue().
|
virtual |
This is the output method for the statistics for the experiment. This method is called from CFitProblem::printResult.
std::ostream | * ostream |
References C_FLOAT64, dependent, CExperimentObjectMap::getDataObjects(), getFileName(), CExperimentObjectMap::getLastNotIgnoredColumn(), CDataObject::getObjectName(), CExperimentObjectMap::getRole(), mColumnObjectiveValue, mColumnRMS, mColumnScale, mDataDependent, mDataTime, mMean, mNumDataRows, mObjectiveValue, mpDataDependentCalculated, mpObjectMap, mpTaskType, mRMS, mRowObjectiveValue, mRowRMS, mScale, CMatrix< CType >::numCols(), CVectorCore< CType >::size(), and CTaskEnum::timeCourse.
Referenced by CFitProblem::printResult().
bool CExperiment::read | ( | std::istream & | in, |
size_t & | currentLine | ||
) |
Reads the experiment data form a the given stream
std::istream | & in |
size_t | & currentLine |
References CMatrix< CType >::applyPivot(), CVectorCore< CType >::applyPivot(), CVectorCore< CType >::array(), C_INVALID_INDEX, calculateWeights(), dependent, CCopasiMessage::ERROR, CTableRow::getCells(), CDataObject::getObjectName(), CExperimentObjectMap::getRole(), ignore, independent, InvalidIndex, MCFitting, mColumnName, mColumnScale, mColumnValidValueCount, mDataDependent, mDataIndependent, mDataTime, mDefaultColumnScale, mMeans, mNumDataRows, mpDataDependentCalculated, mpFileName, mpFirstRow, mpHeaderRow, mpLastRow, mpNumColumns, mpObjectMap, mpSeparator, mpTaskType, CMatrix< CType >::resize(), CVector< CType >::resize(), CVectorCore< CType >::size(), CCopasiParameterGroup::size(), skipLine(), sortWithPivot(), time, and CTaskEnum::timeCourse.
Referenced by CModel::createEventsForTimeseries().
bool CExperiment::readColumnNames | ( | ) |
Reads the header row for the experiment data
References CLocaleString::fromUtf8(), CTableRow::getCells(), getFileName(), CCopasiParameterGroup::getName(), InvalidIndex, mColumnName, mpHeaderRow, mpNumColumns, mpSeparator, and skipLine().
bool CExperiment::setExperimentType | ( | const CTaskEnum::Task & | type | ) |
set the experiment type
const | CTaskEnum::Task & experimentType |
References mpTaskType, CTaskEnum::steadyState, and CTaskEnum::timeCourse.
bool CExperiment::setFileName | ( | const std::string & | fileName | ) |
Set the file name
const | std::string & fileName |
References mpFileName.
Referenced by CDataModel::copyExperimentalDataTo(), CDataModel::exportCombineArchive(), and CDataModel::exportShinyArchive().
bool CExperiment::setFirstRow | ( | const unsigned C_INT32 & | firstRow | ) |
Set the first row containing data
const | unsigned C_INT32 & firstRow |
References mpFirstRow, mpHeaderRow, and mpLastRow.
bool CExperiment::setHeaderRow | ( | const unsigned C_INT32 & | headerRow | ) |
Set the header row containing data
const | unsigned C_INT32 & headerRow |
References mpFirstRow, mpHeaderRow, and mpLastRow.
bool CExperiment::setIsRowOriented | ( | const bool & | isRowOriented | ) |
Set whether the data is row oriented. This only impacts reading the data from a stream
const | bool & isRowOriented |
References isRowOriented(), and mpRowOriented.
bool CExperiment::setLastRow | ( | const unsigned C_INT32 & | lastRow | ) |
Set the last row containing data
const | unsigned C_INT32 & lastRow |
References mpFirstRow, mpHeaderRow, and mpLastRow.
void CExperiment::setNormalizeWeightsPerExperiment | ( | bool | flag | ) |
References mpNormalizeWeightsPerExperiment.
bool CExperiment::setNumColumns | ( | const unsigned C_INT32 & | cols | ) |
Set the number of columns in a stream
const | unsigned C_INT32 & cols |
References mpNumColumns.
bool CExperiment::setSeparator | ( | const std::string & | seperator | ) |
Set the seperator used when reading a stream
const | std::string & separator |
References mpSeparator.
bool CExperiment::setWeightMethod | ( | const WeightMethod & | weightMethod | ) |
Set the weight calculation method and resets manual adjusted weights
const | WeightMethod & weightMethod |
References mpObjectMap, mpWeightMethod, and CExperimentObjectMap::CDataColumn::setScale().
void CExperiment::storeExtendedTimeSeriesData | ( | C_FLOAT64 | time | ) |
Add one dataset to the extended time series. The time and the simulated dependent values are stored and the iterator is increased
References CMathContainer::applyUpdateSequence(), CVectorCore< CType >::array(), C_FLOAT64, mDataDependent, mDependentUpdateSequence, mDependentValues, mpContainer, mStorageIt, CMatrix< CType >::numCols(), and time.
Referenced by CFitProblem::calculate(), and CFitProblem::calculateCrossValidation().
Calculate the sum of squares for the indexed row of the experiment. If residuals is not NULL residuals will contain the differences between the calculated and the experiment values.
const | size_t & index |
C_FLOAT64 | *& residuals (may be NULL) |
References CMathContainer::applyUpdateSequence(), CVectorCore< CType >::array(), C_FLOAT64, max, mDataDependent, mDependentUpdateSequence, mDependentValues, mMissingData, mpContainer, mScale, and CMatrix< CType >::numCols().
Referenced by CFitProblem::calculate(), and CFitProblem::calculateCrossValidation().
Calculate the sum of squares for the indexed row of the experiment. On return dependentValues contains the calculated values. If residuals is not NULL residuals will contain the differences between the calculated and the experiment values.
const | size_t & index |
C_FLOAT64 | *& dependentValues (must not be NULL) |
References CMathContainer::applyUpdateSequence(), CVectorCore< CType >::array(), C_FLOAT64, max, mDataDependent, mDependentUpdateSequence, mDependentValues, mMissingData, mpContainer, mpDataDependentCalculated, mScale, and CMatrix< CType >::numCols().
Referenced by CFitProblem::calculate(), and CFitProblem::calculateCrossValidation().
void CExperiment::updateFittedPoints | ( | ) |
This method needs to be called whenever the Object Map is changed
References CDataVector< CType >::add(), CDataVector< CType >::clear(), dependent, CExperimentObjectMap::getObjectCN(), CExperimentObjectMap::getRole(), mFittingPoints, mpObjectMap, and CCopasiParameterGroup::size().
Referenced by elevateChildren().
void CExperiment::updateFittedPointValues | ( | const size_t & | index | ) |
This method is used for output to fill the fitted points with the values of the index data record. If index exceeds the number of data records all values are set to NaN.
References CDataVector< CType >::begin(), C_FLOAT64, CDataVector< CType >::end(), mDataDependent, mDataTime, mFittingPoints, mNumDataRows, mpDataDependentCalculated, mpTaskType, mScale, CMatrix< CType >::numCols(), and CTaskEnum::timeCourse.
void CExperiment::updateFittedPointValuesFromExtendedTimeSeries | ( | const size_t & | index | ) |
Fill the fitted points with values from the extended time series
References CDataVector< CType >::begin(), CDataVector< CType >::end(), extendedTimeSeriesSize(), mDataDependent, mExtendedTimeSeries, mFittingPoints, and CMatrix< CType >::numCols().
bool CExperiment::updateModelWithIndependentData | ( | const size_t & | index | ) |
Update the model with the independent data of the experiment
const | size_t & index |
References CMathContainer::applyUpdateSequence(), CVectorCore< CType >::array(), C_FLOAT64, mDataIndependent, mIndependentUpdateSequence, mIndependentValues, mpContainer, and CVectorCore< CType >::size().
Referenced by CFitProblem::calculate(), CFitProblem::calculateCrossValidation(), CFitProblem::createParameterSets(), and CFitProblem::restore().
|
friend |
|
private |
The column names if available after reading a file
Referenced by getColumnNames(), read(), and readColumnNames().
Referenced by calculateStatistics(), compile(), getObjectiveValue(), and printResult().
Referenced by calculateStatistics(), compile(), getRMS(), and printResult().
Referenced by compile(), getErrorSum(), initializeScalingMatrix(), printResult(), and read().
|
private |
Referenced by calculateStatistics(), calculateWeights(), compile(), getColumnValidValueCount(), and read().
The relevant dependent experimental data after reading a file
Referenced by calculateStatistics(), calculateWeights(), compile(), getDependentData(), getErrorMeanSD(), getErrorSum(), getTotalValueCount(), initializeScalingMatrix(), printResult(), read(), storeExtendedTimeSeriesData(), sumOfSquares(), sumOfSquaresStore(), updateFittedPointValues(), and updateFittedPointValuesFromExtendedTimeSeries().
The relevant independent experimental data after reading a file
Referenced by compile(), getIndependentData(), read(), and updateModelWithIndependentData().
The vector of time points
Referenced by getTimeData(), printResult(), read(), and updateFittedPointValues().
Referenced by calculateWeights(), getDefaultScale(), and read().
|
private |
A map of all dependent data objects to dependent data columns
Referenced by compile(), getColumnValidValueCount(), getDefaultScale(), getDependentObjectsMap(), getErrorMeanSD(), getErrorSum(), getObjectiveValue(), getRMS(), and getScale().
|
private |
Referenced by compile(), storeExtendedTimeSeriesData(), sumOfSquares(), and sumOfSquaresStore().
Pointer to the actual independent values in the model in the order in which they occur as colums in the file, which is also the order in which the numbers are stored in the various internal data structures
Referenced by compile(), storeExtendedTimeSeriesData(), sumOfSquares(), and sumOfSquaresStore().
Referenced by CExperiment(), initExtendedTimeSeries(), and updateFittedPointValuesFromExtendedTimeSeries().
|
private |
Referenced by extendedTimeSeriesSize(), and initExtendedTimeSeries().
|
private |
|
private |
Referenced by compile(), and getIndependentObjects().
|
private |
Referenced by compile(), and updateModelWithIndependentData().
Referenced by compile(), and updateModelWithIndependentData().
|
private |
Referenced by calculateStatistics(), compile(), getErrorMean(), and printResult().
Referenced by calculateWeights(), and read().
|
private |
Referenced by calculateStatistics(), compile(), and getErrorMeanSD().
|
private |
Indicates whether we have missing data
Referenced by calculateWeights(), sumOfSquares(), and sumOfSquaresStore().
|
private |
Referenced by calculateWeights(), getNumDataRows(), printResult(), read(), and updateFittedPointValues().
|
private |
Referenced by calculateStatistics(), compile(), getObjectiveValue(), and printResult().
|
private |
Referenced by compile(), storeExtendedTimeSeriesData(), sumOfSquares(), sumOfSquaresStore(), and updateModelWithIndependentData().
|
private |
The relevant dependent experimental data after reading a file
Referenced by calculateStatistics(), getErrorMeanSD(), getErrorSum(), printResult(), read(), sumOfSquaresStore(), and updateFittedPointValues().
|
private |
This is realized as a CCopasiParameter type STRING
Referenced by compare(), getFileName(), getFileNameOnly(), initializeParameter(), operator=(), read(), and setFileName().
|
private |
This is realized as a CCopasiParameter type UINT
Referenced by compare(), getFirstRow(), guessColumnNumber(), initializeParameter(), operator=(), read(), setFirstRow(), setHeaderRow(), and setLastRow().
|
private |
This is realized as a CCopasiParameter type UINT
Referenced by getHeaderRow(), initializeParameter(), operator=(), read(), readColumnNames(), setFirstRow(), setHeaderRow(), and setLastRow().
|
private |
This is realized as a CCopasiParameter type UINT
Referenced by getLastRow(), guessColumnNumber(), initializeParameter(), operator=(), read(), setFirstRow(), setHeaderRow(), and setLastRow().
|
private |
Indicates whether the weights of this experiment should be normalized to 1
Referenced by calculateWeights(), getNormalizeWeightsPerExperiment(), initializeParameter(), operator=(), and setNormalizeWeightsPerExperiment().
|
private |
This is realized as a CCopasiParameter type UINT
Referenced by compile(), getNumColumns(), initializeParameter(), operator=(), read(), readColumnNames(), and setNumColumns().
|
private |
This is realized as a CCopasiParameter type GROUP
Referenced by compile(), elevateChildren(), fixBuild55(), getObjectMap(), printResult(), read(), setWeightMethod(), and updateFittedPoints().
|
private |
This is realized as a CCopasiParameter type BOOL
Referenced by initializeParameter(), isRowOriented(), operator=(), and setIsRowOriented().
|
private |
This is realized as a CCopasiParameter type STRING
Referenced by getSeparator(), guessColumnNumber(), initializeParameter(), operator=(), read(), readColumnNames(), and setSeparator().
|
private |
This is realized as a CCopasiParameter type UINT
Referenced by calculateStatistics(), compile(), getExperimentType(), initializeParameter(), operator=(), printResult(), read(), setExperimentType(), and updateFittedPointValues().
|
private |
This is realized as a CCopasiParameter type UINT
Referenced by calculateWeights(), elevateChildren(), getWeightMethod(), initializeParameter(), initializeScalingMatrix(), operator=(), and setWeightMethod().
|
private |
Referenced by calculateStatistics(), compile(), getRMS(), and printResult().
Referenced by calculateStatistics(), compile(), and printResult().
Referenced by calculateStatistics(), compile(), and printResult().
The individual scale for each residual
Referenced by calculateStatistics(), getErrorMeanSD(), getScale(), getScalingMatrix(), initializeScalingMatrix(), printResult(), sumOfSquares(), sumOfSquaresStore(), and updateFittedPointValues().
|
private |
Referenced by CExperiment(), initExtendedTimeSeries(), and storeExtendedTimeSeriesData().
|
private |
Referenced by calculateStatistics(), and getValidValueCount().
|
static |
String literals for the GUI to display type names of columns known to COPASI.
|
static |
String literals for the GUI to display weight method known to COPASI.
|
static |
XML type names of weight methods known to COPASI.
|
static |
XML type names of tasks known to COPASI.