Git Product home page Git Product logo

numerics's Introduction

Author: Amit Rotem

Last modified: 10/24/2019

These headers take advantage of the armadillo linear algebra library and require it for both compiling and linking. All the functions can be found in the header file and in the documentation file.

basic installation instructions:

I have only a simple CMakeLists.txt, so any modifications will have to be provided by you, the user. This library has only been tested on linux. Most recent versions of gcc should be able to compile OpenMP instructions, this library uses some OpenMP instructions here and there, so verifying omp.h exists on your system will significantly improve the performance of some of the data science functions.

  1. install Armadillo +v9.2 and matplotlibcpp (optional).
  2. cd /numeric-lib/
  3. cmake .
  4. make
  5. sudo make install

basic compiling instructions:

This assumes you have both armadillo and numerics installed in the default locations that your compiler can find (e.g. /usr/local/lib/).

g++ main.cpp -O3 -lnumerics -larmadillo

The order is important because libnumerics also has to link against libarmadillo. It is also recommended that you use optimization during compile, such as -O2, or -O3.

numerics.hpp is a scientific computing library hosting:

  • integration (4th order, 7-pt lobatto, spectral).

  • root finding methods (derivative, derivative free, and mixed methods).

  • error control, and approximation options for root finding passed to solver via class interface.

  • optimization methods (unconstrained and box constraints. Function, Gradient, and Hessian based methods).

  • interpolation schemes (lagrange, cubic, and fourier interpolation).

  • machine learning and data analysis tools:

    • train/test splitting.
    • k-means clusttering.
    • regularized linear regression.
    • kernel linear basis regression and classification.
    • kernel based smoothing.
    • kernel density estimation.
    • nearest neighbors regression and classification.
    • built in cross validation for automatic parameter selection for all models.
  • simple finite difference methods (for approximating derivatives).

  • uniform spectral derivatives over an interval.

namespace numerics::ode for solving ordinary differential equations

  • Discrete differentiation matrices
  • explicit constant and adaptive step size IVP solvers (4th order)
  • implicit constant and adaptive step size IVP solvers (1st, 2nd, 4th, and 5th order)
  • implicit solvers use quasi-Newton methods making them more efficient than fixed point iteration.
  • event handling and other options passed to solver via class interface.
  • nonlinear BVP solver (4th, and upto spectral order)

For an in depth overview, refer to the documentation.md file. There are also example files for most of the functions found in /examples/ directory.

Note, many of the examples rely on "matplotlibcpp.h" which is used for visualising results of many of the algorithms. To use this feature install "matplotlibcpp.h" and make sure you have a developer version of python 2.7.

numerics's People

Contributors

arotem3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.