GitXplorerGitXplorer
i

pennpaper

public
3 stars
0 forks
1 issues

Commits

List of commits on branch master.
Unverified
82c8a7a55a2407ed44d095036ed4ae8f2d004b04

don't rely on numpy for stddev

committed 4 years ago
Verified
c017164734999874ad2623ff0d412b0a27a7e826

Update README.md

iikamensh committed 5 years ago
Unverified
63979c12d065578be6cecf6f2b7a0d22751e9a00

length of conv filter is always less than length of the array.

committed 5 years ago
Unverified
9c1a19c43a04fe5f5ba5fdaf2c2c8ad8bcff65a7

merge in is faster for matching keys

committed 5 years ago
Unverified
aa4ae25727b772c0b03ca3c79036b02f1642570f

handle merge of two metrics with different name (warning)

committed 5 years ago
Unverified
452f98e6702f0dcead2bfa674647f57dc88deb1a

smoothen boundary effects tackled, using conv now

committed 5 years ago

README

The README file for this repository.

Pen'n'paper

Downloads

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)