datasketches-cpp
Loading...
Searching...
No Matches
kolmogorov_smirnov.hpp
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#ifndef KOLMOGOROV_SMIRNOV_HPP_
21#define KOLMOGOROV_SMIRNOV_HPP_
22
23namespace datasketches {
24
29public:
37 template<typename Sketch>
38 static double delta(const Sketch& sketch1, const Sketch& sketch2);
39
50 template<typename Sketch>
51 static double threshold(const Sketch& sketch1, const Sketch& sketch2, double p);
52
64 template<typename Sketch>
65 static bool test(const Sketch& sketch1, const Sketch& sketch2, double p);
66};
67
68} /* namespace datasketches */
69
70#include "kolmogorov_smirnov_impl.hpp"
71
72#endif
Kolmogorov-Smirnov test for KLL or Quantiles sketches.
Definition kolmogorov_smirnov.hpp:28
static double delta(const Sketch &sketch1, const Sketch &sketch2)
Computes the raw delta area between two quantile sketches for the Kolmogorov-Smirnov Test.
Definition kolmogorov_smirnov_impl.hpp:29
static bool test(const Sketch &sketch1, const Sketch &sketch2, double p)
Performs the Kolmogorov-Smirnov Test between two quantile sketches.
Definition kolmogorov_smirnov_impl.hpp:69
static double threshold(const Sketch &sketch1, const Sketch &sketch2, double p)
Computes the adjusted delta area threshold for the Kolmogorov-Smirnov Test.
Definition kolmogorov_smirnov_impl.hpp:58
DataSketches namespace.
Definition binomial_bounds.hpp:38