Giter VIP home page Giter VIP logo

mcmi's Introduction

Monte Carlo Method for Multivariable Integration

A toy R package to teach myself the process of developing R packages. Calculate and visualize Multiple Integral using Monte Carlo method. View Demo

Installation

require(devtools)
devtools::install_github("ddlee96/mcmi")

Usage

mcimi::mcmi(bounds, integrand, constrains, n)
mcmi::visualize(boungds, constrains)
Parameters
  • bounds: the interval to calculate integral
  • integrand: the integrand, like f(x) = x, default: 1
  • constrains: the inequalities that variable should satisfy, default: 1
  • n: the count of random points, default: 1,000,000
1D Definite integral
mcmi(c(0,1), "exp(x)")
Multiple integral
mcmi(c(1,3,-1,4), "x*y+x", c("x^3+y^3<=29", "y>=exp(x)-2")

Limits

  • only support up to 3D
  • only support x, y, z as variables
  • accuracy not satisfying

mcmi's People

Contributors

ddlee-cn avatar

Watchers

James Cloos 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.