Coder Social home page Coder Social logo

formula's Introduction

Build Status Go Report Card codecov GoDoc

formula : Formula parser for Go

formula is a library for building data sets in Go using formulas. The most common use-case for this library is to build design matrices for use in statistical regression analysis. The formulas in this package behave much like formulas in R, Julia, Matlab, and Python (using Patsy). Interactions, algebraic expansion, and dummy-coding are all supported. Compared to these other formula packages, there are a few simplifying differences:

  • Only one-sided formulas are supported. Multiple formulas can be parsed together to produce a single dataset. To produce a dataset for a regression model, parse two formulas at once -- one formula for each side of the regression relationship.

  • Main effects are not automatically included for interactions. Include them manually as desired.

  • Functions (transformations) must be deterministic, not "stateful"

Design: The data to be processed using formulas must be accesed through a DataSource, which is a simple interface that allows slices to be retrieved by name. Parsing one or more formulas produces a ColSet, which contains all the variables resulting from parsing the formula(s). A ColSet is interchangeable with a statmodel.Dataset, so can be passed directly into that package for modeling.

Modeling: This package does not fit any statistical models. If you want to fit a model to the dataset produced by the formula package, you can use one of these packages: GLM, duration.

See here for examples that use this package to produce datasets, and that then use the statmodel package to fit regression models.

formula's People

Contributors

kshedden avatar

Stargazers

 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.