(Download PDF) Data Mining Practical Machine Learning Tools and Techniques Fourth Edition Ian H Witten Online Ebook All Chapter PDF
(Download PDF) Data Mining Practical Machine Learning Tools and Techniques Fourth Edition Ian H Witten Online Ebook All Chapter PDF
(Download PDF) Data Mining Practical Machine Learning Tools and Techniques Fourth Edition Ian H Witten Online Ebook All Chapter PDF
https://textbookfull.com/product/practical-data-science-with-sap-
machine-learning-techniques-for-enterprise-data-1st-edition-greg-
foss/
https://textbookfull.com/product/data-mining-and-data-
warehousing-principles-and-practical-techniques-1st-edition-
parteek-bhatia/
https://textbookfull.com/product/encyclopedia-of-machine-
learning-and-data-mining-2nd-edition-claude-sammut/
https://textbookfull.com/product/statistical-and-machine-
learning-data-mining-third-edition-techniques-for-better-
predictive-modeling-and-analysis-of-big-data-third-edition-bruce-
Machine Learning and Data Mining in Aerospace
Technology Aboul Ella Hassanien
https://textbookfull.com/product/machine-learning-and-data-
mining-in-aerospace-technology-aboul-ella-hassanien/
https://textbookfull.com/product/encyclopedia-of-machine-
learning-and-data-mining-2nd-2nd-edition-claude-sammut/
https://textbookfull.com/product/r-data-mining-implement-data-
mining-techniques-through-practical-use-cases-and-real-world-
datasets-1st-edition-andrea-cirillo/
https://textbookfull.com/product/introducing-data-science-big-
data-machine-learning-and-more-using-python-tools-1st-edition-
davy-cielen/
https://textbookfull.com/product/practical-machine-learning-
with-h2o-powerful-scalable-techniques-for-deep-learning-and-ai-
first-edition-cook/
Data Mining
This page intentionally left blank
Data Mining
Practical Machine Learning
Tools and Techniques
Fourth Edition
Ian H. Witten
University of Waikato, Hamilton, New Zealand
Eibe Frank
University of Waikato, Hamilton, New Zealand
Mark A. Hall
University of Waikato, Hamilton, New Zealand
Christopher J. Pal
Polytechnique Montréal, and the Université de Montréal,
Montreal, QC, Canada
This book and the individual contributions contained in it are protected under copyright by the
Publisher (other than as may be noted herein).
Notices
Knowledge and best practice in this field are constantly changing. As new research and experience
broaden our understanding, changes in research methods, professional practices, or medical treatment
may become necessary.
Practitioners and researchers must always rely on their own experience and knowledge in evaluating
and using any information, methods, compounds, or experiments described herein. In using such
information or methods they should be mindful of their own safety and the safety of others, including
parties for whom they have a professional responsibility.
To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume
any liability for any injury and/or damage to persons or property as a matter of products liability,
negligence or otherwise, or from any use or operation of any methods, products, instructions, or ideas
contained in the material herein.
ISBN: 978-0-12-804291-5
List of Figures..........................................................................................................xv
List of Tables..........................................................................................................xxi
Preface ................................................................................................................. xxiii
v
vi Contents
xv
xvi List of Figures
Figure 4.9 (A) Finding all item sets with sufficient coverage; 127
(B) finding all sufficiently accurate association rules
for a k-item set.
Figure 4.10 Logistic regression: (A) the logit transform; (B) example 130
logistic regression function.
Figure 4.11 The perceptron: (A) learning rule; (B) representation as 132
a neural network.
Figure 4.12 The Winnow algorithm: (A) unbalanced version; 134
(B) balanced version.
Figure 4.13 A kD-tree for four training instances: (A) the tree; 137
(B) instances and splits.
Figure 4.14 Using a kD-tree to find the nearest neighbor of the star. 137
Figure 4.15 Ball tree for 16 training instances: (A) instances and 139
balls; (B) the tree.
Figure 4.16 Ruling out an entire ball (gray) based on a target point 140
(star) and its current nearest neighbor.
Figure 4.17 Iterative distance-based clustering. 143
Figure 4.18 A ball tree: (A) two cluster centers and their dividing 145
line; (B) corresponding tree.
Figure 4.19 Hierarchical clustering displays. 149
Figure 4.20 Clustering the weather data. 151
Figure 4.21 Hierarchical clusterings of the iris data. 153
Figure 5.1 A hypothetical lift chart. 185
Figure 5.2 Analyzing the expected benefit of a mailing campaign 187
when the cost of mailing is (A) $0.50 and (B) $0.80.
Figure 5.3 A sample ROC curve. 188
Figure 5.4 ROC curves for two learning schemes. 189
Figure 5.5 Effect of varying the probability threshold: (A) error 193
curve; (B) cost curve.
Figure 6.1 Example of subtree raising, where node C is “raised” 214
to subsume node B.
Figure 6.2 Pruning the labor negotiations decision tree. 216
Figure 6.3 Algorithm for forming rules by incremental reduced- 226
error pruning.
Figure 6.4 RIPPER: (A) algorithm for rule learning; (B) meaning 228
of symbols.
Figure 6.5 Algorithm for expanding examples into a partial tree. 229
Figure 6.6 Example of building a partial tree. 230
Figure 6.7 Rules with exceptions for the iris data. 232
xxviii Preface
radial basis function networks, and also included support vector machines for
regression. We incorporated a new section on Bayesian networks, again in
response to readers’ requests and WEKA’s new capabilities in this regard, with a
description of how to learn classifiers based on these networks, and how to imple-
ment them efficiently using AD trees.
The previous 5 years (19992004) had seen great interest in data mining for
text, and this was reflected in the introduction of string attributes in WEKA, mul-
tinomial Bayes for document classification, and text transformations. We also
described efficient data structures for searching the instance space: kD-trees and
ball trees for finding nearest neighbors efficiently, and for accelerating distance-
based clustering. We described new attribute selection schemes such as race
search and the use of support vector machines; new methods for combining mod-
els such as additive regression, additive logistic regression, logistic model trees,
and option trees. We also covered recent developments in using unlabeled data to
improve classification, including the cotraining and co-EM methods.
THIRD EDITION
For the third edition, we thoroughly edited the second edition and brought it up to
date, including a great many new methods and algorithms. WEKA and the book
were closely linked together—pretty well everything in WEKA was covered in
the book. We also included far more references to the literature, practically tri-
pling the number of references that were in the first edition.
As well as becoming far easier to use, WEKA had grown beyond recognition
over the previous decade, and matured enormously in its data mining capabilities.
It incorporates an unparalleled range of machine learning algorithms and related
techniques. The growth has been partly stimulated by recent developments in the
field, and is partly user-led and demand-driven. This puts us in a position where
we know a lot about what actual users of data mining want, and we have capital-
ized on this experience when deciding what to include in this book.
Here are a few of the highlights of the material that was added in the third edi-
tion. A section on web mining was included, and, under ethics, a discussion of
how individuals can often be “reidentified” from supposedly anonymized data.
Other additions included techniques for multi-instance learning, new material on
interactive cost-benefit analysis, cost-complexity pruning, advanced association
rule algorithms that use extended prefix trees to store a compressed version of the
dataset in main memory, kernel ridge regression, stochastic gradient descent, and
hierarchical clustering methods. We added new data transformations: partial least
squares regression, reservoir sampling, one-class learning, decomposing multi-
class classification problems into ensembles of nested dichotomies, and calibrat-
ing class probabilities. We added new information on ensemble learning
techniques: randomization vs. bagging, and rotation forests. New sections on data
stream learning and web mining were added as well.
Another random document with
no related content on Scribd:
joke took immediately. The officers could not help laughing; for,
though we considered them little better than fiends at that moment of
excitement, they were, in fact, except in this instance, the best-
natured and most indulgent men I remember to have sailed with.
They, of course, ordered the crape to be instantly cut off from the
dogs’ legs; and one of the officers remarked to us, seriously, that as
we had now had our piece of fun out, there were to be no more such
tricks.
Off we scampered, to consult old Daddy what was to be done
next, as we had been positively ordered not to meddle any more with
the dogs.
“Put the pigs in mourning,” he said.
All our crape was expended by this time; but this want was soon
supplied by men whose trade it is to discover resources in difficulty.
With a generous devotion to the cause of public spirit, one of these
juvenile mutineers pulled off his black handkerchief, and, tearing it in
pieces, gave a portion to each of the circle, and away we all started
to put into practice this new suggestion of our director-general of
mischief.
The row which ensued in the pig-sty was prodigious—for in those
days, hogs were allowed a place on board a man-of-war,—a custom
most wisely abolished of late years, since nothing can be more out of
character with any ship than such nuisances. As these matters of
taste and cleanliness were nothing to us, we did not intermit our
noisy labour till every one of the grunters had his armlet of such
crape as we had been able to muster. We then watched our
opportunity, and opened the door so as to let out the whole herd of
swine on the main-deck, just at a moment when a group of the
officers were standing on the fore part of the quarter-deck. Of
course, the liberated pigs, delighted with their freedom, passed in
review under the very nose of our superiors, each with his mourning
knot displayed, grunting or squealing along, as if it was their express
object to attract attention to their domestic sorrow for the loss of
Shakings. The officers were excessively provoked, as they could not
help seeing that all this was affording entertainment, at their
expense, to the whole crew; for, although the men took no part in this
touch of insubordination, they were ready enough, in those idle times
of the weary, weary peace, to catch at any species of distraction or
devilry, no matter what, to compensate for the loss of their wonted
occupation of pommeling their enemies.
The matter, therefore, necessarily became rather serious; and the
whole gang of us being sent for on the quarter-deck, we were ranged
in a line, each with his toes at the edge of a plank, according to the
orthodox fashion of these gregarious scoldings, technically called
‘toe-the-line matches.’ We were then given to understand that our
proceedings were impertinent, and, after the orders we had received,
highly offensive. It was with much difficulty that either party could
keep their countenances during this official lecture, for, while it was
going on, the sailors were endeavouring, by the direction of the
officers, to remove the bits of silk from the legs of the pigs. If,
however, it be difficult—as most difficult we found it—to put a hog
into mourning, it is a job ten times more troublesome to take him out
again. Such at least is the fair inference from these two experiments;
the only ones perhaps on record,—for it cost half the morning to
undo what we had effected in less than an hour—to say nothing of
the unceasing and outrageous uproar which took place along the
decks, especially under the guns, and even under the coppers,
forward in the galley, where two or three of the youngest pigs had
wedged themselves, apparently resolved to die rather than submit to
the degradation of being deprived of their mourning.
All this was very creditable to the memory of poor Shakings; but, in
the course of the day, the real secret of this extraordinary difficulty of
taking a pig out of mourning was discovered. Two of the raids were
detected in the very fact of tying on a bit of black buntin to the leg of
a sow, from which the seamen declared they had already cut off
crape and silk enough to have made her a complete suit of black.
As soon as these fresh offences were reported, the whole party of
us were ordered to the mast-head as a punishment. Some were sent
to sit on the topmast cross-trees, some on the top-gallant yard-arms,
and one small gentleman being perched at the jib-boom end, was
very properly balanced abaft by another little culprit at the extremity
of the gaff. In this predicament we were hung out to dry for six or
eight hours, as old Daddy remarked to us with a grin, when we were
called down as the night fell.
Our persevering friend, being rather provoked at the punishment
of his young flock, now set to work to discover the real fate of
Shakings. It soon occurred to him, that if the dog had really been
made away with, as he shrewdly suspected, the butcher, in all
probability, must have had a hand in his murder; accordingly, he sent
for the man in the evening, when the following dialogue took place:—
“Well, butcher, will you have a glass of grog to-night?”
“Thank you, sir, thank you. Here’s your honour’s health!” said the
other, after smoothing down his hair, and pulling an immense quid of
tobacco out of his mouth.
Old Daddy observed the peculiar relish with which the butcher
took his glass; and mixing another, a good deal more potent, placed
it before the fellow, and continued the conversation in these words:
“I tell you what it is, Mr. Butcher—you are as humane a man as
any in the ship, I dare say; but, if required, you know well, that you
must do your duty, whether it is upon sheep or hogs?”
“Surely, sir.”
“Or upon dogs, either?” suddenly asked the inquisitor.
“I don’t know about that,” stammered the butcher, quite taken by
surprise, and thrown all aback.
“Well—well,” said Daddy, “here’s another glass for you—a stiff
north-wester. Come! tell us all about it now. How did you get rid of
the dog?—of Shakings, I mean?”
“Why, sir,” said the peaching rogue, “I put him in a bag—a bread
bag, sir.”
“Well!—what then?”
“I tied up the mouth, and put him overboard—out of the midship
lower-deck port, sir.”
“Yes—but he would not sink?” said Daddy.
“Oh, sir,” cried the butcher, now entering fully into the merciless
spirit of his trade, “I put a four-and-twenty-pound shot into the bag
along with Shakings.”
“Did you?—Then, Master Butcher, all I can say is, you are as
precious a rascal as ever went about unhanged. There—drink your
grog, and be off with you!”
Next morning when the officers were assembled at breakfast in
the ward-room, the door of the captain of marines’ cabin was
suddenly opened, and that officer, half shaved, and laughing through
a collar of soap-suds, stalked out, with a paper in his hand.
“Here,” he exclaimed, “is a copy of verses, which I found just now
in my basin. I can’t tell how they got there, nor what they are about;
—but you shall judge.”
So he read the two following stanzas of doggerel:—
I need hardly say in what quarter of the ship this biting morsel of
cock-pit satire was concocted, nor indeed who wrote it, for there was
no one but our good Daddy who was equal to such a flight. About
midnight, an urchin—who shall be nameless—was thrust out of one
of the after-ports of the lower deck, from which he clambered up to
the marine officer’s port, and the sash happening to have been
lowered down on the gun, the epigram, copied by another of the
youngsters, was pitched into the soldier’s basin.
The wisest thing would have been for the officers to have said
nothing about the matter, and let it blow by. But angry people are
seldom judicious—so they made a formal complaint to the captain,
who, to do him justice, was not a little puzzled how to settle the affair.
The reputed author, however, was called up, and the captain said to
him—
“Pray, sir, are you the writer of these lines?”
“I am, sir,” he replied, after a little consideration.
“Then—all I can say is,” remarked the captain, “they are clever
enough, in their way—but take my advice, and write no more such
verses.”
So the affair ended. The satirist took the captain’s hint in good
part, and confined his pen to topics below the surface of the water.
As in the course of a few months the war broke out, there was no
longer time for such nonsense, and our generous protector, old
Daddy, some time after this affair of Shakings took place, was sent
off to Halifax, in charge of a prize. His orders were, if possible, to
rejoin his own ship, the Leander, then lying at the entrance of New
York harbour, just within Sandy Hook light-house.
Our good old friend, accordingly, having completed his mission,
and delivered his prize to the authorities at Halifax, took his passage
in the British packet sailing from thence to the port in which we lay.
As this ship sailed past us, on her way to the city of New York, we
ascertained, to our great joy, that our excellent Daddy was actually
on board of her. Some hours afterwards, the pilot-boat was seen
coming to us, and, though it was in the middle of the night, all the
younger mids came hastily on deck to welcome their worthy
messmate back again to his ship.
It was late in October, and the wind blew fresh from the north-
westward, so that the ship, riding to the ebb, had her head directed
towards the Narrows, between Staten Land and Long Island:
consequently, the pilot-boat,—one of those beautiful vessels so well
known to every visitor of the American coast,—came flying down
upon us, with the wind nearly right aft. Our joyous party were all
assembled on the quarter-deck, looking anxiously at the boat as she
swept past us. She then luffed round, in order to sheer alongside, at
which moment the main-sail jibed, as was to be expected. It was
obvious, however, that something more had taken place than the
pilot had looked for, since the boat, instead of ranging up to us, was
brought right round on her heel, and went off again upon a wind on
the other tack. The tide carried her out of sight for a few minutes, but
she was soon alongside, when we learned, to our inexpressible grief
and consternation, that, on the main-boom of the pilot-boat swinging
over, it had accidentally struck our poor friend, and pitched him
headlong overboard. Being encumbered with his great-coat, the
pockets of which, as we afterwards learned, were loaded with his
young companions’ letters, brought from England by this packet, he
in vain struggled to catch hold of the boat, and then sunk to rise no
more!
CHAPTER VI.
DIVERSITIES IN DISCIPLINE.