Giter Club home page Giter Club logo

matchgrowth's Introduction

About

WARNING: This was an experiment. The answer is in the negative. Matching resource utilization over increasing input sizes is not possible in this way. This tool should not be used for serious purposes.

This module provides a CLI tool for approximate lower bounds according to a catalog of prescribed growth rates.

The tool currently features most well-known classes of growth rates and works by fitting each generic growth rate function to the given data.

Its primary use case is estimating time or space growth rates of various algorithms, but it can also be used on data coming from physical measurements.

Install

To install from pypi:

pip3 install --user matchgrowth

Usage

The CLI tool expects --infile with a valid CSV file path, and --col1 and --col2 each with a column name present in the CSV file. Currently the CSV file needs to have headers for all columns, in the first row.

The --top parameter allows to limit the number of matched growth rates reported.

The --outfile parameter is optional and allows to write the generated plot to a PNG file on disk. If the --outfile parameter is not passed, the default GUI from matplotlib will be used to display the plot.

usage: match-growth.py [-h] --infile INFILE [--outfile OUTFILE] --col1 COL1
                       --col2 COL2 [--top TOP] [--catalog CATALOG] [--debug]
                       [--plot PLOT_TYPE]

Tool for estimating growth rates

optional arguments:
  -h, --help         show this help message and exit
  --infile INFILE    CSV input file with measurements
  --outfile OUTFILE  PNG file to write the plot to
  --col1 COL1        data column 1 from the CSV
  --col2 COL2        data column 2 from the CSV
  --top TOP          only print top N closest growth rates
  --catalog CATALOG  select the function catalog to use
  --debug            enable debug mode
  --plot PLOT_TYPE   plot type (normal|loglog)

Example usage:

match-growth.py --infile ./tests/modif7_bench.txt --outfile r1.png --col1 N --col2 memory --top 2

In this example we're estimating the closest growth rate for an algorithm that has a single input N and for which we've already recorded the memory usage for different values of N.

drawing

Support

For questions or requests for paid support, please send an e-mail to [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.