Giter VIP home page Giter VIP logo

autologistic.jl's Introduction

Autologistic

Build Status codecov

A Julia package for computing with the autologistic (Ising) probability model and performing autologistic regression.

Autologistic regression is like an extension of logistic regression that allows the binary responses to be correlated. An undirected graph is used to encode the association structure among the responses.

The package follows the treatment of this model given in the paper Better Autologistic Regression. As described in that paper, different variants of "the" autologistic regression model are actually different probability models. One reason this package was created was to allow researchers to compare the performance of the different model variants. You can create different variants of the model easily and fit them using either maximum likelihood (for small-n cases) or maximum pseudolikelihood (for large-n cases).

At present only the most common "simple" form of the model--with a single parameter controlling the association strength everywhere in graph--is implemented. But the package is designed to be extensible. In future different ways of parametrizing the association could be added.

Much more detail is provided in the documentation.

# To get a feeling for the package facilities.
# The package uses LightGraphs.jl for graphs.
using Autologistic, LightGraphs
g = Graph(100, 400)            #-Create a random graph (100 vertices, 400 edges)
X = [ones(100) rand(100,3)]    #-A matrix of predictors.
Y = rand([0, 1], 100)          #-A vector of binary responses.
model = ALRsimple(g, X, Y=Y)   #-Create autologistic regression model

# Estimate parameters using pseudolikelihood. Do parametric bootstrap
# for error estimation.  Draw bootstrap samples using perfect sampling.
fit = fit_pl!(model, nboot=2000, method=perfect_read_once)

# Draw samples from the fitted model and get the average to estimate
# the marginal probability distribution. Use a different perfect sampling
# algorithm.
marginal = sample(model, 1000, method=perfect_bounding_chain, average=true)

autologistic.jl's People

Contributors

juliatagbot avatar juliohm avatar kramsretlow avatar

Watchers

 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.