goem

command module
v0.0.0-...-946c296 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2019 License: LGPL-3.0 Imports: 4 Imported by: 0

README

goem - EM algorithm implementation for golang

GoDoc Build Status Coverage Status

goem requires Go version 1.4.2 or greater

Description

This package is an implementation of golang to use EM algorithm

EM-algorithm(expectation maximization) is a method for finding maximum likelihood estimates of hidden statistical parameters.

Usage of commandline

go run main.go -m=1.0 -d=pic/ < space_separated.txt

Two-dimentional example data of space_separated.txt is below.

0.471726116612005	0.266595928855752
0.308522155121713	0.0859873278429996
0.444219121551699	0.92693805785837
0.232566914860858	0.314525852686857
0.559125332185874	0.867327637203401
0.399080742257205	0.817437666085725
0.536394027063934	0.474805220342716

Important options are below.

  • verbose(v bool): if it is true, graphs might be output in pic/ and show the result implicit.
  • meanshift(m float64): you have to try to search the suitable parameters to avoid getting localized solution.
  • directory(d string): where to save plotted images of EM-algorithm iteration.

Use the following command if you want to know more details of flags.

go run main.go --help
Convert Plotted PNG to Animation GIF

Use ImageMagick.

convert -delay 50 *.png animation.gif

Install

Please git clone. If you want to use it as a package, use go get.

go get github.com/6br/goem

LICENSE

Please see LICENSE.

Using library packages below.

  • github.com/gonum/matrix
  • github.com/gonum/plot

(Copyright (c)2013 The gonum Authors. All rights reserved.)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL