Coder Social home page Coder Social logo

loess.jl's Introduction

Loess

Build Status Loess Loess

This is a pure Julia loess implementation, based on the fast kd-tree based approximation described in the original Cleveland, et al papers, implemented in the netlib loess C/Fortran code, and used by many, including in R's loess function.

Synopsis

Loess exports two functions: loess and predict, that train and apply the model, respectively.

using Loess

xs = 10 .* rand(100)
ys = sin(xs) .+ 0.5 * rand(100)

model = loess(xs, ys)

us = collect(minimum(xs):0.1:maximum(xs))
vs = predict(model, us)

using Gadfly
p = plot(x=xs, y=ys, Geom.point, Guide.xlabel("x"), Guide.ylabel("y"),
         layer(Geom.line, x=us, y=vs))
draw(SVG("loess.svg", 6inch, 3inch), p)

Example Plot

There's also a shortcut in Gadfly to draw these plots:

plot(x=xs, y=ys, Geom.point, Geom.smooth, Guide.xlabel("x"), Guide.ylabel("y"))

Status

Multivariate regression is not yet fully implemented, but most of the parts are already there, and wouldn't require too much additional work.

loess.jl's People

Contributors

andreasnoack avatar bjarthur avatar dcjones avatar iainnz avatar iamed2 avatar johnmyleswhite avatar ken-b avatar randyzwitch avatar ranjanan avatar simonbyrne avatar timholy avatar tlnagy avatar viralbshah avatar yuyichao 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.