A Statistical Package Based
- n Pnuts
Junji NAKANO The Institute of Statistical Mathematics Takeshi FUJIWARA
The Graduate University for Advanced Studies
Yoshikazu YAMAMOTO Tokushima Bunri University Ikunori KOBAYASHI Tokushima Bunri University JAPAN
A Statistical Package Based on Pnuts Junji NAKANO The Institute of - - PowerPoint PPT Presentation
A Statistical Package Based on Pnuts Junji NAKANO The Institute of Statistical Mathematics Takeshi FUJIWARA The Graduate University for Advanced Studies Yoshikazu YAMAMOTO Tokushima Bunri University Ikunori KOBAYASHI Tokushima Bunri University
Junji NAKANO The Institute of Statistical Mathematics Takeshi FUJIWARA
The Graduate University for Advanced Studies
Yoshikazu YAMAMOTO Tokushima Bunri University Ikunori KOBAYASHI Tokushima Bunri University JAPAN
2
We are developing Jasp (Java based statistical
Outline of my talk
3
We have a lot of statistical systems, which
have long history are reliable are sophisticated by adopting new technologies
GUI Internet
are not so expensive (some are free!)
However, we want to have new one. Why?
4
We need fully controllable system
Basic structure may be changed for realizing
We have to understand details of the system
We want to be free from the original
5
Need for newly designed system
In many available systems, new functions were
As computer has been changing rapidly,
6
We (ISM) needs new statistical system
Many Fortran programs exist in ISM They are not easy to use
Development of Data mining
Requirement for general purpose system Statistical model using both mathematics and algorithm
We should have know-how for making large
7
Java adopts many new technologies in a
Platform independent Purely object oriented Good libraries
Network (TCP/IP) GUI support and Graphics
Interface to other languages (Java Native
8
Advanced network functions
Web based execution (Applet) Using remote objects (Remote Method Invocation, RMI)
Security
Demerits
slow speed politically unstable
Java is easy to use, at least compared with before Merits are bigger than demerits
9
Function based languages (e.g. S, XploRe)
are intuitive and flexible are not good at bundling similar notions
Object oriented languages (e.g. Java)
are good at arranging notions are not easy to use tentatively
Both function based and object oriented abilities
Function based abilities are for interactive use Object oriented abilities are for reusing programs
10
Pnuts is a function based script language
Simple syntax Easy access to Java class Built-in language extension facility, with examples for
Pnuts -> Java translator Source is available freely http://javacenter.sun.co.jp/pnuts/
11
“Jampack” for matrix manipulation
ftp://math.nist.gov/pub/Jampack/Jampack/Abo
“Ptplot” for graphics
http:// ptolemy.eecs.berkeley.edu/java/ ptplot/
“Colt” for statistical distributions and
http://nicewww.cern.ch/hoschek/colt/
12
1 −
function ols(y, x){ coeff = (x.trans * x).inv * x.trans * y return coeff }
function forecast(x, b){ y_hat = x * b return h_hat }
13
jaspclass LinearRegression { method LinearRegression(y, x){ // constructor this.beta = ols(y,x) // slot this.forecast = forecast(x,this.beta) // slot } function ols(y, x){ coeff = (x.trans * x).inv * x.trans * y return coeff } function forecast(x, b){ y_hat = x * b return h_hat } }
Note that functions are not modified
14
Recently, almost all software products are
Most statistical systems also have GUIs
Show lists of functions as menus Generate beautiful graphs by mouse operations
15
We need to manipulate data and models in
These operations are difficult to be defined by
They are properly described by programs
CUIs are easy to use for professional or
16
Both GUI and CUI are required for statistical
We propose “mixed user interface”
GUI and CUI can be used almost independently They can be used together seamlessly and
17
We need to do trials and errors to get
Recording the history of the analysis is
We implement it in our GUI as data based
18
We develop the user interface of Jasp for
Jasp has two windows for GUI and CUI Operations on one window are automatically
19
CUI is an environment for writing and
We can edit functions on the upper window We can execute commands on the lower
20
Pull-down menus Buttons Editor area Input and output area
21
GUI window is another environment for operating
All the functions and statistical objects are listed on the
Data are displayed as icons which are arranged to
Almost all operations can be performed through
Exceptions: Defining new functions and new statistical
22
Pull-down menu Icons Popup menu Functions, methods Graphs Statistics
23
Situation sensitive menu
Menu items are arranged by specified object
Executed operations depend on specified object
Menu items are applicable methods of
24
We can execute functions and methods in
If the function or method requires some
We can drag and drop icons on the upper left
25
Jasp system consists of server and client
The user interface runs as the client program
Jasp client can be invoked both as an
Jasp runs on many platforms supported by
26
27
Need for distributed computing
We can use many powerful computers connected by
Computer intensive statistical techniques are popular
simulation, resampling maximization of complex likelihood function
Existing distributed computing technologies are
MPI (Message Passing Interface) PVM (Parallel Virtual Machine)
28
remotes(commands)
commands: ArrayList of commands Execute commands simultaneously
remote(command,server)
Execute command on server
send(var1,var2,server)
var1: variable on local computer var2: variable on server Execute “var2 = var1” on server
29
cmds = ArrayList() cmds.add(“mean1 = ranMean(50000)”) cmds.add(“mean2 = remote(¥”ranMean(50000)¥”,¥”Serv2¥”) cmds.add(“mean3 = remote(¥”ranMean(50000)¥”,¥”Serv3¥”) remotes(cmds) mean = (mean1 + mean2 + mean3) / 3
30
We have many programs written in Fortran, C,
Jasp has interface to such programs and use them
We implement this using JNI(Java Native
31
JNI is Java API(Application Programming Interface)
Using JNI, we can call native code from Java (and
This is useful to reuse exiting programs and to
32
Build a DLL(Dynamic Link Library) or shared
Create a Java class to DLL and shared library
Use this Java class from Jasp
Shared Library
33
Jasp (Java based statistical processor)
Function based and object oriented language New GUI
Connected tightly to CUI Express the analysis history by icons
Distributed computing
Client/server Web browser Parallel processing Use Fortran or C/C+ + programs
Our web site: http:// jasp.ism.ac.jp/