Remove last remaining comments from eqpalg
This commit is contained in:
parent
62a97cdf9d
commit
c53b108500
@ -211,7 +211,6 @@ bool ExpTimes::check_alarm() {
|
||||
}
|
||||
|
||||
int ExpTimes::get_history_times() {
|
||||
// HistoryTable trs1a;
|
||||
T_RULE_SAMPLE_1D trs1a;
|
||||
auto query_list_maybe = exec<db2_t, T_RULE_SAMPLE_1D>(
|
||||
select(trs1a.Flag(), trs1a.Count(), trs1a.X1())
|
||||
@ -305,7 +304,6 @@ int ExpTimes::insert_history_times(int64_t now_times, double now_used_time) {
|
||||
}
|
||||
|
||||
void ExpTimes::reset_dev_data() {
|
||||
// T_RULE_SAMPLE_1D trs1a;
|
||||
last_load_time_ = now_time_;
|
||||
this->rule_stat_.shear_times = 0;
|
||||
this->rule_stat_.running_time = 0;
|
||||
|
||||
@ -144,7 +144,6 @@ bool GlitchDetection::get_prr() {
|
||||
<< ",rulename:" << this->rule_name_
|
||||
<< ",get_prr():" << prr_result
|
||||
<< ",data_index_:" << data_index_ << std::endl;
|
||||
// exp_mpdule_ptr_->print_value();
|
||||
if (!prr_result) {
|
||||
data_index_ = 0;
|
||||
run_time_range_.set_left(this->now_time_);
|
||||
|
||||
@ -149,13 +149,6 @@ int Dist::auto_test(dlib::running_stats<double> rs,
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 设置报警数据信息,如果存在确切的报警数据,该数据可以帮助我们更好地判断总体的数据类型
|
||||
// int Dist::set_warning_sample_optional(
|
||||
// const std::vector<double>& warning_sample) {
|
||||
// this->warning_sample_ = warning_sample_;
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
// 得到第一类错误的错误率(如果数据正确而被判断出错)
|
||||
double Dist::get_error_rate_type_1(const double& prob,
|
||||
const std::vector<double>& tmp_data) {
|
||||
@ -180,7 +173,7 @@ double Dist::get_error_rate_type_1(const double& prob,
|
||||
logger_->Debug() << "lt_left:" << lt_left << ",gt_right:" << gt_right
|
||||
<< ",tmp_data.size():" << tmp_data.size() << endl;
|
||||
return double((lt_left + gt_right)) /
|
||||
double(tmp_data.size()); ///<小于1的小数
|
||||
double(tmp_data.size());
|
||||
}
|
||||
|
||||
bool Dist::valid() const { return valid_; }
|
||||
@ -229,4 +222,4 @@ mix_cc::float_range_t Dist::get_range(double prob) {
|
||||
return mix_cc::float_range_t{0, 0};
|
||||
}
|
||||
|
||||
} // namespace DAA
|
||||
}
|
||||
|
||||
@ -38,23 +38,23 @@ class Dist {
|
||||
public:
|
||||
enum class DistTypes {
|
||||
unknown,
|
||||
student_t, ///< T分布
|
||||
normal, ///<正态分布
|
||||
skew_normal ///<偏态分布
|
||||
}; ///< 预设三种分布
|
||||
student_t,
|
||||
normal,
|
||||
skew_normal
|
||||
};
|
||||
constexpr static double test_prec = 0.01;
|
||||
|
||||
protected:
|
||||
DistTypes dist_type_; ///< 分布类型
|
||||
bool valid_; ///< 可用性
|
||||
dlib::running_stats<double> rs_; ///< dlib 数据分布特征
|
||||
mix_cc::float_range_t legal_range_; ///< 合法分布区间
|
||||
DistTypes dist_type_;
|
||||
bool valid_;
|
||||
dlib::running_stats<double> rs_;
|
||||
mix_cc::float_range_t legal_range_;
|
||||
std::string rule_id_;
|
||||
std::shared_ptr<boost::math::normal> normal_; ///< 正态分布
|
||||
std::shared_ptr<boost::math::students_t> students_t_; ///< T分布
|
||||
std::shared_ptr<boost::math::skew_normal> skew_normal_; ///< 偏态分布
|
||||
std::shared_ptr<boost::math::normal> normal_;
|
||||
std::shared_ptr<boost::math::students_t> students_t_;
|
||||
std::shared_ptr<boost::math::skew_normal> skew_normal_;
|
||||
std::unique_ptr<LOG> logger_;
|
||||
double predefied_prob_ = 0.975; ///< 预定义的置信概率 3σ的大概置信度
|
||||
double predefied_prob_ = 0.975;
|
||||
|
||||
double prob_ = 0.5;
|
||||
|
||||
@ -98,13 +98,6 @@ class Dist {
|
||||
int auto_test(dlib::running_stats<double> rs,
|
||||
const std::vector<double>& tmp_data);
|
||||
|
||||
// /**
|
||||
// * @brief 设置报警样本(可选,用来验证第二类错误)
|
||||
// * @param warning_sample My Param doc
|
||||
// * @return int
|
||||
// */
|
||||
// int set_warning_sample_optional(const std::vector<double>& warning_sample);
|
||||
|
||||
/**
|
||||
* @brief 分布是否具有合理类型
|
||||
* @return true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user