Coder Social home page Coder Social logo

fiddy's People

Contributors

dilpath avatar dweindl avatar ffroehlich avatar stephanmg avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

stephanmg

fiddy's Issues

Refactor gradient check

  • split gradient check into gradient calculator and gradient checker
    • gradient calculator for applications requiring FD gradients
  • gradient checker can stop calculating gradients for all sizes as soon as the check passes for any size
  • parallelize
  • refactor "check" functions and "postprocessor" functions to be more user-friendly (e.g. move into new Python file)
    • show examples of how to customize checks with e.g. functools.partial
  • add argument option to output results to file

Reconsider design for custom methods

At the moment, it's expected to be a class, that is then initialized with a function. Instead, we could expect some callable that accepts size/direction/point and returns the derivative.

fiddy/fiddy/derivative.py

Lines 177 to 183 in c015e4a

method = custom_methods.get(
method_id,
methods.get(
method_id,
None,
),
)(function=function)

Refactor to only support `fiddy.function.Function`-type functions, and store history

Store each function call as a dataclass object, and the history would be a list of such objects.

Only support fiddy.function.Function so history can be automatically generated inside __call__.

Pros:

  • can be used as a cache
    • either remove fiddy.function.CachedFunction, or disable history if CachedFunction is used
      • caching user option as a fiddy.function.Function attribute (e.g. boolean save_history and history_as_cache)
  • can be easily converted to a human-readable format e.g. pandas DataFrame
    • and store/load history (cache) as a DataFrame
  • easy to query results and reuse, if a DataFrame

Cons:

  • speed
    • need to limit slow pandas operations such as append
    • may be slower than the current disk or ram caching (can support all caching options)

Clean up all docstrings

  • fix crosslinks
  • add docs to everything
  • fix missing TYPE_OUTPUT and TYPE_FUNCTION (low priority)

Intelligent step size generator

  • e.g. in gradient check, step size could be relative to expected gradient
  • method to "move towards" best step size automatically
    • interpolation function
    • Newton's method

Usage guides

  • add "getting start" page to RTD
  • Jupyter notebook tutorials

Refactor steps

  • remove steps (only support directions and sizes, with helper function to construct)
  • rename "dimension" to "direction" everywhere (i.e. directional derivative)
  • possibly rename gradient to derivative (can do when higher-order derivatives are supported)

Multiple methods

  • allow users to run e.g. gradient checks with multiple methods (e.g. forward, backward, and central)
  • store results such that e.g. comparison is easy (i.e. to see whether methods return consistent results, as a way to assess how trustworthy a FD result is for the problem)

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.