Skip to main content

Set of utilities for ploting results of non-deterministic experiments, e.g. machine learning, optimization, genetic algorithms.

Project description

Pen'n'paper

Pen'n'paper is a package to easily collect the data about (noisy) processes and plot them for comparison. This package is not aiming at feature completeness. Instead it should give you an easy start during the phase of the project when you want to just concentrate on an experimental idea.

Installation: pip install pennpaper

By example:

# We have a mysterious function that we would like to better understand on the interval [0.1, 5.].
# Unfortunately the function is noisy.

import numpy as np

X = np.arange(0.1, 5, step=0.01)

import random


def noisy_mapping(mapping):
    def _(x):
        y = mapping(x)
        y += random.gauss(0, 1)
        return y

    return _


pow2 = noisy_mapping(lambda x: x ** 2)


# lets record the pairs (x, f(x)) in a metric and make a plot:
from pennpaper import Metric, plot_group, plot

m1 = Metric("pow2")
for x in X:
    m1.add_record(x, pow2(x))

plot(m1)

# try again - see in how far it repeats itself.
m2 = Metric("pow2_second_try")
for x in X:
    m2.add_record(x, pow2(x))

# lets plot two metrics side-by-side
plot_group([m1, m2])


# Actually, m1 and m2 are metrics of the same process. 
# What if we create a new metric tracking the mean and stddev of this process?
m3 = m1 + m2
plot(m3)

# the plot is too noisy to understand. We can smoothen it!
plot(m3, smoothen=True)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pennpaper-0.15.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

pennpaper-0.15-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file pennpaper-0.15.tar.gz.

File metadata

  • Download URL: pennpaper-0.15.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for pennpaper-0.15.tar.gz
Algorithm Hash digest
SHA256 59524c1aab29fe4c1428ffdea9de16b092e7978c4b729950a01ce95ae6982f05
MD5 0cbdb5955b12520acf798f69b23833ca
BLAKE2b-256 f2df3e9a72d59d1d9c13a38d2138c524acf1303ae59e0c6ba0b5fa471136333f

See more details on using hashes here.

File details

Details for the file pennpaper-0.15-py3-none-any.whl.

File metadata

  • Download URL: pennpaper-0.15-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for pennpaper-0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 bbf72f4429b77916f6bd56a5fb91586a8c41382746a549184454da77ccc22791
MD5 d6a714ae53e3ec49fab1ae5d4a9adf8e
BLAKE2b-256 c1a98e6da6dd840e0b5cdb726d656d61db692fc30c5243611d387e289995eac3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page