File: simple.README

package info (click to toggle)
multimix 19981218-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,652 kB
  • ctags: 233
  • sloc: sh: 65; makefile: 51; ansic: 30
file content (40 lines) | stat: -rw-r--r-- 989 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
# use multimix to separate observations into two groups

# to see how the data file simple.dat was created, see simple.c
# to see how the parameter file simple.param was created, see simple.log


# output files may not already exist
rm -f GROUPS.OUT GENERAL.OUT

# use multimix to find the groups
multimix <<EOF
simple.dat
simple.param
EOF

# separate the oservations into two files,
# depending on the group assigned by multimix
awk '
{
  group_number=$1;
  getline data < "simple.dat";
  print data > "group" group_number;
}' GROUPS.OUT

# display the original data (under X windows)
gnuplot -persist <<\EOF
set label "original data" at graph 0,1.02
plot "simple.dat", \
    'simple.circle' using ($1):($2+1) title 'hint 1' with lines, \
    'simple.circle' using ($1+7):($2+5) title 'hint 2' with lines
EOF

# display the two groups in different colors (under X windows)
gnuplot -persist <<EOF
set label "groups found by multimix" at graph 0,1.02
plot "group1","group2"
EOF