More Related Content
Similar to Incanterの紹介 (20)
Incanterの紹介
- 2. INCANTER
の紹介
Twitter : @Mozk_
生物情報科学科 4年
- 5. LISPとは???
(defun local-similarity (a b) ;; a, b : sequence
(declare (optimize (speed 3) (safety 0) (debug 0)))
(let ((memo (make-hash-table :test 'equal)))
(labels ((dp (x y)
(declare (fixnum x y))
(or #1=(gethash `(,x ,y) memo)
(setf #1#
(cond ((< x 0) 0)
((< y 0) 0)
(:else (let ((diagonal-local-distance
(if (eql (elt a x)
(elt b y))
1
-1)))
(max (+ diagonal-local-distance
(dp (1- x) (1- y)))
(1- (dp (1- x) y))
(1- (dp x (1- y)))
0))))))))
(iter outer (for x from 0 below (length a))
(iter inner (for y from 0 below (length b))
(in outer (maximizing (dp x y))))))))
- 6. Lispははるか昔に作られた
Javaよりも昔
Cよりも昔
Fortranよりも昔
コンピュータよりも昔
人類よりも昔
地球ができるよりも昔
宇宙自体がLispプログラムであり
本物のLisperがわざわざ実装
しようとしないのも当然だ
『Lispの真実』(http://www.aoky.net/articles/leon_bambrick/lisp_truth.htm)
- 10. 立ち上げると
なんか、しょぼい・・・
おまじない:
(use '(incanter core stats charts))
- 14. どんどん比較
● (dataset [“x1” “x2”]
[[1 2 3]
[4 5 6]])
● data.frame(x1 = c(1,2,3),
x2 = c(4,5,6))
- 15. どんどん比較
● (read-dataset “http://hoge.jp/a.csv”
:header true)
● read.table(“http://hoge.jp/a.csv”,
header = T)
- 20. 柔軟
(with-data iris
(view $data)
(view ($ [:Sepal.Length :Sepal.Width]))
(view ($ [:not :Petal.Width])))
(view ($data iris))
(view ($[:Sepal.Length :Sepal.Width] iris))
(view ($[:not :Petal.Width] iris)))
- 21. Clojureの純粋な拡張である
● Incanterを使ってウェブアプリ
● http://data-sorcery.org/
2009/11/29/incanter-webapp/