ClickHouse/src/Functions/abtesting.h

37 lines
596 B
C++
Raw Normal View History

#pragma once
2020-07-29 11:00:04 +00:00
#include <Common/config.h>
#if !defined(ARCADIA_BUILD) && USE_STATS
#include <iostream>
#include <vector>
#include <algorithm>
#include <Core/Types.h>
#include <Common/PODArray.h>
namespace DB
{
2020-07-17 07:23:24 +00:00
typedef struct _Variant
{
Float64 x;
Float64 y;
Float64 beats_control;
Float64 best;
2020-07-17 07:23:24 +00:00
} Variant;
using Variants = PODArray<Variant>;
template <bool higher_is_better>
Variants bayesian_ab_test(String distribution, PODArray<Float64> & xs, PODArray<Float64> & ys);
String convertToJson(const PODArray<String> & variant_names, const Variants & variants);
}
2020-07-29 11:00:04 +00:00
2020-07-15 21:28:01 +00:00
#endif