ClickHouse/src/Functions/abtesting.h

26 lines
417 B
C++
Raw Normal View History

2020-07-15 21:28:01 +00:00
#if !defined(ARCADIA_BUILD)
#pragma once
#include <iostream>
#include <vector>
#include <algorithm>
namespace DB
{
2020-07-17 07:23:24 +00:00
typedef struct _Variant
{
2020-07-17 07:23:24 +00:00
double beats_control;
double best;
std::vector<double> samples;
} Variant;
using Variants = std::vector<Variant>;
template <bool higher_is_better>
2020-07-17 07:23:24 +00:00
Variants bayesian_ab_test(std::string distribution, std::vector<double> xs, std::vector<double> ys);
}
2020-07-15 21:28:01 +00:00
#endif