Histogram
less than a minute
class Histogram
W&B class for histograms.
This object works just like numpy’s histogram function https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html
Attributes:
bins
([float]): Edges of binshistogram
([int]): Number of elements falling in each bin.
method Histogram.__init__
__init__(
sequence: Optional[Sequence] = None,
np_histogram: Optional[ForwardRef('NumpyHistogram')] = None,
num_bins: int = 64
) → None
Initialize a Histogram object.
Args: sequence: Input data for histogram. np_histogram: Alternative input of a precomputed histogram. num_bins: Number of bins for the histogram. The default number of bins is 64. The maximum number of bins is 512.
Examples: Generate histogram from a sequence.
import wandb
wandb.Histogram([1, 2, 3])
Efficiently initialize from np.histogram.
import numpy as np
import wandb
hist = np.histogram(data)
wandb.Histogram(np_histogram=hist)
Feedback
Was this page helpful?
Glad to hear it! If you have more to say, please let us know.
Sorry to hear that. Please tell us how we can improve.