Skip to content

Commit e5fd070

Browse files
committed
Classification in Action: Complete coding our binary classifier for our own mnist & sonar libraries.
1 parent 4b6a0a0 commit e5fd070

File tree

10 files changed

+2973
-4
lines changed

10 files changed

+2973
-4
lines changed

fundamentals/datasets/sonar/sonar.all-data

Lines changed: 208 additions & 0 deletions
Large diffs are not rendered by default.

fundamentals/datasets/sonar/sonar.mines

Lines changed: 1341 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
NAME: Sonar, Mines vs. Rocks
2+
3+
SUMMARY: This is the data set used by Gorman and Sejnowski in their study
4+
of the classification of sonar signals using a neural network [1]. The
5+
task is to train a network to discriminate between sonar signals bounced
6+
off a metal cylinder and those bounced off a roughly cylindrical rock.
7+
8+
SOURCE: The data set was contributed to the benchmark collection by Terry
9+
Sejnowski, now at the Salk Institute and the University of California at
10+
San Deigo. The data set was developed in collaboration with R. Paul
11+
Gorman of Allied-Signal Aerospace Technology Center.
12+
13+
MAINTAINER: Scott E. Fahlman
14+
15+
PROBLEM DESCRIPTION:
16+
17+
The file "sonar.mines" contains 111 patterns obtained by bouncing sonar
18+
signals off a metal cylinder at various angles and under various
19+
conditions. The file "sonar.rocks" contains 97 patterns obtained from
20+
rocks under similar conditions. The transmitted sonar signal is a
21+
frequency-modulated chirp, rising in frequency. The data set contains
22+
signals obtained from a variety of different aspect angles, spanning 90
23+
degrees for the cylinder and 180 degrees for the rock.
24+
25+
Each pattern is a set of 60 numbers in the range 0.0 to 1.0. Each number
26+
represents the energy within a particular frequency band, integrated over
27+
a certain period of time. The integration aperture for higher frequencies
28+
occur later in time, since these frequencies are transmitted later during
29+
the chirp.
30+
31+
The label associated with each record contains the letter "R" if the object
32+
is a rock and "M" if it is a mine (metal cylinder). The numbers in the
33+
labels are in increasing order of aspect angle, but they do not encode the
34+
angle directly.
35+
36+
METHODOLOGY:
37+
38+
This data set can be used in a number of different ways to test learning
39+
speed, quality of ultimate learning, ability to generalize, or combinations
40+
of these factors.
41+
42+
In [1], Gorman and Sejnowski report two series of experiments: an
43+
"aspect-angle independent" series, in which the whole data set is used
44+
without controlling for aspect angle, and an "aspect-angle dependent"
45+
series in which the training and testing sets were carefully controlled to
46+
ensure that each set contained cases from each aspect angle in
47+
appropriate proportions.
48+
49+
For the aspect-angle independent experiments the combined set of 208 cases
50+
is divided randomly into 13 disjoint sets with 16 cases in each. For each
51+
experiment, 12 of these sets are used as training data, while the 13th is
52+
reserved for testing. The experiment is repeated 13 times so that every
53+
case appears once as part of a test set. The reported performance is an
54+
average over the entire set of 13 different test sets, each run 10 times.
55+
56+
It was observed that this random division of the sample set led to rather
57+
uneven performance. A few of the splits gave poor results, presumably
58+
because the test set contains some samples from aspect angles that are
59+
under-represented in the corresponding training set. This motivated Gorman
60+
and Sejnowski to devise a different set of experiments in which an attempt
61+
was made to balance the training and test sets so that each would have a
62+
representative number of samples from all aspect angles. Since detailed
63+
aspect angle information was not present in the data base of samples, the
64+
208 samples were first divided into clusters, using a 60-dimensional
65+
Euclidian metric; each of these clusters was then divided between the
66+
104-member training set and the 104-member test set.
67+
68+
The actual training and testing samples used for the "aspect angle
69+
dependent" experiments are marked in the data files. The reported
70+
performance is an average over 10 runs with this single division of the
71+
data set.
72+
73+
A standard back-propagation network was used for all experiments. The
74+
network had 60 inputs and 2 output units, one indicating a cylinder and the
75+
other a rock. Experiments were run with no hidden units (direct
76+
connections from each input to each output) and with a single hidden layer
77+
with 2, 3, 6, 12, or 24 units. Each network was trained by 300 epochs over
78+
the entire training set.
79+
80+
The weight-update formulas used in this study were slightly different from
81+
the standard form. A learning rate of 2.0 and momentum of 0.0 was used.
82+
Errors less than 0.2 were treated as zero. Initial weights were uniform
83+
random values in the range -0.3 to +0.3.
84+
85+
RESULTS:
86+
87+
For the angle independent experiments, Gorman and Sejnowski report the
88+
following results for networks with different numbers of hidden units:
89+
90+
Hidden % Right on Std. % Right on Std.
91+
Units Training set Dev. Test Set Dev.
92+
------ ------------ ---- ---------- ----
93+
0 89.4 2.1 77.1 8.3
94+
2 96.5 0.7 81.9 6.2
95+
3 98.8 0.4 82.0 7.3
96+
6 99.7 0.2 83.5 5.6
97+
12 99.8 0.1 84.7 5.7
98+
24 99.8 0.1 84.5 5.7
99+
100+
For the angle-dependent experiments Gorman and Sejnowski report the
101+
following results:
102+
103+
Hidden % Right on Std. % Right on Std.
104+
Units Training set Dev. Test Set Dev.
105+
------ ------------ ---- ---------- ----
106+
0 79.3 3.4 73.1 4.8
107+
2 96.2 2.2 85.7 6.3
108+
3 98.1 1.5 87.6 3.0
109+
6 99.4 0.9 89.3 2.4
110+
12 99.8 0.6 90.4 1.8
111+
24 100.0 0.0 89.2 1.4
112+
113+
Not surprisingly, the network's performance on the test set was somewhat
114+
better when the aspect angles in the training and test sets were balanced.
115+
116+
Gorman and Sejnowski further report that a nearest neighbor classifier on
117+
the same data gave an 82.7% probability of correct classification.
118+
119+
Three trained human subjects were each tested on 100 signals, chosen at
120+
random from the set of 208 returns used to create this data set. Their
121+
responses ranged between 88% and 97% correct. However, they may have been
122+
using information from the raw sonar signal that is not preserved in the
123+
processed data sets presented here.
124+
125+
REFERENCES:
126+
127+
1. Gorman, R. P., and Sejnowski, T. J. (1988). "Analysis of Hidden Units
128+
in a Layered Network Trained to Classify Sonar Targets" in Neural Networks,
129+
Vol. 1, pp. 75-89.

0 commit comments

Comments
 (0)