Skip to main content

Sketchable function and density simulations for data science

Project description

Sketulate

Sketulate is a Python package for interactive function, surface, and density simulation directly in Jupyter notebooks. Draw functions, surfaces, or densities with your mouse, convert them into callable functions or density distributions, and simulate data for experiments, modeling, or teaching.

Features

  • Sketch univariate functions interactively (Sketulate)
  • Sketch 2D surfaces / interactions effects (SketulateInteraction)
  • Sketch density distributions
  • Generates easy to use functions and sampleable density distributions
  • Works seamlessly in Jupyter Notebook
  • Easy integration for synthetic data generation

Installation

pip install sketulate

## Quick Example
from sketulate import Sketulate, SketulateInteraction

# Draw a univariate function
f1 = Sketulate(x_min=0, x_max=10, y_min=-5, y_max=5)
f1.sketch()

Sketch a Function

f1.accept(callback)  # After drawing, click Accept
# F1 is a now a ready to use function via
f1.f
# Or a custom density distribution (selected in the canvas dropdown) via
f1.g

Sketch a Density

# Draw an interaction surface
f3 = SketulateInteraction(x_range=(0,10), y_range=(0,10), z_range=(-5,5), grid_size=5)
f3.sketch()  # Interactive surface with sliders

Sketch Interaction Surface via Sliders

Put it all together and easily simulate some data

Sketch a Function

Technical Note

For this version the sketches are modelled via piecewise linear basis functions using sklearn. Interaction surfaces are modelled using the LinearND interpolator from scipy. In addition, linear extrapolation is, by default, provided outside of the given ranges. Careful!

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

sketulate-0.1.0.tar.gz (953.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sketulate-0.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file sketulate-0.1.0.tar.gz.

File metadata

  • Download URL: sketulate-0.1.0.tar.gz
  • Upload date:
  • Size: 953.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for sketulate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3220bf19bb7fdc20fc5297deb9fa52e7e39155dd50a155ddd50ff99a8f06ce68
MD5 3609dc9a84e71f833e7e65f3fb7a95d3
BLAKE2b-256 83e0f883208ddc9430b5762e34f22dd4a0d67c2d9845c16de05b1883c80516aa

See more details on using hashes here.

File details

Details for the file sketulate-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sketulate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for sketulate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87092c7b2df44b6f9ada619af9df9aad1011af7ab544895309919a20409086d3
MD5 920c7e4d8578e7c525c7a536c9a7aca4
BLAKE2b-256 d8211e53134f865f75b10f9f46d350ea652dbcb3f55f043e318ebb02873ffdf5

See more details on using hashes here.

Supported by

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