PyApprox Logo

Getting Started

  • About
  • Installation

Tutorials

  • Software Tutorial
  • Theoretical Tutorials

Benchmarks

  • Benchmarks

User Reference Guide

  • User Reference Guide
    • pyapprox.analysis Package
    • pyapprox.bayes Package
    • pyapprox.benchmarks Package
    • pyapprox.expdesign Package
    • pyapprox.interface Package
    • pyapprox.multifidelity Package
    • pyapprox.optimization Package
    • pyapprox.surrogates Package
    • pyapprox.util Package
    • pyapprox.variables Package
      • Functions
        • print_statistics
        • combine_uncertain_and_bounded_design_variables
      • Classes
PyApprox
  • User Reference Guide
  • print_statistics
  • View page source

print_statistics

pyapprox.variables.print_statistics(samples, values=None, sample_labels=None, value_labels=None)[source]

Print statistics about a set of samples and associated values

Parameters:
samplesnp.ndarray (num_vars,num_samples)

Random samples

valuesnp.ndarray (num_samples,num_qoi)

Function values at samples

Examples

>>> num_vars = 2
>>> np.random.seed(1)
>>> samples = np.random.normal(0, 1, (num_vars, 100))
>>> values = np.array([np.sum(samples**2, axis=0), 2*np.sum(samples**2, axis=0)]).T
>>> print_statistics(samples, values)
           z0         z1         y0         y1
count  100.000000 100.000000 100.000000 100.000000
mean     0.060583   0.152795   1.679132   3.358265
std      0.885156   0.931995   1.705877   3.411753
min     -2.301539  -2.434838   0.031229   0.062458
max      2.185575   2.528326   9.575905  19.151810
Previous Next

© Copyright 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software..

Built with Sphinx using a theme provided by Read the Docs.