All Projects → boostorg → Histogram

boostorg / Histogram

Licence: bsl-1.0
Fast multi-dimensional generalized histogram with convenient interface for C++14

Projects that are alternatives of or similar to Histogram

Dabest Python
Data Analysis with Bootstrapped ESTimation
Stars: ✭ 231 (-4.94%)
Mutual labels:  statistics, data-analysis
Deeplearning Notes
Notes for Deep Learning Specialization Courses led by Andrew Ng.
Stars: ✭ 126 (-48.15%)
Mutual labels:  statistics, data-analysis
Scikit Learn
scikit-learn: machine learning in Python
Stars: ✭ 48,322 (+19785.6%)
Mutual labels:  statistics, data-analysis
Thist
A go package for generating online histograms and plotting them in the terminal and PDFs
Stars: ✭ 96 (-60.49%)
Mutual labels:  statistics, histogram
Datascience
Curated list of Python resources for data science.
Stars: ✭ 3,051 (+1155.56%)
Mutual labels:  statistics, data-analysis
Root
The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
Stars: ✭ 1,377 (+466.67%)
Mutual labels:  statistics, data-analysis
Mongoeye
Schema and data analyzer for MongoDB written in Go.
Stars: ✭ 113 (-53.5%)
Mutual labels:  statistics, histogram
Datacamp
🍧 A repository that contains courses I have taken on DataCamp
Stars: ✭ 69 (-71.6%)
Mutual labels:  statistics, data-analysis
Covid19 Severity Prediction
Extensive and accessible COVID-19 data + forecasting for counties and hospitals. 📈
Stars: ✭ 170 (-30.04%)
Mutual labels:  statistics, data-analysis
Dabestr
Data Analysis with Bootstrap Estimation in R
Stars: ✭ 169 (-30.45%)
Mutual labels:  statistics, data-analysis
Tablesaw
Java dataframe and visualization library
Stars: ✭ 2,785 (+1046.09%)
Mutual labels:  statistics, data-analysis
Data Science Live Book
An open source book to learn data science, data analysis and machine learning, suitable for all ages!
Stars: ✭ 193 (-20.58%)
Mutual labels:  statistics, data-analysis
Bayesian Cognitive Modeling In Pymc3
PyMC3 codes of Lee and Wagenmakers' Bayesian Cognitive Modeling - A Pratical Course
Stars: ✭ 93 (-61.73%)
Mutual labels:  statistics, data-analysis
Tennis Crystal Ball
Ultimate Tennis Statistics and Tennis Crystal Ball - Tennis Big Data Analysis and Prediction
Stars: ✭ 107 (-55.97%)
Mutual labels:  statistics, data-analysis
Hyperlearn
50% faster, 50% less RAM Machine Learning. Numba rewritten Sklearn. SVD, NNMF, PCA, LinearReg, RidgeReg, Randomized, Truncated SVD/PCA, CSR Matrices all 50+% faster
Stars: ✭ 1,204 (+395.47%)
Mutual labels:  statistics, data-analysis
Sweetviz
Visualize and compare datasets, target values and associations, with one line of code.
Stars: ✭ 1,851 (+661.73%)
Mutual labels:  statistics, data-analysis
Pandas Profiling
Create HTML profiling reports from pandas DataFrame objects
Stars: ✭ 8,329 (+3327.57%)
Mutual labels:  statistics, data-analysis
Pycm
Multi-class confusion matrix library in Python
Stars: ✭ 1,076 (+342.8%)
Mutual labels:  statistics, data-analysis
Teachingmaterial
Various teaching material
Stars: ✭ 159 (-34.57%)
Mutual labels:  statistics, data-analysis
Collapse
Advanced and Fast Data Transformation in R
Stars: ✭ 184 (-24.28%)
Mutual labels:  statistics, data-analysis

Fast multi-dimensional histogram with convenient interface for C++14

Coded with ❤. Powered by the Boost community and the Scikit-HEP Project. Licensed under the Boost Software License.

Supported compiler versions gcc >= 5.5, clang >= 3.8, msvc >= 14.1 Supported C++ versions 14, 17, 20

Branch Linux, OSX, Windows Coverage
develop Fast Coveralls
master Fast Coveralls

