SPHinXsys
alpha version
|
the regression test is based on the dynamic time warping. More...
#include <dynamic_time_warping_method.h>
Inherits SPH::RegressionTestTimeAveraged< ObserveMethodType >.
Public Member Functions | |
template<typename... ConstructorArgs> | |
RegressionTestDynamicTimeWarping (ConstructorArgs &&...args) | |
void | settingupTheTest () |
void | readDTWDistanceFromXml () |
void | updateDTWDistance () |
void | writeDTWDistanceToXml () |
bool | compareDTWDistance (Real threshold_value) |
void | resultTest () |
void | generateDataBase (Real threshold_value, string filter="false") |
void | newResultTest (string filter="false") |
Public Member Functions inherited from SPH::RegressionTestTimeAveraged< ObserveMethodType > | |
template<typename... ConstructorArgs> | |
RegressionTestTimeAveraged (ConstructorArgs &&...args) | |
void | initializeThreshold (VariableType &threshold_mean, VariableType &threshold_variance) |
void | settingupTheTest () |
void | readMeanVarianceFromXml () |
void | searchForStartPoint () |
void | filterExtremeValues () |
void | updateMeanVariance () |
void | writeMeanVarianceToXml () |
bool | compareMeanVariance () |
void | resultTest () |
void | generateDataBase (VariableType threshold_mean, VariableType threshold_variance, string filter="false") |
void | newResultTest (string filter="false") |
Public Member Functions inherited from SPH::RegressionTestBase< ObserveMethodType > | |
template<typename... ConstructorArgs> | |
RegressionTestBase (ConstructorArgs &&...args) | |
void | writeToXml (ObservedQuantityRecording< VariableType > *observe_method, size_t iteration=0) |
template<typename ReduceType > | |
void | writeToXml (BodyReducedQuantityRecording< ReduceType > *reduce_method, size_t iteration=0) |
void | readFromXml (ObservedQuantityRecording< VariableType > *observe_method) |
template<typename ReduceType > | |
void | readFromXml (BodyReducedQuantityRecording< ReduceType > *reduce_method) |
void | transposeTheIndex () |
void | readResultFromXml () |
void | writeResultToXml () |
void | readResultFromXml (int index_of_run_) |
void | writeResultToXml (int index_of_run_) |
void | writeToFile (size_t iteration=0) override |
void | writeXmlToXmlFile () |
void | readXmlFromXmlFile () |
Protected Member Functions | |
Real | calculatePNorm (Real variable_a, Real variable_b) |
Real | calculatePNorm (Vecd variable_a, Vecd variable_b) |
Real | calculatePNorm (Matd variable_a, Matd variable_b) |
StdVec< Real > | calculateDTWDistance (DoubleVec< VariableType > dataset_a_, DoubleVec< VariableType > dataset_b_) |
Protected Member Functions inherited from SPH::RegressionTestTimeAveraged< ObserveMethodType > | |
void | filterLocalResult (DoubleVec< Real > ¤t_result) |
void | filterLocalResult (DoubleVec< Vecd > ¤t_result) |
void | filterLocalResult (DoubleVec< Matd > ¤t_result) |
void | searchSteadyStart (DoubleVec< Real > ¤t_result) |
void | searchSteadyStart (DoubleVec< Vecd > ¤t_result) |
void | searchSteadyStart (DoubleVec< Matd > ¤t_result) |
void | calculateNewVariance (DoubleVec< Real > ¤t_result, StdVec< Real > &local_meanvalue, StdVec< Real > &variance, StdVec< Real > &variance_new) |
void | calculateNewVariance (DoubleVec< Vecd > ¤t_result, StdVec< Vecd > &local_meanvalue, StdVec< Vecd > &variance, StdVec< Vecd > &variance_new) |
void | calculateNewVariance (DoubleVec< Matd > ¤t_result, StdVec< Matd > &local_meanvalue, StdVec< Matd > &variance, StdVec< Matd > &variance_new) |
int | compareParameter (string par_name, StdVec< Real > ¶meter, StdVec< Real > ¶meter_new, Real &threshold) |
int | compareParameter (string par_name, StdVec< Vecd > ¶meter, StdVec< Vecd > ¶meter_new, Vecd &threshold) |
int | compareParameter (string par_name, StdVec< Matd > ¶meter, StdVec< Matd > ¶meter_new, Matd &threshold) |
int | testNewResult (DoubleVec< Real > ¤t_result, StdVec< Real > &meanvalue, StdVec< Real > &local_meanvalue, StdVec< Real > &variance) |
int | testNewResult (DoubleVec< Vecd > ¤t_result, StdVec< Vecd > &meanvalue, StdVec< Vecd > &local_meanvalue, StdVec< Vecd > &variance) |
int | testNewResult (DoubleVec< Matd > ¤t_result, StdVec< Matd > &meanvalue, StdVec< Matd > &local_meanvalue, StdVec< Matd > &variance) |
Protected Attributes | |
std::string | dtw_distance_filefullpath_ |
XmlEngine | dtw_distance_xml_engine_in_ |
XmlEngine | dtw_distance_xml_engine_out_ |
StdVec< Real > | dtw_distance_ |
StdVec< Real > | dtw_distance_new_ |
Protected Attributes inherited from SPH::RegressionTestTimeAveraged< ObserveMethodType > | |
int | snapshot_for_converged_ |
std::string | mean_variance_filefullpath_ |
std::string | filefullpath_filter_output_ |
XmlEngine | mean_variance_xml_engine_in_ |
XmlEngine | mean_variance_xml_engine_out_ |
VariableType | threshold_mean_ |
VariableType | threshold_variance_ |
StdVec< VariableType > | meanvalue_ |
StdVec< VariableType > | meanvalue_new_ |
StdVec< VariableType > | variance_ |
StdVec< VariableType > | variance_new_ |
StdVec< VariableType > | local_meanvalue_ |
Protected Attributes inherited from SPH::RegressionTestBase< ObserveMethodType > | |
std::string | input_folder_path_ |
std::string | in_output_filefullpath_ |
std::string | result_filefullpath_ |
std::string | runtimes_filefullpath_ |
std::string | converged |
XmlMemoryIO | xmlmemory_io_ |
XmlEngine | observe_xml_engine_ |
XmlEngine | result_xml_engine_in_ |
XmlEngine | result_xml_engine_out_ |
StdVec< std::string > | element_tag_ |
DoubleVec< VariableType > | current_result_ |
DoubleVec< VariableType > | current_result_trans_ |
DoubleVec< VariableType > | result_in_ |
TripleVec< VariableType > | result_ |
int | snapshot_ |
int | observation_ |
int | difference_ |
int | number_of_run_ |
int | label_for_repeat_ |
int | number_of_snapshot_old_ |
the regression test is based on the dynamic time warping.
|
protected |
the local constrained method used for calculating the dtw distance between two lines.
create a 2D vector with [a_length, b_length] to contain the local DTW distance value.
add locality constraint
|
protected |
the method used for calculating the p_norm. (calculateDTWDistance)
|
protected |
the current method is TBD.
|
inline |
test the new result if it is converged within the range. the interface for generating the priori converged result with DTW
|
inline |
the interface for generating the priori converged result with DTW.
void SPH::RegressionTestDynamicTimeWarping< ObserveMethodType >::readDTWDistanceFromXml | ( | ) |
setup the test and defined basic variables.
void SPH::RegressionTestDynamicTimeWarping< ObserveMethodType >::updateDTWDistance | ( | ) |
read the old DTW distance from the .xml file.
void SPH::RegressionTestDynamicTimeWarping< ObserveMethodType >::writeDTWDistanceToXml | ( | ) |
update the maximum DTWDistance with the new result.