GithubHelp home page GithubHelp logo

uros-stegic / exptest2 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 34 KB

exptest2 is R package that provides implementations of new (integral- and Kolmogorov- type) exponentiality tests introduced in paper [needs citation here] and also reimplementations of those provided by the package exptest.

License: GNU General Public License v3.0

R 2.18% C++ 97.82%

exptest2's Introduction

exptest2

exptest2 is R package that provides implementations of new (integral- and Kolmogorov- type) exponentiality tests introduced in paper [needs citation here] and also reimplementations of those provided by the package exptest.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

In ordrer to run and develop this software, you'll need the following things installed on your computer:

  • R
  • RStudio (this tutorial uses RStudio, console-type usage is not covered here)
  • rcpp (available in CRAN repository)
  • boost
  • C++ compiler (with C++11 support)
  • rbenchmark (optional, used to measure running times, also available in CRAN)

Installing

Building from source

To build this package, open it in RStudio and press the shortcut Ctrl+Shift+B which will compile the project and open new environment with this library included and ready to use.

Using precompiled binaries

First, you need to download the binary package here. After that, open RStudio and from the menu bar select Tools -> Install Packages... and in the popup window, in the Install From: dropdown menu select Package Archive File (.tar.gz). Then find and select the binary package you downloaded and hit Install.

Usage

ExpTest exports two functions for testing wether the given distribution comes from exponential family. See this example:

# Shows usage of both exp_test_integral and exp_test_kolmogorov functions
> library(ExpTest)
> x <- rexp(50)
> exp_test_integral(x)
[1] 0.003244134
> exp_test_kolmogorov(x)
[1] 0.07005984

For speed testing, you can use rbenchmark library that can be installed from CRAN. To measure speed of these functions, simply call the benchmark function like this:

# Measure running times of these two functions
> library(ExpTest)
> library(rbenchmark)
> x <- rexp(30)
> benchmark(replications = rep(1, 1, 1), exp_test_integral(x), exp_test_kolmogorov(x))
                    test replications elapsed relative user.self sys.self user.child sys.child
1   exp_test_integral(x)            1   0.018        1     0.019        0          0         0
2 exp_test_kolmogorov(x)            1   0.018        1     0.018        0          0         0

Authors

License

This project is licensed under the GNU GPL-3 License - see the LICENSE file for details

exptest2's People

Contributors

uros-stegic 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.