Boost.Histogram is a very fast state-of-the-art multi-dimensional generalised histogram class for the beginner and expert alike.

  • Header-only
  • Easy to use, easy to customise
  • Just count or use arbitrary accumulators in each cell to compute means, minimum, maximum, ...
  • Supports multi-threading and restricted environments (no heap allocation, exceptions or RTTI)
  • Has Python bindings

Check out the full documentation.

💡 Boost.Histogram is a mature library with 100 % of code lines covered by unit tests, benchmarked for performance, and has extensive documentation. If you still find some issue or find the documentation lacking, tell us about it by submitting an issue. Chat with us on the Boost channel on Slack and Gitter.

Code examples

The following stripped-down example was taken from the Getting started section in the documentation. Have a look into the docs to see the full version with comments and more examples.

Example: Make and fill a 1d-histogram (try it live on Wandbox). The core of this example compiles into 53 lines of assembly code.

#include <boost/histogram.hpp>
#include <boost/format.hpp> // used here for printing
#include <iostream>

int main() {
    using namespace boost::histogram;

    // make 1d histogram with 4 regular bins from 0 to 2
    auto h = make_histogram( axis::regular<>(4, 0.0, 2.0) );

    // push some values into the histogram
    for (auto&& value : { 0.4, 1.1, 0.3, 1.7, 10. })
      h(value);

    // iterate over bins
    for (auto&& x : indexed(h)) {
      std::cout << boost::format("bin %i [ %.1f, %.1f ): %i\n")
        % x.index() % x.bin().lower() % x.bin().upper() % *x;
    }

    std::cout << std::flush;

    /* program output:

    bin 0 [ 0.0, 0.5 ): 2
    bin 1 [ 0.5, 1.0 ): 0
    bin 2 [ 1.0, 1.5 ): 1
    bin 3 [ 1.5, 2.0 ): 1
    */
}

Features

  • Extremely customisable multi-dimensional histogram
  • Simple, convenient, STL and Boost-compatible interface
  • Counters with high dynamic range, cannot overflow or be capped [1]
  • Better performance than other libraries (see benchmarks for details)
  • Efficient use of memory [1]
  • Hand-crafted C++17 deduction guides for axes and histogram types
  • Support for custom axis types: define how input values should map to indices
  • Support for under-/overflow bins (can be disabled individually to reduce memory consumption)
  • Support for axes that grow automatically with input values [2]
  • Support for weighted increments
  • Support for profiles and more generally, user-defined accumulators in cells [3]
  • Support for completely stack-based histograms
  • Support for compilation without exceptions or RTTI [4]
  • Support for adding, subtracting, multiplying, dividing, and scaling histograms
  • Support for custom allocators
  • Support for programming with units [5]
  • Optional serialization based on Boost.Serialization

Note 1 In the standard configuration, if you don't use weighted increments. The counter capacity is increased dynamically as the cell counts grow. When even the largest plain integral type would overflow, the storage switches to a multiprecision integer similar to those in Boost.Multiprecision, which is only limited by available memory.

Note 2 An axis can be configured to grow when a value is encountered that is outside of its range. It then grows new bins towards this value so that the value ends up in the new highest or lowest bin.

Note 3 The histogram can be configured to hold an arbitrary accumulator in each cell instead of a simple counter. Extra values can be passed to the histogram, for example, to compute the mean and variance of values which fall into the same cell. This feature can be used to calculate variance estimates for each cell, which are useful when you need to fit a statistical model to the cell values.

Note 4 The library throws exceptions when exceptions are enabled. When exceptions are disabled, a user-defined exception handler is called instead upon a throw and the program terminates, see boost::throw_exception for details. Disabling exceptions improves performance by 10 % to 20 % in benchmarks. The library does not use RTTI (only CTTI) so disabling it has no effect.

Note 5 Builtin axis types can be configured to only accept dimensional quantities, like those from Boost.Units. This means you get a useful error if you accidentally try to fill a length where the histogram axis expects a time, for example.

Benchmarks

Boost.Histogram is more flexible and faster than other C/C++ libraries. It was compared to:

Details on the benchmark are given in the documentation.

What users say

John Buonagurio | Manager at Exponent®

"I just wanted to say 'thanks' for your awesome Histogram library. I'm working on a software package for processing meteorology data and I'm using it to generate wind roses with the help of Qt and QwtPolar. Looks like you thought of just about everything here – the circular axis type was practically designed for this application, everything 'just worked'."

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].