Examples

Simulated data

Density estimation using example data simulated by SUFTware.

import suftware as sw

# Simulate data using a pre-specified distribution
data = sw.simulate_dataset(name='GM_Wide', num_data_points=100)

# Perform one-dimensional density estimation
density = sw.DensityEstimator(data)

# Plot results and save to file
density.plot(title='Gaussian mixture, wide separation')

Real data

Density estimation using real data included in SUFTware.
import suftware as sw

# Retrieve data included with SUFTware
dataset = sw.ExampleDataset('who.alcohol_consumption')

# Perform one-dimensional density estimation
density = sw.DensityEstimator(dataset.data)

# Plot results and annotate with metadata
density.plot(title=dataset.description, xlabel=dataset.units)