SlideShare a Scribd company logo
Full download test bank at ebook textbookfull.com
Data Science with Python 1st
C L I C K L I N K T O D O W L O A D
https://textbookfull.com/product/data-
science-with-python-1st-edition-coll/
textbookfull
More products digital (pdf, epub, mobi) instant
download maybe you interests ...
Data Science and Analytics with Python 1st Edition
Jesus Rogel-Salazar
https://textbookfull.com/product/data-science-and-analytics-with-
python-1st-edition-jesus-rogel-salazar/
Python Data Science Handbook Essential Tools for
Working with Data 1st Edition Jake Vanderplas
https://textbookfull.com/product/python-data-science-handbook-
essential-tools-for-working-with-data-1st-edition-jake-
vanderplas/
Python Data Science Handbook Essential Tools for
Working with Data 1st Edition Jake Vanderplas
https://textbookfull.com/product/python-data-science-handbook-
essential-tools-for-working-with-data-1st-edition-jake-
vanderplas-2/
Data Science from Scratch First Principles with Python
2nd Edition Joel Grus
https://textbookfull.com/product/data-science-from-scratch-first-
principles-with-python-2nd-edition-joel-grus/
Data Science from Scratch First Principles with Python
2nd Edition Grus Joel
https://textbookfull.com/product/data-science-from-scratch-first-
principles-with-python-2nd-edition-grus-joel/
Data science and complex networks : real cases studies
with Python First Edition Caldarelli
https://textbookfull.com/product/data-science-and-complex-
networks-real-cases-studies-with-python-first-edition-caldarelli/
Learning Data Mining with Python Layton
https://textbookfull.com/product/learning-data-mining-with-
python-layton/
Graph Data Science with Neo4j: Learn how to use Neo4j 5
with Graph Data Science library 2.0 and its Python
driver for your project Scifo
https://textbookfull.com/product/graph-data-science-with-
neo4j-learn-how-to-use-neo4j-5-with-graph-data-science-
library-2-0-and-its-python-driver-for-your-project-scifo/
Python for Data Science 2nd Edition John Paul Mueller
https://textbookfull.com/product/python-for-data-science-2nd-
edition-john-paul-mueller/
Get Data Science with Python 1st Edition Coll. free all chapters
Python: Real-World Data
Science
Table of Contents
Python: Real-World Data Science
Meet Your Course Guide
What's so cool about Data Science?
Course Structure
Course Journey
The Course Roadmap and Timeline
1. Course Module 1: Python Fundamentals
1. Introduction and First Steps – Take a Deep Breath
A proper introduction
Enter the Python
About Python
Portability
Coherence
Developer productivity
An extensive library
Software quality
Software integration
Satisfaction and enjoyment
What are the drawbacks?
Who is using Python today?
Setting up the environment
Python 2 versus Python 3 – the great debate
What you need for this course
Installing Python
Installing IPython
Installing additional packages
How you can run a Python program
Running Python scripts
Running the Python interactive shell
Running Python as a service
Running Python as a GUI application
How is Python code organized
How do we use modules and packages
Python's execution model
Names and namespaces
Scopes
Guidelines on how to write good code
The Python culture
A note on the IDEs
2. Object-oriented Design
Introducing object-oriented
Objects and classes
Specifying attributes and behaviors
Data describes objects
Behaviors are actions
Hiding details and creating the public interface
Composition
Inheritance
Inheritance provides abstraction
Multiple inheritance
Case study
3. Objects in Python
Creating Python classes
Adding attributes
Making it do something
Talking to yourself
More arguments
Initializing the object
Explaining yourself
Modules and packages
Organizing the modules
Absolute imports
Relative imports
Organizing module contents
Who can access my data?
Third-party libraries
Case study
4. When Objects Are Alike
Basic inheritance
Extending built-ins
Overriding and super
Multiple inheritance
The diamond problem
Different sets of arguments
Polymorphism
Abstract base classes
Using an abstract base class
Creating an abstract base class
Demystifying the magic
Case study
5. Expecting the Unexpected
Raising exceptions
Raising an exception
The effects of an exception
Handling exceptions
The exception hierarchy
Defining our own exceptions
Case study
6. When to Use Object-oriented Programming
Treat objects as objects
Adding behavior to class data with properties
Properties in detail
Decorators – another way to create properties
Deciding when to use properties
Manager objects
Removing duplicate code
In practice
Case study
7. Python Data Structures
Empty objects
Tuples and named tuples
Named tuples
Dictionaries
Dictionary use cases
Using defaultdict
Counter
Lists
Sorting lists
Sets
Extending built-ins
Queues
FIFO queues
LIFO queues
Priority queues
Case study
8. Python Object-oriented Shortcuts
Python built-in functions
The len() function
Reversed
Enumerate
File I/O
Placing it in context
An alternative to method overloading
Default arguments
Variable argument lists
Unpacking arguments
Functions are objects too
Using functions as attributes
Callable objects
Case study
9. Strings and Serialization
Strings
String manipulation
String formatting
Escaping braces
Keyword arguments
Container lookups
Object lookups
Making it look right
Strings are Unicode
Converting bytes to text
Converting text to bytes
Mutable byte strings
Regular expressions
Matching patterns
Matching a selection of characters
Escaping characters
Matching multiple characters
Grouping patterns together
Getting information from regular expressions
Making repeated regular expressions efficient
Serializing objects
Customizing pickles
Serializing web objects
Case study
10. The Iterator Pattern
Design patterns in brief
Iterators
The iterator protocol
Comprehensions
List comprehensions
Set and dictionary comprehensions
Generator expressions
Generators
Yield items from another iterable
Coroutines
Back to log parsing
Closing coroutines and throwing exceptions
The relationship between coroutines, generators, and
functions
Case study
11. Python Design Patterns I
The decorator pattern
A decorator example
Decorators in Python
The observer pattern
An observer example
The strategy pattern
A strategy example
Strategy in Python
The state pattern
A state example
State versus strategy
State transition as coroutines
The singleton pattern
Singleton implementation
The template pattern
A template example
12. Python Design Patterns II
The adapter pattern
The facade pattern
The flyweight pattern
The command pattern
The abstract factory pattern
The composite pattern
13. Testing Object-oriented Programs
Why test?
Test-driven development
Unit testing
Assertion methods
Reducing boilerplate and cleaning up
Organizing and running tests
Ignoring broken tests
Testing with py.test
One way to do setup and cleanup
A completely different way to set up variables
Skipping tests with py.test
Imitating expensive objects
How much testing is enough?
Case study
Implementing it
14. Concurrency
Threads
The many problems with threads
Shared memory
The global interpreter lock
Thread overhead
Multiprocessing
Multiprocessing pools
Queues
The problems with multiprocessing
Futures
AsyncIO
AsyncIO in action
Reading an AsyncIO future
AsyncIO for networking
Using executors to wrap blocking code
Streams
Executors
Case study
2. Course Module 2: Data Analysis
1. Introducing Data Analysis and Libraries
Data analysis and processing
An overview of the libraries in data analysis
Python libraries in data analysis
NumPy
pandas
Matplotlib
PyMongo
The scikit-learn library
2. NumPy Arrays and Vectorized Computation
NumPy arrays
Data types
Array creation
Indexing and slicing
Fancy indexing
Numerical operations on arrays
Array functions
Data processing using arrays
Loading and saving data
Saving an array
Loading an array
Linear algebra with NumPy
NumPy random numbers
3. Data Analysis with pandas
An overview of the pandas package
The pandas data structure
Series
The DataFrame
The essential basic functionality
Reindexing and altering labels
Head and tail
Binary operations
Functional statistics
Function application
Sorting
Indexing and selecting data
Computational tools
Working with missing data
Advanced uses of pandas for data analysis
Hierarchical indexing
The Panel data
4. Data Visualization
The matplotlib API primer
Line properties
Figures and subplots
Exploring plot types
Scatter plots
Bar plots
Contour plots
Histogram plots
Legends and annotations
Plotting functions with pandas
Additional Python data visualization tools
Bokeh
MayaVi
5. Time Series
Time series primer
Working with date and time objects
Resampling time series
Downsampling time series data
Upsampling time series data
Timedeltas
Time series plotting
6. Interacting with Databases
Interacting with data in text format
Reading data from text format
Writing data to text format
Interacting with data in binary format
HDF5
Interacting with data in MongoDB
Interacting with data in Redis
The simple value
List
Set
Ordered set
7. Data Analysis Application Examples
Data munging
Cleaning data
Filtering
Merging data
Reshaping data
Data aggregation
Grouping data
3. Course Module 3: Data Mining
1. Getting Started with Data Mining
Introducing data mining
A simple affinity analysis example
What is affinity analysis?
Product recommendations
Loading the dataset with NumPy
Implementing a simple ranking of rules
Ranking to find the best rules
A simple classification example
What is classification?
Loading and preparing the dataset
Implementing the OneR algorithm
Testing the algorithm
2. Classifying with scikit-learn Estimators
scikit-learn estimators
Nearest neighbors
Distance metrics
Loading the dataset
Moving towards a standard workflow
Running the algorithm
Setting parameters
Preprocessing using pipelines
An example
Standard preprocessing
Putting it all together
Pipelines
3. Predicting Sports Winners with Decision Trees
Loading the dataset
Collecting the data
Using pandas to load the dataset
Cleaning up the dataset
Extracting new features
Decision trees
Parameters in decision trees
Using decision trees
Sports outcome prediction
Putting it all together
Random forests
How do ensembles work?
Parameters in Random forests
Applying Random forests
Engineering new features
4. Recommending Movies Using Affinity Analysis
Affinity analysis
Algorithms for affinity analysis
Choosing parameters
The movie recommendation problem
Obtaining the dataset
Loading with pandas
Sparse data formats
The Apriori implementation
The Apriori algorithm
Implementation
Extracting association rules
Evaluation
5. Extracting Features with Transformers
Feature extraction
Representing reality in models
Common feature patterns
Creating good features
Feature selection
Selecting the best individual features
Feature creation
Creating your own transformer
The transformer API
Implementation details
Unit testing
Putting it all together
6. Social Media Insight Using Naive Bayes
Disambiguation
Downloading data from a social network
Loading and classifying the dataset
Creating a replicable dataset from Twitter
Text transformers
Bag-of-words
N-grams
Other features
Naive Bayes
Bayes' theorem
Naive Bayes algorithm
How it works
Application
Extracting word counts
Converting dictionaries to a matrix
Training the Naive Bayes classifier
Putting it all together
Evaluation using the F1-score
Getting useful features from models
7. Discovering Accounts to Follow Using Graph Mining
Loading the dataset
Classifying with an existing model
Getting follower information from Twitter
Building the network
Creating a graph
Creating a similarity graph
Finding subgraphs
Connected components
Optimizing criteria
8. Beating CAPTCHAs with Neural Networks
Artificial neural networks
An introduction to neural networks
Creating the dataset
Drawing basic CAPTCHAs
Splitting the image into individual letters
Creating a training dataset
Adjusting our training dataset to our methodology
Training and classifying
Back propagation
Predicting words
Improving accuracy using a dictionary
Ranking mechanisms for words
Putting it all together
9. Authorship Attribution
Attributing documents to authors
Applications and use cases
Attributing authorship
Getting the data
Function words
Counting function words
Classifying with function words
Support vector machines
Classifying with SVMs
Kernels
Character n-grams
Extracting character n-grams
Using the Enron dataset
Accessing the Enron dataset
Creating a dataset loader
Putting it all together
Evaluation
10. Clustering News Articles
Obtaining news articles
Using a Web API to get data
Reddit as a data source
Getting the data
Extracting text from arbitrary websites
Finding the stories in arbitrary websites
Putting it all together
Grouping news articles
The k-means algorithm
Evaluating the results
Extracting topic information from clusters
Using clustering algorithms as transformers
Clustering ensembles
Evidence accumulation
How it works
Implementation
Online learning
An introduction to online learning
Implementation
11. Classifying Objects in Images Using Deep Learning
Object classification
Application scenario and goals
Use cases
Deep neural networks
Intuition
Implementation
An introduction to Theano
An introduction to Lasagne
Implementing neural networks with nolearn
GPU optimization
When to use GPUs for computation
Running our code on a GPU
Setting up the environment
Application
Getting the data
Creating the neural network
Putting it all together
12. Working with Big Data
Big data
Application scenario and goals
MapReduce
Intuition
A word count example
Hadoop MapReduce
Application
Getting the data
Naive Bayes prediction
The mrjob package
Extracting the blog posts
Training Naive Bayes
Putting it all together
Training on Amazon's EMR infrastructure
13. Next Steps…
Chapter 1 – Getting Started with Data Mining
Scikit-learn tutorials
Extending the IPython Notebook
Chapter 2 – Classifying with scikit-learn Estimators
More complex pipelines
Comparing classifiers
Chapter 3: Predicting Sports Winners with Decision Trees
More on pandas
Chapter 4 – Recommending Movies Using Affinity Analysis
The Eclat algorithm
Chapter 5 – Extracting Features with Transformers
Vowpal Wabbit
Chapter 6 – Social Media Insight Using Naive Bayes
Natural language processing and part-of-speech tagging
Chapter 7 – Discovering Accounts to Follow Using Graph Mining
More complex algorithms
Chapter 8 – Beating CAPTCHAs with Neural Networks
Deeper networks
Reinforcement learning
Chapter 9 – Authorship Attribution
Local n-grams
Chapter 10 – Clustering News Articles
Real-time clusterings
Chapter 11 – Classifying Objects in Images Using Deep
Learning
Keras and Pylearn2
Mahotas
Chapter 12 – Working with Big Data
Courses on Hadoop
Pydoop
Recommendation engine
More resources
4. Course Module 4: Machine Learning
1. Giving Computers the Ability to Learn from Data
How to transform data into knowledge
The three different types of machine learning
Making predictions about the future with supervised learning
Classification for predicting class labels
Regression for predicting continuous outcomes
Solving interactive problems with reinforcement learning
Discovering hidden structures with unsupervised learning
Finding subgroups with clustering
Dimensionality reduction for data compression
An introduction to the basic terminology and notations
A roadmap for building machine learning systems
Preprocessing – getting data into shape
Training and selecting a predictive model
Evaluating models and predicting unseen data instances
Using Python for machine learning
2. Training Machine Learning Algorithms for Classification
Artificial neurons – a brief glimpse into the early history of
machine learning
Implementing a perceptron learning algorithm in Python
Training a perceptron model on the Iris dataset
Adaptive linear neurons and the convergence of learning
Minimizing cost functions with gradient descent
Implementing an Adaptive Linear Neuron in Python
Large scale machine learning and stochastic gradient
descent
3. A Tour of Machine Learning Classifiers Using scikit-learn
Choosing a classification algorithm
First steps with scikit-learn
Training a perceptron via scikit-learn
Modeling class probabilities via logistic regression
Logistic regression intuition and conditional probabilities
Learning the weights of the logistic cost function
Training a logistic regression model with scikit-learn
Tackling overfitting via regularization
Maximum margin classification with support vector machines
Maximum margin intuition
Dealing with the nonlinearly separable case using slack
variables
Alternative implementations in scikit-learn
Solving nonlinear problems using a kernel SVM
Using the kernel trick to find separating hyperplanes in
higher dimensional space
Decision tree learning
Maximizing information gain – getting the most bang for the
buck
Building a decision tree
Combining weak to strong learners via random forests
K-nearest neighbors – a lazy learning algorithm
4. Building Good Training Sets – Data Preprocessing
Dealing with missing data
Eliminating samples or features with missing values
Imputing missing values
Understanding the scikit-learn estimator API
Handling categorical data
Mapping ordinal features
Encoding class labels
Performing one-hot encoding on nominal features
Partitioning a dataset in training and test sets
Bringing features onto the same scale
Selecting meaningful features
Sparse solutions with L1 regularization
Sequential feature selection algorithms
Assessing feature importance with random forests
5. Compressing Data via Dimensionality Reduction
Unsupervised dimensionality reduction via principal component
analysis
Total and explained variance
Feature transformation
Principal component analysis in scikit-learn
Supervised data compression via linear discriminant analysis
Computing the scatter matrices
Selecting linear discriminants for the new feature subspace
Projecting samples onto the new feature space
LDA via scikit-learn
Using kernel principal component analysis for nonlinear
mappings
Kernel functions and the kernel trick
Implementing a kernel principal component analysis in
Python
Example 1 – separating half-moon shapes
Example 2 – separating concentric circles
Projecting new data points
Kernel principal component analysis in scikit-learn
6. Learning Best Practices for Model Evaluation and
Hyperparameter Tuning
Streamlining workflows with pipelines
Loading the Breast Cancer Wisconsin dataset
Combining transformers and estimators in a pipeline
Using k-fold cross-validation to assess model performance
The holdout method
K-fold cross-validation
Debugging algorithms with learning and validation curves
Diagnosing bias and variance problems with learning curves
Addressing overfitting and underfitting with validation curves
Fine-tuning machine learning models via grid search
Tuning hyperparameters via grid search
Algorithm selection with nested cross-validation
Looking at different performance evaluation metrics
Reading a confusion matrix
Optimizing the precision and recall of a classification model
Plotting a receiver operating characteristic
The scoring metrics for multiclass classification
7. Combining Different Models for Ensemble Learning
Learning with ensembles
Implementing a simple majority vote classifier
Combining different algorithms for classification with
majority vote
Evaluating and tuning the ensemble classifier
Bagging – building an ensemble of classifiers from bootstrap
samples
Leveraging weak learners via adaptive boosting
8. Predicting Continuous Target Variables with Regression Analysis
Introducing a simple linear regression model
Exploring the Housing Dataset
Visualizing the important characteristics of a dataset
Implementing an ordinary least squares linear regression model
Solving regression for regression parameters with gradient
descent
Estimating the coefficient of a regression model via scikit-
learn
Fitting a robust regression model using RANSAC
Evaluating the performance of linear regression models
Using regularized methods for regression
Turning a linear regression model into a curve – polynomial
regression
Modeling nonlinear relationships in the Housing Dataset
Dealing with nonlinear relationships using random forests
Decision tree regression
Random forest regression
A. Reflect and Test Yourself! Answers
Module 2: Data Analysis
Chapter 1: Introducing Data Analysis and Libraries
Chapter 2: Object-oriented Design
Chapter 3: Data Analysis with pandas
Chapter 4: Data Visualization
Chapter 5: Time Series
Chapter 6: Interacting with Databases
Chapter 7: Data Analysis Application Examples
Module 3: Data Mining
Chapter 1: Getting Started with Data Mining
Chapter 2: Classifying with scikit-learn Estimators
Chapter 3: Predicting Sports Winners with Decision Trees
Chapter 4: Recommending Movies Using Affinity Analysis
Chapter 5: Extracting Features with Transformers
Chapter 6: Social Media Insight Using Naive Bayes
Chapter 7: Discovering Accounts to Follow Using Graph
Mining
Chapter 8: Beating CAPTCHAs with Neural Networks
Chapter 9: Authorship Attribution
Chapter 10: Clustering News Articles
Chapter 11: Classifying Objects in Images Using Deep
Learning
Chapter 12: Working with Big Data
Module 4: Machine Learning
Chapter 1: Giving Computers the Ability to Learn from Data
Chapter 2: Training Machine Learning
Chapter 3: A Tour of Machine Learning Classifiers Using
scikit-learn
Chapter 4: Building Good Training Sets – Data Preprocessing
Chapter 5: Compressing Data via Dimensionality Reduction
Chapter 6: Learning Best Practices for Model Evaluation and
Hyperparameter Tuning
Chapter 7: Combining Different Models for Ensemble
Learning
Chapter 8: Predicting Continuous Target Variables with
Regression Analysis
B. Bibliography
Index
Python: Real-World Data
Science
Python: Real-World Data
Science
A course in four modules
Unleash the power of Python and its robust data science
capabilities with your Course Guide Ankita Thakur
Learn to use powerful Python libraries for effective data processing
and analysis
To contact your Course Guide
Email: <ankitat@packtpub.com>
Meet Your Course Guide
Hello and welcome to this Data Science with Python course. You
now have a clear pathway from learning Python core features right
through to getting acquainted with the concepts and techniques of
the data science field—all using Python!
This course has been planned and created for you by me Ankita
Thakur – I am your Course Guide, and I am here to help you
have a great journey along the pathways of learning that I have
planned for you.
I've developed and created this course for you and you'll be
seeing me through the whole journey, offering you my thoughts
and ideas behind what you're going to learn next and why I
recommend each step. I'll provide tests and quizzes to help you
reflect on your learning, and code challenges that will be pitched
just right for you through the course.
If you have any questions along the way, you can reach out to
me over e-mail or telephone and I'll make sure you get
everything from the course that we've planned – for you to start
your career in the field of data science. Details of how to contact
me are included on the first page of this course.
What's so cool about Data
Science?
What is Data Science and why is there so much of buzz about this in
the world? Is it of great importance? Well, the following sentence
will answer all such questions:
"This hot new field promises to revolutionize industries from business to government, health care to
academia."
--The New York Times
The world is generating data at an increasing pace. Consumers,
sensors, or scientific experiments emit data points every day. In
finance, business, administration, and the natural or social sciences,
working with data can make up a significant part of the job. Being
able to efficiently work with small or large datasets has become a
valuable skill. Also, we live in a world of connected things where
tons of data is generated and it is humanly impossible to analyze all
the incoming data and make decisions. Human decisions are
increasingly replaced by decisions made by computers. Thanks to
the field of Data Science!
Data science has penetrated deeply in our connected world and
there is a growing demand in the market for people who not only
understand data science algorithms thoroughly, but are also capable
of programming these algorithms. A field that is at the intersection
of many fields, including data mining, machine learning, and
statistics, to name a few. This puts an immense burden on all levels
of data scientists; from the one who is aspiring to become a data
scientist and those who are currently practitioners in this field.
Treating these algorithms as a black box and using them in decision-
making systems will lead to counterproductive results. With tons of
algorithms and innumerable problems out there, it requires a good
grasp of the underlying algorithms in order to choose the best one
for any given problem.
Python as a programming language has evolved over the years and
today, it is the number one choice for a data scientist. Python has
become the most popular programming language for data science
because it allows us to forget about the tedious parts of
programming and offers us an environment where we can quickly jot
down our ideas and put concepts directly into action. It has been
used in industry for a long time, but it has been popular among
researchers as well.
In contrast to more specialized applications and environments,
Python is not only about data analysis. The list of industrial-strength
libraries for many general computing tasks is long, which makes
working with data in Python even more compelling. Whether your
data lives inside SQL or NoSQL databases or is out there on the Web
and must be crawled or scraped first, the Python community has
already developed packages for many of those tasks.
Course Structure
Frankly speaking, it's a wise decision to know the nitty-gritty of
Python as it's a trending language. I'm sure you'll gain lot of
knowledge through this course and be able to implement all those in
practice. However, I want to highlight that the road ahead may be
bumpy on occasions, and some topics may be more challenging than
others, but I hope that you will embrace this opportunity and focus
on the reward. Remember that we are on this journey together, and
throughout this course, we will add many powerful techniques to
your arsenal that will help us solve even the toughest problems the
data-driven way.
I've created this learning path for you that consist of four models.
Each of these modules are a mini-course in their own way, and as
you complete each one, you'll have gained key skills and be ready for
the material in the next module.
So let's now look at the pathway these modules create—basically all
the topics that will be exploring in this learning journey.
Course Journey
We start the course with our very first module, Python Fundamentals,
to help you get familiar with Python. Installing Python correctly is
equal to half job done. This module starts with the installation of
Python, IPython, and all the necessary packages. Then, we'll see the
fundamentals of object-oriented programming because Python itself
is an object-oriented programming language. Finally, we'll make
friends with some of the core concepts of Python—how to get Python
programming basics nailed down.
Then we'll move towards the analysis part. The second module, Data
Analysis, will get you started with Python data analysis in a practical
and example-driven way. You'll see how we can use Python libraries
for effective data processing and analysis. So, if you want to to get
started with basic data processing tasks or time series, then you can
find lot of hands-on knowledge in the examples of this module.
Another random document with
no related content on Scribd:
9th.—This morning Musa was very feverish, so the men asked me
to stop a day to collect provisions. To this I unwillingly assented, but
they did little else than lie down. About nine a.m. five of the men
proposed that I should allow them to leave their muskets and all their
baggage, and push on as fast as possible to the boats, while I
moved on quietly with the sick and sore-footed. I consented, on the
condition that they would stay at the boats no longer than would be
necessary to cook a meal; that then they were to return laden with
provisions. To this they agreed, and then left us. The two who stayed
behind the day before yesterday came up with us; it was for them I
was anxious. During the ascent of the steep mountain on the 8th the
last remnant of my shoes was carried away, and yesterday I
attempted to protect my feet by fastening some goats’ skin over
them in the form of moccassins. To-day I am trying to improve them,
but with very little success.
10th.—Musa having shaken off his fever, was enabled to start; but
all the men are weak, and many are ailing. Though perfectly well in
health, I find that, having only had for yesterday’s dinner a glass of
rice-water with the palm-cabbage, I am not fit for very long walks,
particularly as my moccassins are cut to pieces by the rough stones
and thorns, and I am compelled to walk bare-footed. My greatest
torment are the leeches getting between my toes and crawling up my
trousers, reaching even to my waist, where the tight belt prevented
their farther progress. Squeezing a little tobacco-juice made them
drop off, but I could not be continually stopping to do this.
11th.—We stopped all day. The industrious cut down some Loba-
palms, and made a little sago; the lazy collected a few cabbages. I
tried a little of the former; it was indeed delicious.
Some of the men, who wandered farther than the others in search
of wild fruits, reported seeing some very large monkeys, which they
said might be orang-utans, and whilst speaking of them I was
reminded of the various stories told of people being carried off by
them. I have referred to this subject in my account of my journeys
among the Sea Dayaks, but although many stories are related of the
male orang-utan carrying off young Dayak maidens into the jungle,
yet it is seldom that we hear of the female orang-utan running off
with a man. But the Muruts of Padas tell the following narrative,
which, they say, may be believed. Some years ago, one of their
young men was wandering in the jungle, armed with a sumpitan, or
blow-pipe, and a sword. He came to the banks of a pebbly stream,
and being a hot day, he thought he would have a bathe. He placed
his arms and clothes at the foot of a tree, and then went into the
water. After a time, being sufficiently refreshed, he was returning to
dress, when he perceived an enormous female orang-utan standing
between him and the tree. She advanced towards him, as he stood
paralyzed by surprise, and seizing him by the arm, compelled him to
follow her to a branching tree and climb up it. When he reached her
resting-place, consisting of boughs and branches woven into a
comfortable nest, she made him enter. There he remained some
months jealously watched by his strange companion, fed by her on
fruits and the cabbage of the palm, and rarely permitted to touch the
earth with his feet, but compelled to move from tree to tree. This life
continued some time, till the female orang-utan becoming less
watchful permitted the Murut more liberty. He availed himself of it to
slip down the trunk of the tree and run to the place where he had
formerly left his weapons. She, seeing his attempted escape,
followed, to be pierced, as she approached him, by a poisoned
arrow. I was told if I would ascend the Padas river as far as the
man’s village, I might hear the story from his own lips, as he was still
alive.
12th.—Walked on a mile, the men excessively lazy. Finding the
river smooth, they proposed trying rafts; so we stopped to construct
them. One of the men, observing that I was dining on a cabbage-
palm boiled in a little rice-water, presented me with a cup full of
uncooked rice. I was very grateful to him for it; but we put it by, in
case the palms should fail us, as they do in some districts.
13th.—About nine, we pushed off, and got on very well for two
hours. Found one of the rafts smashed up against a rock, and the
men away walking. Continued till about one o’clock, when ours also
became fixed on a rock, and our men were too dispirited to get it off;
and saying that the rapids ahead of us were dangerous, they
proposed walking to-morrow. We should have thought nothing of
such paltry difficulties a week ago, but the men were losing their
courage with their strength. I refused, however, to stop till to-morrow,
and walked on for a couple of hours. In crossing a ravine to-day, we
disturbed a female bear, which, however, dashed with her cubs into
thick brushwood, so without dogs it was useless following her. She
roared in a manner worthy of an animal double her size.
14th.—The river still full of rapids; but the hills are gradually
receding from the banks, giving it more space, and it sometimes
spreads out into extensive sheets of water, with immense pebbly
flats. Islands are also beginning to appear. It was again proposed to
build rafts, but I steadily refused, and kept walking till nearly five.
After sunset, the last stragglers overtook us. We continually came
upon the traces of the advance-party. At one of their resting-places,
we found the bones of a fine fish, which by some means they had
secured. Our old Pakatan declared they had either found it stranded,
or else had startled a kite from his prey. It proved to be the former,
though the latter had happened to us once.
15th.—Yesterday and to-day the character of the forest has
altered. We are now marching through the old farming grounds of
the Muruts; found some of their fruit trees; among others, one
covered with fine-looking oranges, but intolerably sour. I secured the
opium bottle to-day, intending to take a dose to deaden the pangs of
hunger, but I put it off till the evening, thinking it might interfere with
my walking. I noticed near the orange-tree above mentioned that the
whole ground was a mass of water-worn pebbles, evidently the
ancient bed of the stream; it was now at least a hundred feet above
the water’s edge.
At half-past four p.m. I brought up for the night, and after bathing
stretched myself on my back, munching a great lump of cabbage,
when my eyes, wandering over the scene, fell on a hill about three
miles ahead of us. I sat up and looked at it again; and, turning to my
companions, said, “Why, that reminds me of the high land near the
mouth of the Madihit;” but we agreed that it was impossible, as our
five men had been gone six days, and we felt assured that we
should have met them ere this if we were so near our boats as that,
particularly as we, both yesterday and to-day, had made very long
walks. Since we have had a bearing of Molu, we have been keeping
generally in a west course, but the river has taken some very
extraordinary windings.
Having secured some fruit of the Jintawan, or Indian-rubber plant,
and some cabbages, I was enabled to satisfy my hunger before
going to sleep, so put off taking any laudanum, to which I had a very
great dislike. The Jintawan fruit is very pleasantly acid, about the
size of a very large pear, and of a deep orange colour. It consists of
a thick rind full of Indian-rubber, surrounding some pulp-covered
seeds. One of the plants we came across was very handsome,
growing in the most luxuriant manner over a lofty tree with few
branches. The Jintawan is a creeper, and this one had extended
itself at least forty feet up the trunk and had covered the
outspreading boughs. It was loaded with fruit, but my men had so
lost heart that not one would climb the tree, but contented
themselves with picking up the over-ripe produce which had fallen on
the ground below. We had another very happy find to-day, for while
passing under a fine tapang-tree, we noticed the remains of a bees’
nest scattered about, and every particle was eagerly appropriated.
From the marks around it appeared as if a bear had climbed this lofty
tree and torn down the nest to be devoured by its young below, as
there were numerous tracks of the smaller animals around, but
whether the comb had been sucked by the bears or not was very
immaterial to our men, who rejoiced in securing the little honey still
clinging to it.
16th.—Started early. About half my followers had so delayed us
by their constantly lagging behind, that I determined to wait for them
no longer, but to push on with such men as would follow me with all
their strength. We felt that it would be impossible to walk many days
farther on our scanty fare. The lazy ones having heard of our
arrangement, tried to keep up with us, and did do so till eight, when I
heard a shout from the foremost man, “Bandera! bandera!—the flag!
the flag!” We rushed down the side of the hill like madmen, the
fellows shouting for joy. Sure enough, there was the British flag
hoisted, and our small boats at the mouth of the Madihit, with our five
men looking fat and well beside my pale and famished followers. The
rascals having left my guns and all the baggage in the jungle, and all
being in good health, had managed to reach the Madihit in three
days, and then set to work to eat and drink as much as possible.
We arrived to find the provisions nearly gone; they said the bears
had found out our cache and destroyed everything, and the only
provisions left were those we put into the garei. I could only divide a
cupful of beans to each man, as the five had managed to consume
thirty pounds of sago and forty-two pints of beans in the course of
four days, and they confessed to have daily caught very fine fish. But
what angered the men most was the signs of waste around, where,
having only half finished a plate of sago, they had thrown the rest
away. I saw some picking up the burnt pieces that had not been
washed away by the rain. I asked why, according to their agreement,
they had not come back to meet us, knowing that we had several
sick men. They put the blame on each other: one man, a Javanese,
had left his sick son with us, but he unfeelingly observed that he was
old enough to look after himself; that son had given us more trouble
than any one else, both in going and returning.
I searched their baskets, and found that they had not only hidden
some more beans, but had stolen some of my cloth, though I could
not fix on the man. I determined to punish them, so told them to go
back and fetch the things they had left in the forest; or, on my return,
I would submit the case to the Sultan, whether they had not forfeited
wages by their unfair abandonment of their sickly companions. They
started off, but their cowardly hearts failed them, and before night
they came back.
The ravages of the bears were distressing. They destroyed a
Deane’s pistol-case, tore open my box of books, and ruined them;
reduced the cloth to shreds, and tumbled it into the mud, where the
white ants afterwards finished the spoiling; opened the tin boxes
containing the sugar and biscuits, and of course devoured them; so
that I have nothing left but coffee and arrack. After Musa had cooked
a meal, a very frugal one, he went off with a party to fetch the garei,
hoping to find a little sago left, but was disappointed.
In the evening caught a few fish, but they were not much among
so many. About seven, a most satisfactory savour rose to my
nostrils. I found that Ahtan, having discovered a jar of pork fat, was
preparing some cakes. I divided them, but he said, “No; you, sir,
have the larger body, therefore should have the larger share.” I am
not much given to emotions, but I never felt so thankful as when,
stretched in the old Kayan hut, I watched them preparing an evening
meal, and thought of all the dangers we had gone through without a
single accident. True, we had lost guns, and goods, and ruined
instruments of some value; but what of that?—there was no one the
worse for his exertions. What was hunger now we were so near
home?
17th.—Started early; and, as we have had no rain for two days,
the river was quiet, and we only reached an island about fifteen
miles from the Madalam. It shows the difference, however, between
ascending and descending a river. About two a.m., our garei being
well ahead, we saw before us a herd of wild cattle, quietly picking at
a few blades of grass on a broad pebbly flat. I landed with a couple
of men, to get between them and the jungle. I was within twenty
yards of the nearest, a piebald, and was crawling through the
tangled bushes to get a sight of him, whom I could hear browsing
near me, when there arose a shout, then a rush, and the cattle were
off dashing close to me, but perfectly concealed by the matted
brushwood. It was the crew of one of the newly-arrived boats that,
regardless of the warnings of their companions, had thus lost us a
chance of a good dinner. I felt that, if my gun had been charged with
shot, I could almost have peppered them. Shortly after I shot a pig
through the back as he was crossing the river; but as all my men
were Mahomedans, it was not worth while tracing him in the jungle.
He bled so profusely in the water that he could not have run far.
About five, we were passing down a rapid at a great pace, when
one of the men touched me and pointed. I looked up, and there was
a magnificent bull, three parts grown, standing within fifteen yards of
me. To put up my gun and let fly was the work of a moment; but,
before we had dashed on many yards, the beast, which had fallen on
his forehead, was up and away. After a little time, we managed to
stop the garei; and, landing, found traces of the beast’s blood. My
feet were so painfully wounded that I could not manage to follow it,
but left it to my men. A couple came up with him, as he stood with
his legs well stretched out, bleeding profusely. He took no notice of
them, even when they were within spearing distance; but all their
nerve was gone, and they were afraid to thrust their weapons into
him. They waited till the whole mob of hunters arrived, when the bull
apparently recovering himself, dashed away into the jungle.
Having secured the boats under the islands, I divided a
tablespoonful of beans each, with a little pork fat to those who would
take it. Musa told me that most of the men wanted to stay behind
and follow the wounded Tambadau; but that, if I wished to go on,
there were five volunteers who would pull straight to Brunei, now
about a hundred miles off by river. To this I agreed.
18th.—I get away at daylight in a sampir with five men. Ahtan with
an attack of fever and ague. The reaction was too much for him, so I
stopped at an island about five miles from the Madalam to cook. I
now produced my secret store of beans, and the cupful of rice that I
had treasured up since it was given us on the 12th. The beans I
gave to the men, and the rice I had boiled into a thin sort of gruel for
Ahtan. I thought his feverish symptoms arose principally from over
fatigue and hunger. In fact, after he had swallowed a strong dose of
quinine, and taken half the gruel, he felt much better; the rest of it I
gave to the men, as I wanted to give them sufficient strength to pull
to Pengkalan Jawa. I would not take anything myself, as I did
nothing but sit all day. I reserved my powers for the food I knew the
Chinese trader there would quickly prepare for us.
As we approached the more frequented parts of the river, we met
some Muruts, who told us that the report of my death had brought
forty steamers to the capital to revenge it, and that if I did not turn up
the place was to be burnt. I knew this was one of the usual stories
that arise from very little, but still I was anxious to get home; but with
all our exertions we did not reach the Chinese trader’s house till 7
p.m. He received us most hospitably, produced tea, sugar-candy,
biscuit, and dried fish, to stay our appetites, while a proper meal was
prepared. In about an hour this appeared, and we managed to
consume a very large fowl each, with an amount of rice that even
startled the Baba. Before leaving at midnight, I made arrangements
that a plentiful meal should be provided for the garei’s crew.
19th.—After pulling about fourteen hours, we reached Brunei by 2
p.m., to find the people beginning to wonder at our absence. The
forty steamers proved to be Captain Cresswell, of the Surprise, who
had visited the capital about ten days before with Mr. Low. The latter
was beginning to be uneasy about my absence, and was preparing a
party to come and search for me.
20th.—My boats now arrived, having failed to get the Tambadau.
They said they followed him by the blood till mid-day, when they lost
his traces among those of a herd which he had joined. I suspect they
did not follow him very far.
Thus ends my journal.
As I have now made many journeys in Borneo, and seen much of
forest walking, I think I can speak of it with something like certainty. I
have ever found, in recording progress, that we can seldom allow
more than a mile an hour under ordinary circumstances. Sometimes,
when extremely difficult or winding, we do not make half a mile an
hour. On certain occasions, when very hard pressed, I have seen the
men manage a mile and a half; but, with all our exertions, I have
never yet recorded more than ten miles progress in a day through
thick pathless forests, and that was after ten hours of hard work. Of
course we actually walk more than we record, as one cannot
calculate the slight windings of the way; but allowing for all this, I
have the strongest suspicion that Madame Pfeiffer measured her
miles by her fatigue. She talks of twenty miles a day as a common
performance of hers; and another visitor to this island beats her,
recording walking thirty miles in one day through Bornean forests—
an utter impossibility.
There was an Adang man among the wax-hunters, the one who
accompanied our guide for a short distance, who was pointed out to
me as a model of activity, and he certainly appeared so; well built,
strong, but light, he skimmed the ground; and the story is told of him,
that on receiving information of the illness of his child, he started
home, leaving everything behind him but his spear and a little food,
and walked from forty to forty-five miles in two days. No European
that I have ever seen would have had a chance with him in his own
forests.
Six miles a day is quite enough for any man who wishes to take
his followers long journeys, unless specially favoured by the ground
and the paths; Galton, in speaking of African travelling, says three
miles a day with waggons, horses, and cattle, and he is of some
authority. I have often thought that we must have walked twenty
miles, but the bearings have always proved to me that we have
seldom done half that distance. It requires great experience not to
judge distance by the fatigue we feel.
Whilst referring to the mistakes in the estimates of distance, I may
notice the very remarkable errors into which two visitors to the
Limbang have fallen. Mr. Motley[9] mentions exploring that stream to
an estimated distance of one hundred and fifty miles, by the
windings of the river, and about fifty in a general south-west
direction. He reached the Limbuak village, which by my
measurement is under twenty miles in a straight line from the mouth:
fifty miles in a direct line to the south-west, would have nearly
brought him to the Baram, across numerous ranges of hills, and
several navigable streams, and a hundred and fifty miles up the river
would have brought him nearly to the farthest point I reached, long
past the limestone districts. It proves how impossible it is to trust to
estimates.
The next curious mistake I may notice, was made by Mr. de
Crespigny; he ascended the river Limbang as far as the river Damit. I
have seen a sketch map of his, and he places the mouth of that
stream in north latitude, 3° 48’, and the mountain of Molu to the
north-east of it, in latitude 4° 3’, whereas Molu Peak is a little to the
westward of south from the Damit, and nearly twenty-five miles
distant in a direct line.
In drawing attention to these errors, I by no means claim immunity
from them in the map of the Limbang and Baram rivers which
accompanies this volume; but I think they will be found free from
gross errors. The course of the latter river was taken down by
Captain Brett of the Pluto, and observations of the latitude and
longitude of the town of Lañgusan were made by many of the
officers on board. In my land journeys, I had very inferior
compasses, as I was unable to take with me the valuable levels and
other instruments obligingly lent me by Dr. Coulthard, on account of
their weight and size; but I used them as long as I was in my boats,
to lay down the position of the mountains; and in order to enable me
to correct my own errors, I put down the day’s observations on a
rough map every evening during the journey, except after we had
shot the cascade and wetted the paper too much to permit it being
handled roughly.
I may add, that of the whole party of nineteen, none after our
return suffered severely from the exposure and privations we had
undergone, and I believe the real reason was, that we always were
dry at night. For many years we trusted during our expeditions to the
leaf huts the natives are accustomed to construct for us and for
themselves; but although with sufficient time, and when good
materials are plentiful, they manage to make them tolerably
watertight, yet they are never so good as the simple tents we always
took with us during our later expeditions. With proper ropes and
everything fitted to enable us to raise these tents on cross poles in
ten minutes, the two did not weigh more than twenty pounds, and
afforded comfortable accommodation for our whole party of nineteen
people, with all our baggage, and on occasions our six guides took
advantage of them also.
I had suffered severely from exposure on former expeditions,
particularly when we ascended the Sakarang, and were eight days
sleeping in the leaf huts hastily erected by our followers. Of the
seven Englishmen who slept on shore, I believe only one escaped
without some severe attack of illness, and I remember the late Mr.
Brereton mentioning that on his return from a visit to the Bugan
country, where his men had been greatly exposed, a fourth of his
party died of various diseases. Another precaution I took was to
carry myself a few night things, as a light silk jacket, a pair of loose
sleeping drawers of the same material, a jersey, and a dry towel, so
that if my men lagged far behind, I was not kept for hours in my wet
clothes; and whilst travelling in these forests you are always wet, as
if there be no rain there are sure to be many rivers to ford.
On my return, I tried to remember the geographical information
that was given me before starting. I was told it would take six days
from Blimbing to Madihit: leaving out the two days’ detention from
freshes, it took us about three hours over the six days. Even the
walking distance was really correct; it was only two days from the
Adang landing-place, and seven from Madihit; as, although we took
ten, yet for the first five days we did not do a fair half-day’s work on
any of them. We were warned that it would be impossible to use
rafts, and that the banks were almost impassable, and we indeed
found it so.
Many months before starting, I was told that if I wished to
penetrate far into the interior, to try the Trusan, and not the Limbang,
as the former was inhabited, the latter not. I went up the Trusan a
few miles, but found it so small, I had no idea it penetrated to so
great a distance. The fact is, that the rains run off very fast, and that
the ordinary states of the rivers give no idea of the amount of water
they bring down, but had we taken that route, we should have
reached our farthest point with comparatively little fatigue.
The Orang Kaya Upit arrived at his house November 13th, twenty-
five days after I reached Brunei; so that it is fortunate I did not wait
for him. I may add, that on November 20th, some Bisaya chiefs set
upon pañgeran Makota, the shabandar, and killed him. They were
wearied with his exactions. The immediate cause of his death was
seizing the daughters of seven Orang Kayas, one of whom he had in
his curtains when attacked, and this caused his death. The girl
pointed him out to her father, trying to escape in a small canoe. The
alarm was given, and his boat tilting over while he tried to avoid the
shower of spears and stones, he fell into the stream and was
drowned; for he was the only Malay I ever heard of who could not
swim. Such was the end of this clever bad man. The Sultan was
furious, but his fury was not shared by his four viziers; so that the
affair ended by a dozen lives being taken, instead of the hundreds
the Sultan desired.
Brunei, February 8th, 1861.—Above two years have passed since
I wrote this journal. The scheme of building a fort at the Madalam
mouth did not succeed, as the Sultan, after the shabandar’s death,
was very unwilling to assist any of the aborigines. I was away during
the year 1860, and in the course of that time, a party of the Muruts,
from the upper Trusan, came over and encamped at the mouth of
the Salindong stream, and from thence sent on three men in a bark
canoe to tell their friends of their presence. These men met the
Orang Kaya Gomba, a Bisayan, at Batang Parak, and were
treacherously slain by him. The Muruts waited a long time at
Salindong, hoping to be fetched away by their friends. They could
not walk the whole distance, as they had their women and children
and all their worldly goods with them, intending to remove to the
lower Limbang, and live with the Orang Kaya Upit.
While thus detained, they were surprised by a large party of
Kayans, and every one taken or slain. However, one of the prisoners
afterwards managed to get away, and reached his friends, bringing
this sad tale. The Orang Kaya Gomba declares that he mistook the
three for Kayans, which is almost impossible, as no head-hunter
would have been found paddling down a hostile stream in a bark
canoe. Neither the Sultan nor any of the viziers will make the least
inquiry into this affair, but the memory of it is treasured up in the
hearts of the Muruts, and Orang Kaya Gomba may yet meet with a
bloody death.
I have remarked that during all our wanderings near Kina Balu we
only at one place found the dried heads of enemies hung up in the
villages there, and during my journeys up the Limbang, I do not
remember noticing any, and yet Orang Kaya Gomba’s murderous
action shows they do value them, which is confirmed by pañgeran
mumin making a present of the head of the man he killed to the
Gadang Muruts; and during my stay in Brunei, I have met small
parties of head-hunters, but seeking only the heads of their real
enemies. Yet I have always avoided spending a night in their
immediate neighbourhood, and have kept our arms ready for instant
service.
One evening, during a heavy squall, we took shelter in a little river
to the south of Point Kitam, in the Limbang Bay, and to our
exceeding discomfort found a Murut boat with eighteen armed men
in ambush round a short turn of the stream; we knew they were not
waiting for us, but having only four men, and a couple of fowling-
pieces, we did not feel secure in their neighbourhood. As we rowed
past them they took no notice of us, but no sooner had we anchored,
than they pulled off towards our boat; but we should have felt little
discomfort, had they not had their mat coverings stowed away, while
all the Muruts had their arms ready for action. I told my men to show
no sign of alarm, but keeping our guns within reach, waited their
coming.
It was a great relief to find that they only came to ask for a little
tobacco, but some of us had been accustomed to the neighbourhood
of the Seribas and Sakarang Dayaks, who on head-hunting
expeditions spare none, if of a weaker party. We found they were on
the look-out for some of the Tabuns, who, flying before the Kayans,
had established themselves at Batu Miris, near the entrance of the
Limbang river, and with whom they had an ancient feud. To show the
apathy of the Bornean Government, I may mention that it permitted
these skirmishes to take place close to the capital, and one day
some of my men who were cutting wood near the Consulate, were
startled by seeing two Tabuns rushing frantically past them; in a few
minutes five Trusan Muruts appeared in full chase, and eagerly
inquiring the direction taken by the fugitives, hurried at full speed on
a false track purposely pointed out by my Manilla men.
Another fact I may mention is that many Bisaya labourers who go
over to our colony of Labuan to seek for work have actually
attempted to disinter the bodies of those of our countrymen and
women who have been buried there. They have tried this to the great
grief and discomfort of their surviving friends, but the Bisayas have
generally, if not always, been disappointed by the great depth of the
graves, and their inefficient tools. It appears a disgusting thing that
there should be any necessity to watch over the graves of one’s
friends to prevent them being desecrated.
I shall have occasion hereafter to mention the Secret Societies
established by the Chinese, but as an illustration of the influence the
members exercise over each other, I will tell the following story:—
Perhaps those who have read my journeys to Kina Balu, and this
Limbang journal, may be interested in the fate of my boy Ahtan, and
I am sorry to say his conduct ultimately made me lose all interest in
him. In the year 1858 the Chinese in Brunei started a Secret Society,
called there a Hué; they said they were a branch of the Tienti, or
Heaven and Earth Society, that has ramifications in nearly all the
countries in which the Chinese have spread. At first but few joined it,
but by threats and cajolery they at last induced nearly all but the
head traders to enter it, and on one of the great Chinese religious
feasts, Ahtan asked my permission to go to it.
When he returned, it appeared to me he had a very hang-dog
look, and next day I noticed he was very busy about my medicine-
chest, and I found my laudanum bottle on the table. Being very much
engaged at the time preparing my letters for the mail, I took no
particular notice of his movements, but immediately after dinner,
having taken coffee, I felt drowsy, and had scarcely entered my
mosquito room, when I fell on the sofa, and remained in a stupefied
sleep for thirteen hours. On my recovery, Ahtan came with a scared
look, and said somebody had stolen my heavy iron chest, and it
proved to be the case, but as I had six dogs, one of whom was a
savage mastiff, my suspicions instantly fell upon my own people, and
passing over my household servants, I fixed on my boatmen as the
culprits.
The Sultan, however, sent and begged I would leave the matter in
his hands, and on my expressing my willingness, instantly arrested
two of my servants, Ahtan and a Manilla Christian named Peter.
They were separated, and at dead of night the Sultan went himself
with a drawn kris in his hand to the latter, and said if he would
confess he would save his life, but if not——; he did not finish the
sentence, as Peter instantly fell on his knees, and clinging to the
Sultan’s feet, begged that his life might be spared and he would
explain all. It appeared that while he held and quieted the mastiff,
Ahtan had taken a blacksmith and a carpenter to the chest, and they
had carried it off. As these men were constantly employed by me, it
explained the silence of the other dogs; but though he could tell how
the chest was carried off, he knew nothing of what had since
become of it. The Sultan then left him and went to Ahtan, but no
threats or entreaties had the slightest effect on him, as he had sworn
in the most solemn manner to be faithful to the members of the Tienti
Hué, and would confess nothing. The two accused were seized, and
as they also belonged to the Secret Society, suspicion was directed
to it. I sent for the chief and the other officers of the Hué, and told
them the whole story, and said, if the chest unbroken, with the 80l. in
it, and all the papers, were not placed on the ground before my
house within forty-eight hours, I would turn the Sultan’s attention on
them. They protested their utter ignorance of the robbery, which was
probably true, but they well knew how to influence all their members,
and before the forty-eight hours were over, the chest, untouched,
was thrown on the mud just above my house. Finding after a
fortnight that the prisoners were receiving treatment totally at
variance with English ideas of justice, I sent and begged the Sultan
to pardon them, and turn his attention to getting rid of the Secret
Society from his dominions. He complied, and it merely required a
warm recommendation on his part to the chief officers to break up
the society, to induce them to do it, as he declared that every
robbery in future should be laid at their door, and every crime
committed should be avenged on them. As the officers were men
doing a good business at the time, they quickly got rid of their
banners and meeting house, and I heard no more of the Hué during
the rest of the time I remained in Borneo, but during my last visit I
found the chief officers of the society reduced to comparative
poverty, as their partners and agents in Singapore, happening to be
real British subjects, had refused to have anything further to do with
them when they knew of their conduct.
I requested the Sultan to let the prisoners go, as all except Ahtan
were kept in the stocks in an open verandah, exposed to sun and
rain, and tormented the whole day by boat boys, who delighted in
torturing those whom they considered as infidels: in Brunei they have
no prisons whatever. Ahtan was better treated, as he was known to
have been a favourite servant, though his conduct was very bad,
particularly in dosing me with opium, yet I could not forget his
kindness to me during our wanderings in the interior, and asked for
his liberty on that plea. The Sultan’s answer was,—“The plea is
good, but the stubbornness of that boy in refusing to confess when
all the others had acknowledged their crime, deserves death.” I
heard a few months ago that he was keeping a small shop in
Labuan.
A man in whom I felt a very great interest, and was very sorry to
part with, was Musa, my Manilla steersman and coxswain; as a boy
he had been educated as a Christian, but having been captured very
young and sold by the Balignini pirates to the Mahomedans, he had
been circumcised, and joined their communion. He had a particular
antipathy to Signor Cuarteron, who returned the dislike, and used
gravely to assure me that my quiet, respectful follower had a design
to massacre him. When the priests first came to Brunei, all my
Manilla men attended mass, but were suddenly disgusted with
something which took place; and on my inquiring the cause, one of
them said, “We don’t like to be told that if we don’t again join the
Padre’s religion, he will send for a Spanish man-of-war to take us all
off prisoners to Manilla.” If he really did threaten them, he made a
great mistake, as some of them never went near the church again.
Musa, though modest and gentle in his manner, was as brave as a
lion, and would have followed me anywhere. Though very short, he
was squarely built, and exceedingly strong; a very powerful
swimmer, and good boatman. Many of these men excite a personal
regard, and I have always felt that for Inchi Mahomed, my Malay
writer, who was entrusted with the charge of the Consulate during
my lengthened absences, and he well deserved the trust.
Get Data Science with Python 1st Edition Coll. free all chapters
CHAPTER VIII.
THE SULU ARCHIPELAGO.
FIRST VISIT.
Picturesque Islands—Balambañgan—An old English Settlement—
Large Monkeys—Optical Illusions—Flights of Birds—The Curlew
—The way we shot them in Sarawak—Game—Banguey—Mali
Wali—Cleared Hills—Fine Water—Sweet-smelling Jasmine—
Cagayan Sulu—Intercourse with the Inhabitants—Appearance of
the Country—Lovely Scenery—Market—Inhabitants—Insolent
Traders—The Crater Harbour—Wall of Evergreen—Inner Lake—
Climb the Cliff—Scenery—Alligators numerous—Sulu—
Appearance from the Ship—Sugh, the Capital—Mr. Wyndham—
The Watering-place—Suspicious Natives—Fugitives from
Balignini—Reports—A Market—The Mountaineers civil—Walk to
the Palace—The Stockades—Armed Crowd—Audience Hall—
Absurd Reports—The Sultan and his Nobles—Dress—Politeness
of the Sultan—Return to the Ship—Datu Daniel—The
Racecourse—Effect of Dutch Shot—Tulyan Bay—Alarm of
Villagers—Sulu Government—Laws—Feuds—The Mahomedan
and the Pork—Population—Fighting-men—Slave Market—
Dignified carriage of the Nobles—Dress—The Balignini—Dutch
Attack—Appearance of the Country—Good Position of Island—
Tulyan—Basilan—Numerous Islets—Samboañgan—Spanish
Convict Settlement—Description of Country—Fort—Town—
Shops—The Church—The Men—The Women—The Corner Shop
—A Ball—Dancing difficult—Waltzes—Supplies at Samboañgan
—A lonely Grave.
During all the voyages I have made, I have never beheld islands
so picturesque as those scattered over the surface of the Sulu Seas,
or whose inhabitants more merited notice. I will therefore give a short
account of the visits I made thither, before the attacks of the Spanish
forces had altered the ancient state of affairs. I have already
delineated the north-west coast, and will therefore commence my
description from the island of Balambañgan, to the north of Maludu
Bay, which must always be of some interest to Englishmen from our
two unsuccessful attempts to form a settlement there.
We dropped anchor off Balambañgan, which at night appears a
low wooded island. I visited it in the morning in a cutter, and vainly
sought any fresh traces of human beings, though we found some old
deserted huts of the fishermen who frequent this shore for tripang.
Continuing our explorations, we noticed something moving along the
beach, and there were various conjectures among our party, some
affirming it to be a buffalo, others a man; I never was more deceived
in my own estimate of the size of an animal, as it proved to be a
large monkey, which with its companions was seeking shell-fish on
the sands; it was certainly very large, but not of such dimensions as
to warrant its being compared to a bull, but there appeared to be
some optical illusion caused by its looming over the water.
Pursuing our path along the beach, the seamen at last thought
they saw houses among the trees, but on landing we found we were
again deceived by a row of white rocks, prettily overhung with
creepers. Though no traces of inhabitants were to be found, yet
animal life was well represented, innumerable monkeys swarmed at
the edge of the jungle, while flights of birds of every kind kept rising
before us. I never saw more monstrous pelicans, but after having
been so deceived by the monkeys, I must not attempt to estimate
their height. The best birds, however, for culinary purposes, were the
curlews, some of which are as large as small fowls: unfortunately we
were not provided with shot, and ball fell harmlessly among them.
They are wary birds, but may yet be readily circumvented. There
is a spot at the entrance of one of the minor branches of the
Sarawak river, where the curlews congregate in thousands, but only
at the height of spring-tides can you get profitable shots at them.
There are broad sands there, and the birds spread over them to
feed; by degrees the rising waters gradually press them back
towards the wooded shore; and as beach after beach is covered,
they fly screaming above in wide circles, gradually narrowing till they
all settle on the spot near which the sportsmen lie concealed, either
behind scattered bushes, or in a prepared bower of leafy branches.
The evening has well closed in before the tip-top of high-water; and
the loud scream of the myriads of birds deadens the detonation of
the guns as they send their iron shower among them, enabling us to
load and reload without completely scaring the birds. We once
obtained ninety-five of the largest kind, and hundreds of smaller
ones, to feast the crowd who were assembled near preparatory to a
great tuba-fishing.
Balambañgan is admirably situated to command the China seas;
however, if its position be superior to Labuan, the latter has coal to
counterbalance that advantage. While strolling along the beach we
came upon the tracks of cattle, deer, and pigs, and another party
from the ship had the good fortune to secure a large supply of
excellent fish with the seine. This island, as well as the neighbouring
coast of the mainland, appears to swarm with game; I landed on the
latter, and found an extensive open plain, diversified with a few low
eminences, backed by some cleared hills, and there the tracks of
wild cattle, deer, and pigs were innumerable. The rhinoceros is also
reported to be occasionally seen, but we came across no traces of it.
Continuing our voyage, we passed the island of Banguey, in the
northern part of which there are fine peaked hills, with inhabitants,
and plenty of good water, therefore far preferable to Balambañgan
for a settlement; as if the harbours be not good, there is sufficient
shelter against both monsoons.
The next island is Mali Wali, and here we anchored to examine it.
We tried at many places, but found the little creeks shallow and lined
with mangrove swamps; but by landing on the south side, at the east
end of the stone beach, there is but a few minutes’ walk in dry forest
between the shore and the cleared land. The appearance of the
island is remarkable; for miles the hills apparently are clothed with
grass, with only a narrow belt of jungle skirting the shingly beach; the
reality, however, disappointed us, as we found that this verdant-
looking land was but a heap of soft sandstone, with long coarse
grass growing up between the crevices. However, there is a good
supply of clear water from tiny streams and springs, and the tracks of
deer were observed in many places, while on all sides a species of
wild jasmine grew in luxuriance, bearing a very sweet-scented
flower.

More Related Content

Similar to Get Data Science with Python 1st Edition Coll. free all chapters (20)

PDF
Python training-course-content
RojaPriya
 
PDF
Mastering pandas 1st Edition Femi Anthony
paaolablan
 
PDF
Python Advanced Predictive Analytics Kumar Ashish
dakorarampse
 
PDF
Python Machine Learning Sebastian Raschka Vahid Mirjalili
alhbebtroll
 
PDF
Python Distilled Developer s Library 1st Edition David Beazley
gemsergrzona
 
PDF
Python For Data Analysis 3rd Wes Mckinney
luvoszugrav
 
PDF
Expert Python Programming - Second Edition Michał Jaworski
naterysandr
 
PDF
Python Essentials For Dummies John C Shovic Alan Simpson
cundyfema
 
PDF
Best data analyst course syllabus 2025.pdf
mayra0232020
 
PDF
Dead Simple Python Idiomatic Python for the Impatient Programmer Jason C. Mcd...
gustyyrauan
 
PDF
Introduction To Python
Vanessa Rene
 
PDF
Python Programming A Modular Approach Taneja Sheetal Kumar Naveen
llocjaenoku
 
PDF
Dead Simple Python Idiomatic Python for the Impatient Programmer Jason C. Mcd...
benhurmaarup
 
PDF
P mysql training in bangalore
myTectra Learning Solutions Private Ltd
 
PDF
PHP & mySQL Training in Bangalore at myTectra
myTectra Learning Solutions Private Ltd
 
PDF
python-for-advanced-data-science-techniques-and-best-practices-20240911071850...
abhishekprasadabhima
 
PDF
The Rust Programming Language 2nd Edition Steve Klabnik
onutaithakut25
 
PDF
Python for Data Analysis 3rd Edition by Wes McKinney ISBN 9781098103989 10981...
bordihelomjl
 
PDF
Python course syllabus
Sugantha T
 
PDF
The Rust Programming Language Steve Klabnik
willynnekane42
 
Python training-course-content
RojaPriya
 
Mastering pandas 1st Edition Femi Anthony
paaolablan
 
Python Advanced Predictive Analytics Kumar Ashish
dakorarampse
 
Python Machine Learning Sebastian Raschka Vahid Mirjalili
alhbebtroll
 
Python Distilled Developer s Library 1st Edition David Beazley
gemsergrzona
 
Python For Data Analysis 3rd Wes Mckinney
luvoszugrav
 
Expert Python Programming - Second Edition Michał Jaworski
naterysandr
 
Python Essentials For Dummies John C Shovic Alan Simpson
cundyfema
 
Best data analyst course syllabus 2025.pdf
mayra0232020
 
Dead Simple Python Idiomatic Python for the Impatient Programmer Jason C. Mcd...
gustyyrauan
 
Introduction To Python
Vanessa Rene
 
Python Programming A Modular Approach Taneja Sheetal Kumar Naveen
llocjaenoku
 
Dead Simple Python Idiomatic Python for the Impatient Programmer Jason C. Mcd...
benhurmaarup
 
P mysql training in bangalore
myTectra Learning Solutions Private Ltd
 
PHP & mySQL Training in Bangalore at myTectra
myTectra Learning Solutions Private Ltd
 
python-for-advanced-data-science-techniques-and-best-practices-20240911071850...
abhishekprasadabhima
 
The Rust Programming Language 2nd Edition Steve Klabnik
onutaithakut25
 
Python for Data Analysis 3rd Edition by Wes McKinney ISBN 9781098103989 10981...
bordihelomjl
 
Python course syllabus
Sugantha T
 
The Rust Programming Language Steve Klabnik
willynnekane42
 

Recently uploaded (20)

PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
Dimensions of Societal Planning in Commonism
StefanMz
 
community health nursing question paper 2.pdf
Prince kumar
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
Ad

Get Data Science with Python 1st Edition Coll. free all chapters

  • 1. Full download test bank at ebook textbookfull.com Data Science with Python 1st C L I C K L I N K T O D O W L O A D https://textbookfull.com/product/data- science-with-python-1st-edition-coll/ textbookfull
  • 2. More products digital (pdf, epub, mobi) instant download maybe you interests ... Data Science and Analytics with Python 1st Edition Jesus Rogel-Salazar https://textbookfull.com/product/data-science-and-analytics-with- python-1st-edition-jesus-rogel-salazar/ Python Data Science Handbook Essential Tools for Working with Data 1st Edition Jake Vanderplas https://textbookfull.com/product/python-data-science-handbook- essential-tools-for-working-with-data-1st-edition-jake- vanderplas/ Python Data Science Handbook Essential Tools for Working with Data 1st Edition Jake Vanderplas https://textbookfull.com/product/python-data-science-handbook- essential-tools-for-working-with-data-1st-edition-jake- vanderplas-2/ Data Science from Scratch First Principles with Python 2nd Edition Joel Grus https://textbookfull.com/product/data-science-from-scratch-first- principles-with-python-2nd-edition-joel-grus/
  • 3. Data Science from Scratch First Principles with Python 2nd Edition Grus Joel https://textbookfull.com/product/data-science-from-scratch-first- principles-with-python-2nd-edition-grus-joel/ Data science and complex networks : real cases studies with Python First Edition Caldarelli https://textbookfull.com/product/data-science-and-complex- networks-real-cases-studies-with-python-first-edition-caldarelli/ Learning Data Mining with Python Layton https://textbookfull.com/product/learning-data-mining-with- python-layton/ Graph Data Science with Neo4j: Learn how to use Neo4j 5 with Graph Data Science library 2.0 and its Python driver for your project Scifo https://textbookfull.com/product/graph-data-science-with- neo4j-learn-how-to-use-neo4j-5-with-graph-data-science- library-2-0-and-its-python-driver-for-your-project-scifo/ Python for Data Science 2nd Edition John Paul Mueller https://textbookfull.com/product/python-for-data-science-2nd- edition-john-paul-mueller/
  • 6. Table of Contents Python: Real-World Data Science Meet Your Course Guide What's so cool about Data Science? Course Structure Course Journey The Course Roadmap and Timeline 1. Course Module 1: Python Fundamentals 1. Introduction and First Steps – Take a Deep Breath A proper introduction Enter the Python About Python Portability Coherence Developer productivity An extensive library Software quality Software integration Satisfaction and enjoyment What are the drawbacks? Who is using Python today? Setting up the environment Python 2 versus Python 3 – the great debate What you need for this course Installing Python Installing IPython Installing additional packages How you can run a Python program Running Python scripts Running the Python interactive shell Running Python as a service Running Python as a GUI application How is Python code organized
  • 7. How do we use modules and packages Python's execution model Names and namespaces Scopes Guidelines on how to write good code The Python culture A note on the IDEs 2. Object-oriented Design Introducing object-oriented Objects and classes Specifying attributes and behaviors Data describes objects Behaviors are actions Hiding details and creating the public interface Composition Inheritance Inheritance provides abstraction Multiple inheritance Case study 3. Objects in Python Creating Python classes Adding attributes Making it do something Talking to yourself More arguments Initializing the object Explaining yourself Modules and packages Organizing the modules Absolute imports Relative imports Organizing module contents Who can access my data? Third-party libraries Case study 4. When Objects Are Alike
  • 8. Basic inheritance Extending built-ins Overriding and super Multiple inheritance The diamond problem Different sets of arguments Polymorphism Abstract base classes Using an abstract base class Creating an abstract base class Demystifying the magic Case study 5. Expecting the Unexpected Raising exceptions Raising an exception The effects of an exception Handling exceptions The exception hierarchy Defining our own exceptions Case study 6. When to Use Object-oriented Programming Treat objects as objects Adding behavior to class data with properties Properties in detail Decorators – another way to create properties Deciding when to use properties Manager objects Removing duplicate code In practice Case study 7. Python Data Structures Empty objects Tuples and named tuples Named tuples Dictionaries Dictionary use cases
  • 9. Using defaultdict Counter Lists Sorting lists Sets Extending built-ins Queues FIFO queues LIFO queues Priority queues Case study 8. Python Object-oriented Shortcuts Python built-in functions The len() function Reversed Enumerate File I/O Placing it in context An alternative to method overloading Default arguments Variable argument lists Unpacking arguments Functions are objects too Using functions as attributes Callable objects Case study 9. Strings and Serialization Strings String manipulation String formatting Escaping braces Keyword arguments Container lookups Object lookups Making it look right Strings are Unicode
  • 10. Converting bytes to text Converting text to bytes Mutable byte strings Regular expressions Matching patterns Matching a selection of characters Escaping characters Matching multiple characters Grouping patterns together Getting information from regular expressions Making repeated regular expressions efficient Serializing objects Customizing pickles Serializing web objects Case study 10. The Iterator Pattern Design patterns in brief Iterators The iterator protocol Comprehensions List comprehensions Set and dictionary comprehensions Generator expressions Generators Yield items from another iterable Coroutines Back to log parsing Closing coroutines and throwing exceptions The relationship between coroutines, generators, and functions Case study 11. Python Design Patterns I The decorator pattern A decorator example Decorators in Python The observer pattern
  • 11. An observer example The strategy pattern A strategy example Strategy in Python The state pattern A state example State versus strategy State transition as coroutines The singleton pattern Singleton implementation The template pattern A template example 12. Python Design Patterns II The adapter pattern The facade pattern The flyweight pattern The command pattern The abstract factory pattern The composite pattern 13. Testing Object-oriented Programs Why test? Test-driven development Unit testing Assertion methods Reducing boilerplate and cleaning up Organizing and running tests Ignoring broken tests Testing with py.test One way to do setup and cleanup A completely different way to set up variables Skipping tests with py.test Imitating expensive objects How much testing is enough? Case study Implementing it 14. Concurrency
  • 12. Threads The many problems with threads Shared memory The global interpreter lock Thread overhead Multiprocessing Multiprocessing pools Queues The problems with multiprocessing Futures AsyncIO AsyncIO in action Reading an AsyncIO future AsyncIO for networking Using executors to wrap blocking code Streams Executors Case study 2. Course Module 2: Data Analysis 1. Introducing Data Analysis and Libraries Data analysis and processing An overview of the libraries in data analysis Python libraries in data analysis NumPy pandas Matplotlib PyMongo The scikit-learn library 2. NumPy Arrays and Vectorized Computation NumPy arrays Data types Array creation Indexing and slicing Fancy indexing Numerical operations on arrays Array functions
  • 13. Data processing using arrays Loading and saving data Saving an array Loading an array Linear algebra with NumPy NumPy random numbers 3. Data Analysis with pandas An overview of the pandas package The pandas data structure Series The DataFrame The essential basic functionality Reindexing and altering labels Head and tail Binary operations Functional statistics Function application Sorting Indexing and selecting data Computational tools Working with missing data Advanced uses of pandas for data analysis Hierarchical indexing The Panel data 4. Data Visualization The matplotlib API primer Line properties Figures and subplots Exploring plot types Scatter plots Bar plots Contour plots Histogram plots Legends and annotations Plotting functions with pandas Additional Python data visualization tools
  • 14. Bokeh MayaVi 5. Time Series Time series primer Working with date and time objects Resampling time series Downsampling time series data Upsampling time series data Timedeltas Time series plotting 6. Interacting with Databases Interacting with data in text format Reading data from text format Writing data to text format Interacting with data in binary format HDF5 Interacting with data in MongoDB Interacting with data in Redis The simple value List Set Ordered set 7. Data Analysis Application Examples Data munging Cleaning data Filtering Merging data Reshaping data Data aggregation Grouping data 3. Course Module 3: Data Mining 1. Getting Started with Data Mining Introducing data mining A simple affinity analysis example What is affinity analysis? Product recommendations
  • 15. Loading the dataset with NumPy Implementing a simple ranking of rules Ranking to find the best rules A simple classification example What is classification? Loading and preparing the dataset Implementing the OneR algorithm Testing the algorithm 2. Classifying with scikit-learn Estimators scikit-learn estimators Nearest neighbors Distance metrics Loading the dataset Moving towards a standard workflow Running the algorithm Setting parameters Preprocessing using pipelines An example Standard preprocessing Putting it all together Pipelines 3. Predicting Sports Winners with Decision Trees Loading the dataset Collecting the data Using pandas to load the dataset Cleaning up the dataset Extracting new features Decision trees Parameters in decision trees Using decision trees Sports outcome prediction Putting it all together Random forests How do ensembles work? Parameters in Random forests Applying Random forests
  • 16. Engineering new features 4. Recommending Movies Using Affinity Analysis Affinity analysis Algorithms for affinity analysis Choosing parameters The movie recommendation problem Obtaining the dataset Loading with pandas Sparse data formats The Apriori implementation The Apriori algorithm Implementation Extracting association rules Evaluation 5. Extracting Features with Transformers Feature extraction Representing reality in models Common feature patterns Creating good features Feature selection Selecting the best individual features Feature creation Creating your own transformer The transformer API Implementation details Unit testing Putting it all together 6. Social Media Insight Using Naive Bayes Disambiguation Downloading data from a social network Loading and classifying the dataset Creating a replicable dataset from Twitter Text transformers Bag-of-words N-grams Other features
  • 17. Naive Bayes Bayes' theorem Naive Bayes algorithm How it works Application Extracting word counts Converting dictionaries to a matrix Training the Naive Bayes classifier Putting it all together Evaluation using the F1-score Getting useful features from models 7. Discovering Accounts to Follow Using Graph Mining Loading the dataset Classifying with an existing model Getting follower information from Twitter Building the network Creating a graph Creating a similarity graph Finding subgraphs Connected components Optimizing criteria 8. Beating CAPTCHAs with Neural Networks Artificial neural networks An introduction to neural networks Creating the dataset Drawing basic CAPTCHAs Splitting the image into individual letters Creating a training dataset Adjusting our training dataset to our methodology Training and classifying Back propagation Predicting words Improving accuracy using a dictionary Ranking mechanisms for words Putting it all together 9. Authorship Attribution
  • 18. Attributing documents to authors Applications and use cases Attributing authorship Getting the data Function words Counting function words Classifying with function words Support vector machines Classifying with SVMs Kernels Character n-grams Extracting character n-grams Using the Enron dataset Accessing the Enron dataset Creating a dataset loader Putting it all together Evaluation 10. Clustering News Articles Obtaining news articles Using a Web API to get data Reddit as a data source Getting the data Extracting text from arbitrary websites Finding the stories in arbitrary websites Putting it all together Grouping news articles The k-means algorithm Evaluating the results Extracting topic information from clusters Using clustering algorithms as transformers Clustering ensembles Evidence accumulation How it works Implementation Online learning An introduction to online learning
  • 19. Implementation 11. Classifying Objects in Images Using Deep Learning Object classification Application scenario and goals Use cases Deep neural networks Intuition Implementation An introduction to Theano An introduction to Lasagne Implementing neural networks with nolearn GPU optimization When to use GPUs for computation Running our code on a GPU Setting up the environment Application Getting the data Creating the neural network Putting it all together 12. Working with Big Data Big data Application scenario and goals MapReduce Intuition A word count example Hadoop MapReduce Application Getting the data Naive Bayes prediction The mrjob package Extracting the blog posts Training Naive Bayes Putting it all together Training on Amazon's EMR infrastructure 13. Next Steps… Chapter 1 – Getting Started with Data Mining
  • 20. Scikit-learn tutorials Extending the IPython Notebook Chapter 2 – Classifying with scikit-learn Estimators More complex pipelines Comparing classifiers Chapter 3: Predicting Sports Winners with Decision Trees More on pandas Chapter 4 – Recommending Movies Using Affinity Analysis The Eclat algorithm Chapter 5 – Extracting Features with Transformers Vowpal Wabbit Chapter 6 – Social Media Insight Using Naive Bayes Natural language processing and part-of-speech tagging Chapter 7 – Discovering Accounts to Follow Using Graph Mining More complex algorithms Chapter 8 – Beating CAPTCHAs with Neural Networks Deeper networks Reinforcement learning Chapter 9 – Authorship Attribution Local n-grams Chapter 10 – Clustering News Articles Real-time clusterings Chapter 11 – Classifying Objects in Images Using Deep Learning Keras and Pylearn2 Mahotas Chapter 12 – Working with Big Data Courses on Hadoop Pydoop Recommendation engine More resources 4. Course Module 4: Machine Learning 1. Giving Computers the Ability to Learn from Data How to transform data into knowledge The three different types of machine learning Making predictions about the future with supervised learning
  • 21. Classification for predicting class labels Regression for predicting continuous outcomes Solving interactive problems with reinforcement learning Discovering hidden structures with unsupervised learning Finding subgroups with clustering Dimensionality reduction for data compression An introduction to the basic terminology and notations A roadmap for building machine learning systems Preprocessing – getting data into shape Training and selecting a predictive model Evaluating models and predicting unseen data instances Using Python for machine learning 2. Training Machine Learning Algorithms for Classification Artificial neurons – a brief glimpse into the early history of machine learning Implementing a perceptron learning algorithm in Python Training a perceptron model on the Iris dataset Adaptive linear neurons and the convergence of learning Minimizing cost functions with gradient descent Implementing an Adaptive Linear Neuron in Python Large scale machine learning and stochastic gradient descent 3. A Tour of Machine Learning Classifiers Using scikit-learn Choosing a classification algorithm First steps with scikit-learn Training a perceptron via scikit-learn Modeling class probabilities via logistic regression Logistic regression intuition and conditional probabilities Learning the weights of the logistic cost function Training a logistic regression model with scikit-learn Tackling overfitting via regularization Maximum margin classification with support vector machines Maximum margin intuition Dealing with the nonlinearly separable case using slack variables Alternative implementations in scikit-learn
  • 22. Solving nonlinear problems using a kernel SVM Using the kernel trick to find separating hyperplanes in higher dimensional space Decision tree learning Maximizing information gain – getting the most bang for the buck Building a decision tree Combining weak to strong learners via random forests K-nearest neighbors – a lazy learning algorithm 4. Building Good Training Sets – Data Preprocessing Dealing with missing data Eliminating samples or features with missing values Imputing missing values Understanding the scikit-learn estimator API Handling categorical data Mapping ordinal features Encoding class labels Performing one-hot encoding on nominal features Partitioning a dataset in training and test sets Bringing features onto the same scale Selecting meaningful features Sparse solutions with L1 regularization Sequential feature selection algorithms Assessing feature importance with random forests 5. Compressing Data via Dimensionality Reduction Unsupervised dimensionality reduction via principal component analysis Total and explained variance Feature transformation Principal component analysis in scikit-learn Supervised data compression via linear discriminant analysis Computing the scatter matrices Selecting linear discriminants for the new feature subspace Projecting samples onto the new feature space LDA via scikit-learn
  • 23. Using kernel principal component analysis for nonlinear mappings Kernel functions and the kernel trick Implementing a kernel principal component analysis in Python Example 1 – separating half-moon shapes Example 2 – separating concentric circles Projecting new data points Kernel principal component analysis in scikit-learn 6. Learning Best Practices for Model Evaluation and Hyperparameter Tuning Streamlining workflows with pipelines Loading the Breast Cancer Wisconsin dataset Combining transformers and estimators in a pipeline Using k-fold cross-validation to assess model performance The holdout method K-fold cross-validation Debugging algorithms with learning and validation curves Diagnosing bias and variance problems with learning curves Addressing overfitting and underfitting with validation curves Fine-tuning machine learning models via grid search Tuning hyperparameters via grid search Algorithm selection with nested cross-validation Looking at different performance evaluation metrics Reading a confusion matrix Optimizing the precision and recall of a classification model Plotting a receiver operating characteristic The scoring metrics for multiclass classification 7. Combining Different Models for Ensemble Learning Learning with ensembles Implementing a simple majority vote classifier Combining different algorithms for classification with majority vote Evaluating and tuning the ensemble classifier Bagging – building an ensemble of classifiers from bootstrap samples
  • 24. Leveraging weak learners via adaptive boosting 8. Predicting Continuous Target Variables with Regression Analysis Introducing a simple linear regression model Exploring the Housing Dataset Visualizing the important characteristics of a dataset Implementing an ordinary least squares linear regression model Solving regression for regression parameters with gradient descent Estimating the coefficient of a regression model via scikit- learn Fitting a robust regression model using RANSAC Evaluating the performance of linear regression models Using regularized methods for regression Turning a linear regression model into a curve – polynomial regression Modeling nonlinear relationships in the Housing Dataset Dealing with nonlinear relationships using random forests Decision tree regression Random forest regression A. Reflect and Test Yourself! Answers Module 2: Data Analysis Chapter 1: Introducing Data Analysis and Libraries Chapter 2: Object-oriented Design Chapter 3: Data Analysis with pandas Chapter 4: Data Visualization Chapter 5: Time Series Chapter 6: Interacting with Databases Chapter 7: Data Analysis Application Examples Module 3: Data Mining Chapter 1: Getting Started with Data Mining Chapter 2: Classifying with scikit-learn Estimators Chapter 3: Predicting Sports Winners with Decision Trees Chapter 4: Recommending Movies Using Affinity Analysis Chapter 5: Extracting Features with Transformers Chapter 6: Social Media Insight Using Naive Bayes
  • 25. Chapter 7: Discovering Accounts to Follow Using Graph Mining Chapter 8: Beating CAPTCHAs with Neural Networks Chapter 9: Authorship Attribution Chapter 10: Clustering News Articles Chapter 11: Classifying Objects in Images Using Deep Learning Chapter 12: Working with Big Data Module 4: Machine Learning Chapter 1: Giving Computers the Ability to Learn from Data Chapter 2: Training Machine Learning Chapter 3: A Tour of Machine Learning Classifiers Using scikit-learn Chapter 4: Building Good Training Sets – Data Preprocessing Chapter 5: Compressing Data via Dimensionality Reduction Chapter 6: Learning Best Practices for Model Evaluation and Hyperparameter Tuning Chapter 7: Combining Different Models for Ensemble Learning Chapter 8: Predicting Continuous Target Variables with Regression Analysis B. Bibliography Index
  • 27. Python: Real-World Data Science A course in four modules Unleash the power of Python and its robust data science capabilities with your Course Guide Ankita Thakur Learn to use powerful Python libraries for effective data processing and analysis To contact your Course Guide Email: <[email protected]>
  • 28. Meet Your Course Guide Hello and welcome to this Data Science with Python course. You now have a clear pathway from learning Python core features right through to getting acquainted with the concepts and techniques of the data science field—all using Python! This course has been planned and created for you by me Ankita Thakur – I am your Course Guide, and I am here to help you have a great journey along the pathways of learning that I have planned for you. I've developed and created this course for you and you'll be seeing me through the whole journey, offering you my thoughts and ideas behind what you're going to learn next and why I recommend each step. I'll provide tests and quizzes to help you reflect on your learning, and code challenges that will be pitched just right for you through the course. If you have any questions along the way, you can reach out to me over e-mail or telephone and I'll make sure you get everything from the course that we've planned – for you to start your career in the field of data science. Details of how to contact me are included on the first page of this course.
  • 29. What's so cool about Data Science? What is Data Science and why is there so much of buzz about this in the world? Is it of great importance? Well, the following sentence will answer all such questions: "This hot new field promises to revolutionize industries from business to government, health care to academia." --The New York Times The world is generating data at an increasing pace. Consumers, sensors, or scientific experiments emit data points every day. In finance, business, administration, and the natural or social sciences, working with data can make up a significant part of the job. Being able to efficiently work with small or large datasets has become a valuable skill. Also, we live in a world of connected things where tons of data is generated and it is humanly impossible to analyze all the incoming data and make decisions. Human decisions are increasingly replaced by decisions made by computers. Thanks to the field of Data Science! Data science has penetrated deeply in our connected world and there is a growing demand in the market for people who not only understand data science algorithms thoroughly, but are also capable of programming these algorithms. A field that is at the intersection of many fields, including data mining, machine learning, and statistics, to name a few. This puts an immense burden on all levels of data scientists; from the one who is aspiring to become a data scientist and those who are currently practitioners in this field. Treating these algorithms as a black box and using them in decision- making systems will lead to counterproductive results. With tons of algorithms and innumerable problems out there, it requires a good
  • 30. grasp of the underlying algorithms in order to choose the best one for any given problem. Python as a programming language has evolved over the years and today, it is the number one choice for a data scientist. Python has become the most popular programming language for data science because it allows us to forget about the tedious parts of programming and offers us an environment where we can quickly jot down our ideas and put concepts directly into action. It has been used in industry for a long time, but it has been popular among researchers as well. In contrast to more specialized applications and environments, Python is not only about data analysis. The list of industrial-strength libraries for many general computing tasks is long, which makes working with data in Python even more compelling. Whether your data lives inside SQL or NoSQL databases or is out there on the Web and must be crawled or scraped first, the Python community has already developed packages for many of those tasks.
  • 31. Course Structure Frankly speaking, it's a wise decision to know the nitty-gritty of Python as it's a trending language. I'm sure you'll gain lot of knowledge through this course and be able to implement all those in practice. However, I want to highlight that the road ahead may be bumpy on occasions, and some topics may be more challenging than others, but I hope that you will embrace this opportunity and focus on the reward. Remember that we are on this journey together, and throughout this course, we will add many powerful techniques to your arsenal that will help us solve even the toughest problems the data-driven way. I've created this learning path for you that consist of four models. Each of these modules are a mini-course in their own way, and as you complete each one, you'll have gained key skills and be ready for the material in the next module. So let's now look at the pathway these modules create—basically all the topics that will be exploring in this learning journey.
  • 32. Course Journey We start the course with our very first module, Python Fundamentals, to help you get familiar with Python. Installing Python correctly is equal to half job done. This module starts with the installation of Python, IPython, and all the necessary packages. Then, we'll see the fundamentals of object-oriented programming because Python itself is an object-oriented programming language. Finally, we'll make friends with some of the core concepts of Python—how to get Python programming basics nailed down. Then we'll move towards the analysis part. The second module, Data Analysis, will get you started with Python data analysis in a practical and example-driven way. You'll see how we can use Python libraries for effective data processing and analysis. So, if you want to to get started with basic data processing tasks or time series, then you can find lot of hands-on knowledge in the examples of this module.
  • 33. Another random document with no related content on Scribd:
  • 34. 9th.—This morning Musa was very feverish, so the men asked me to stop a day to collect provisions. To this I unwillingly assented, but they did little else than lie down. About nine a.m. five of the men proposed that I should allow them to leave their muskets and all their baggage, and push on as fast as possible to the boats, while I moved on quietly with the sick and sore-footed. I consented, on the condition that they would stay at the boats no longer than would be necessary to cook a meal; that then they were to return laden with provisions. To this they agreed, and then left us. The two who stayed behind the day before yesterday came up with us; it was for them I was anxious. During the ascent of the steep mountain on the 8th the last remnant of my shoes was carried away, and yesterday I attempted to protect my feet by fastening some goats’ skin over them in the form of moccassins. To-day I am trying to improve them, but with very little success. 10th.—Musa having shaken off his fever, was enabled to start; but all the men are weak, and many are ailing. Though perfectly well in health, I find that, having only had for yesterday’s dinner a glass of rice-water with the palm-cabbage, I am not fit for very long walks, particularly as my moccassins are cut to pieces by the rough stones and thorns, and I am compelled to walk bare-footed. My greatest torment are the leeches getting between my toes and crawling up my trousers, reaching even to my waist, where the tight belt prevented their farther progress. Squeezing a little tobacco-juice made them drop off, but I could not be continually stopping to do this. 11th.—We stopped all day. The industrious cut down some Loba- palms, and made a little sago; the lazy collected a few cabbages. I tried a little of the former; it was indeed delicious. Some of the men, who wandered farther than the others in search of wild fruits, reported seeing some very large monkeys, which they said might be orang-utans, and whilst speaking of them I was reminded of the various stories told of people being carried off by them. I have referred to this subject in my account of my journeys among the Sea Dayaks, but although many stories are related of the male orang-utan carrying off young Dayak maidens into the jungle, yet it is seldom that we hear of the female orang-utan running off
  • 35. with a man. But the Muruts of Padas tell the following narrative, which, they say, may be believed. Some years ago, one of their young men was wandering in the jungle, armed with a sumpitan, or blow-pipe, and a sword. He came to the banks of a pebbly stream, and being a hot day, he thought he would have a bathe. He placed his arms and clothes at the foot of a tree, and then went into the water. After a time, being sufficiently refreshed, he was returning to dress, when he perceived an enormous female orang-utan standing between him and the tree. She advanced towards him, as he stood paralyzed by surprise, and seizing him by the arm, compelled him to follow her to a branching tree and climb up it. When he reached her resting-place, consisting of boughs and branches woven into a comfortable nest, she made him enter. There he remained some months jealously watched by his strange companion, fed by her on fruits and the cabbage of the palm, and rarely permitted to touch the earth with his feet, but compelled to move from tree to tree. This life continued some time, till the female orang-utan becoming less watchful permitted the Murut more liberty. He availed himself of it to slip down the trunk of the tree and run to the place where he had formerly left his weapons. She, seeing his attempted escape, followed, to be pierced, as she approached him, by a poisoned arrow. I was told if I would ascend the Padas river as far as the man’s village, I might hear the story from his own lips, as he was still alive. 12th.—Walked on a mile, the men excessively lazy. Finding the river smooth, they proposed trying rafts; so we stopped to construct them. One of the men, observing that I was dining on a cabbage- palm boiled in a little rice-water, presented me with a cup full of uncooked rice. I was very grateful to him for it; but we put it by, in case the palms should fail us, as they do in some districts. 13th.—About nine, we pushed off, and got on very well for two hours. Found one of the rafts smashed up against a rock, and the men away walking. Continued till about one o’clock, when ours also became fixed on a rock, and our men were too dispirited to get it off; and saying that the rapids ahead of us were dangerous, they proposed walking to-morrow. We should have thought nothing of
  • 36. such paltry difficulties a week ago, but the men were losing their courage with their strength. I refused, however, to stop till to-morrow, and walked on for a couple of hours. In crossing a ravine to-day, we disturbed a female bear, which, however, dashed with her cubs into thick brushwood, so without dogs it was useless following her. She roared in a manner worthy of an animal double her size. 14th.—The river still full of rapids; but the hills are gradually receding from the banks, giving it more space, and it sometimes spreads out into extensive sheets of water, with immense pebbly flats. Islands are also beginning to appear. It was again proposed to build rafts, but I steadily refused, and kept walking till nearly five. After sunset, the last stragglers overtook us. We continually came upon the traces of the advance-party. At one of their resting-places, we found the bones of a fine fish, which by some means they had secured. Our old Pakatan declared they had either found it stranded, or else had startled a kite from his prey. It proved to be the former, though the latter had happened to us once. 15th.—Yesterday and to-day the character of the forest has altered. We are now marching through the old farming grounds of the Muruts; found some of their fruit trees; among others, one covered with fine-looking oranges, but intolerably sour. I secured the opium bottle to-day, intending to take a dose to deaden the pangs of hunger, but I put it off till the evening, thinking it might interfere with my walking. I noticed near the orange-tree above mentioned that the whole ground was a mass of water-worn pebbles, evidently the ancient bed of the stream; it was now at least a hundred feet above the water’s edge. At half-past four p.m. I brought up for the night, and after bathing stretched myself on my back, munching a great lump of cabbage, when my eyes, wandering over the scene, fell on a hill about three miles ahead of us. I sat up and looked at it again; and, turning to my companions, said, “Why, that reminds me of the high land near the mouth of the Madihit;” but we agreed that it was impossible, as our five men had been gone six days, and we felt assured that we should have met them ere this if we were so near our boats as that, particularly as we, both yesterday and to-day, had made very long
  • 37. walks. Since we have had a bearing of Molu, we have been keeping generally in a west course, but the river has taken some very extraordinary windings. Having secured some fruit of the Jintawan, or Indian-rubber plant, and some cabbages, I was enabled to satisfy my hunger before going to sleep, so put off taking any laudanum, to which I had a very great dislike. The Jintawan fruit is very pleasantly acid, about the size of a very large pear, and of a deep orange colour. It consists of a thick rind full of Indian-rubber, surrounding some pulp-covered seeds. One of the plants we came across was very handsome, growing in the most luxuriant manner over a lofty tree with few branches. The Jintawan is a creeper, and this one had extended itself at least forty feet up the trunk and had covered the outspreading boughs. It was loaded with fruit, but my men had so lost heart that not one would climb the tree, but contented themselves with picking up the over-ripe produce which had fallen on the ground below. We had another very happy find to-day, for while passing under a fine tapang-tree, we noticed the remains of a bees’ nest scattered about, and every particle was eagerly appropriated. From the marks around it appeared as if a bear had climbed this lofty tree and torn down the nest to be devoured by its young below, as there were numerous tracks of the smaller animals around, but whether the comb had been sucked by the bears or not was very immaterial to our men, who rejoiced in securing the little honey still clinging to it. 16th.—Started early. About half my followers had so delayed us by their constantly lagging behind, that I determined to wait for them no longer, but to push on with such men as would follow me with all their strength. We felt that it would be impossible to walk many days farther on our scanty fare. The lazy ones having heard of our arrangement, tried to keep up with us, and did do so till eight, when I heard a shout from the foremost man, “Bandera! bandera!—the flag! the flag!” We rushed down the side of the hill like madmen, the fellows shouting for joy. Sure enough, there was the British flag hoisted, and our small boats at the mouth of the Madihit, with our five men looking fat and well beside my pale and famished followers. The
  • 38. rascals having left my guns and all the baggage in the jungle, and all being in good health, had managed to reach the Madihit in three days, and then set to work to eat and drink as much as possible. We arrived to find the provisions nearly gone; they said the bears had found out our cache and destroyed everything, and the only provisions left were those we put into the garei. I could only divide a cupful of beans to each man, as the five had managed to consume thirty pounds of sago and forty-two pints of beans in the course of four days, and they confessed to have daily caught very fine fish. But what angered the men most was the signs of waste around, where, having only half finished a plate of sago, they had thrown the rest away. I saw some picking up the burnt pieces that had not been washed away by the rain. I asked why, according to their agreement, they had not come back to meet us, knowing that we had several sick men. They put the blame on each other: one man, a Javanese, had left his sick son with us, but he unfeelingly observed that he was old enough to look after himself; that son had given us more trouble than any one else, both in going and returning. I searched their baskets, and found that they had not only hidden some more beans, but had stolen some of my cloth, though I could not fix on the man. I determined to punish them, so told them to go back and fetch the things they had left in the forest; or, on my return, I would submit the case to the Sultan, whether they had not forfeited wages by their unfair abandonment of their sickly companions. They started off, but their cowardly hearts failed them, and before night they came back. The ravages of the bears were distressing. They destroyed a Deane’s pistol-case, tore open my box of books, and ruined them; reduced the cloth to shreds, and tumbled it into the mud, where the white ants afterwards finished the spoiling; opened the tin boxes containing the sugar and biscuits, and of course devoured them; so that I have nothing left but coffee and arrack. After Musa had cooked a meal, a very frugal one, he went off with a party to fetch the garei, hoping to find a little sago left, but was disappointed.
  • 39. In the evening caught a few fish, but they were not much among so many. About seven, a most satisfactory savour rose to my nostrils. I found that Ahtan, having discovered a jar of pork fat, was preparing some cakes. I divided them, but he said, “No; you, sir, have the larger body, therefore should have the larger share.” I am not much given to emotions, but I never felt so thankful as when, stretched in the old Kayan hut, I watched them preparing an evening meal, and thought of all the dangers we had gone through without a single accident. True, we had lost guns, and goods, and ruined instruments of some value; but what of that?—there was no one the worse for his exertions. What was hunger now we were so near home? 17th.—Started early; and, as we have had no rain for two days, the river was quiet, and we only reached an island about fifteen miles from the Madalam. It shows the difference, however, between ascending and descending a river. About two a.m., our garei being well ahead, we saw before us a herd of wild cattle, quietly picking at a few blades of grass on a broad pebbly flat. I landed with a couple of men, to get between them and the jungle. I was within twenty yards of the nearest, a piebald, and was crawling through the tangled bushes to get a sight of him, whom I could hear browsing near me, when there arose a shout, then a rush, and the cattle were off dashing close to me, but perfectly concealed by the matted brushwood. It was the crew of one of the newly-arrived boats that, regardless of the warnings of their companions, had thus lost us a chance of a good dinner. I felt that, if my gun had been charged with shot, I could almost have peppered them. Shortly after I shot a pig through the back as he was crossing the river; but as all my men were Mahomedans, it was not worth while tracing him in the jungle. He bled so profusely in the water that he could not have run far. About five, we were passing down a rapid at a great pace, when one of the men touched me and pointed. I looked up, and there was a magnificent bull, three parts grown, standing within fifteen yards of me. To put up my gun and let fly was the work of a moment; but, before we had dashed on many yards, the beast, which had fallen on his forehead, was up and away. After a little time, we managed to
  • 40. stop the garei; and, landing, found traces of the beast’s blood. My feet were so painfully wounded that I could not manage to follow it, but left it to my men. A couple came up with him, as he stood with his legs well stretched out, bleeding profusely. He took no notice of them, even when they were within spearing distance; but all their nerve was gone, and they were afraid to thrust their weapons into him. They waited till the whole mob of hunters arrived, when the bull apparently recovering himself, dashed away into the jungle. Having secured the boats under the islands, I divided a tablespoonful of beans each, with a little pork fat to those who would take it. Musa told me that most of the men wanted to stay behind and follow the wounded Tambadau; but that, if I wished to go on, there were five volunteers who would pull straight to Brunei, now about a hundred miles off by river. To this I agreed. 18th.—I get away at daylight in a sampir with five men. Ahtan with an attack of fever and ague. The reaction was too much for him, so I stopped at an island about five miles from the Madalam to cook. I now produced my secret store of beans, and the cupful of rice that I had treasured up since it was given us on the 12th. The beans I gave to the men, and the rice I had boiled into a thin sort of gruel for Ahtan. I thought his feverish symptoms arose principally from over fatigue and hunger. In fact, after he had swallowed a strong dose of quinine, and taken half the gruel, he felt much better; the rest of it I gave to the men, as I wanted to give them sufficient strength to pull to Pengkalan Jawa. I would not take anything myself, as I did nothing but sit all day. I reserved my powers for the food I knew the Chinese trader there would quickly prepare for us. As we approached the more frequented parts of the river, we met some Muruts, who told us that the report of my death had brought forty steamers to the capital to revenge it, and that if I did not turn up the place was to be burnt. I knew this was one of the usual stories that arise from very little, but still I was anxious to get home; but with all our exertions we did not reach the Chinese trader’s house till 7 p.m. He received us most hospitably, produced tea, sugar-candy, biscuit, and dried fish, to stay our appetites, while a proper meal was prepared. In about an hour this appeared, and we managed to
  • 41. consume a very large fowl each, with an amount of rice that even startled the Baba. Before leaving at midnight, I made arrangements that a plentiful meal should be provided for the garei’s crew. 19th.—After pulling about fourteen hours, we reached Brunei by 2 p.m., to find the people beginning to wonder at our absence. The forty steamers proved to be Captain Cresswell, of the Surprise, who had visited the capital about ten days before with Mr. Low. The latter was beginning to be uneasy about my absence, and was preparing a party to come and search for me. 20th.—My boats now arrived, having failed to get the Tambadau. They said they followed him by the blood till mid-day, when they lost his traces among those of a herd which he had joined. I suspect they did not follow him very far. Thus ends my journal. As I have now made many journeys in Borneo, and seen much of forest walking, I think I can speak of it with something like certainty. I have ever found, in recording progress, that we can seldom allow more than a mile an hour under ordinary circumstances. Sometimes, when extremely difficult or winding, we do not make half a mile an hour. On certain occasions, when very hard pressed, I have seen the men manage a mile and a half; but, with all our exertions, I have never yet recorded more than ten miles progress in a day through thick pathless forests, and that was after ten hours of hard work. Of course we actually walk more than we record, as one cannot calculate the slight windings of the way; but allowing for all this, I have the strongest suspicion that Madame Pfeiffer measured her miles by her fatigue. She talks of twenty miles a day as a common performance of hers; and another visitor to this island beats her, recording walking thirty miles in one day through Bornean forests— an utter impossibility. There was an Adang man among the wax-hunters, the one who accompanied our guide for a short distance, who was pointed out to me as a model of activity, and he certainly appeared so; well built, strong, but light, he skimmed the ground; and the story is told of him, that on receiving information of the illness of his child, he started
  • 42. home, leaving everything behind him but his spear and a little food, and walked from forty to forty-five miles in two days. No European that I have ever seen would have had a chance with him in his own forests. Six miles a day is quite enough for any man who wishes to take his followers long journeys, unless specially favoured by the ground and the paths; Galton, in speaking of African travelling, says three miles a day with waggons, horses, and cattle, and he is of some authority. I have often thought that we must have walked twenty miles, but the bearings have always proved to me that we have seldom done half that distance. It requires great experience not to judge distance by the fatigue we feel. Whilst referring to the mistakes in the estimates of distance, I may notice the very remarkable errors into which two visitors to the Limbang have fallen. Mr. Motley[9] mentions exploring that stream to an estimated distance of one hundred and fifty miles, by the windings of the river, and about fifty in a general south-west direction. He reached the Limbuak village, which by my measurement is under twenty miles in a straight line from the mouth: fifty miles in a direct line to the south-west, would have nearly brought him to the Baram, across numerous ranges of hills, and several navigable streams, and a hundred and fifty miles up the river would have brought him nearly to the farthest point I reached, long past the limestone districts. It proves how impossible it is to trust to estimates. The next curious mistake I may notice, was made by Mr. de Crespigny; he ascended the river Limbang as far as the river Damit. I have seen a sketch map of his, and he places the mouth of that stream in north latitude, 3° 48’, and the mountain of Molu to the north-east of it, in latitude 4° 3’, whereas Molu Peak is a little to the westward of south from the Damit, and nearly twenty-five miles distant in a direct line. In drawing attention to these errors, I by no means claim immunity from them in the map of the Limbang and Baram rivers which accompanies this volume; but I think they will be found free from
  • 43. gross errors. The course of the latter river was taken down by Captain Brett of the Pluto, and observations of the latitude and longitude of the town of Lañgusan were made by many of the officers on board. In my land journeys, I had very inferior compasses, as I was unable to take with me the valuable levels and other instruments obligingly lent me by Dr. Coulthard, on account of their weight and size; but I used them as long as I was in my boats, to lay down the position of the mountains; and in order to enable me to correct my own errors, I put down the day’s observations on a rough map every evening during the journey, except after we had shot the cascade and wetted the paper too much to permit it being handled roughly. I may add, that of the whole party of nineteen, none after our return suffered severely from the exposure and privations we had undergone, and I believe the real reason was, that we always were dry at night. For many years we trusted during our expeditions to the leaf huts the natives are accustomed to construct for us and for themselves; but although with sufficient time, and when good materials are plentiful, they manage to make them tolerably watertight, yet they are never so good as the simple tents we always took with us during our later expeditions. With proper ropes and everything fitted to enable us to raise these tents on cross poles in ten minutes, the two did not weigh more than twenty pounds, and afforded comfortable accommodation for our whole party of nineteen people, with all our baggage, and on occasions our six guides took advantage of them also. I had suffered severely from exposure on former expeditions, particularly when we ascended the Sakarang, and were eight days sleeping in the leaf huts hastily erected by our followers. Of the seven Englishmen who slept on shore, I believe only one escaped without some severe attack of illness, and I remember the late Mr. Brereton mentioning that on his return from a visit to the Bugan country, where his men had been greatly exposed, a fourth of his party died of various diseases. Another precaution I took was to carry myself a few night things, as a light silk jacket, a pair of loose sleeping drawers of the same material, a jersey, and a dry towel, so
  • 44. that if my men lagged far behind, I was not kept for hours in my wet clothes; and whilst travelling in these forests you are always wet, as if there be no rain there are sure to be many rivers to ford. On my return, I tried to remember the geographical information that was given me before starting. I was told it would take six days from Blimbing to Madihit: leaving out the two days’ detention from freshes, it took us about three hours over the six days. Even the walking distance was really correct; it was only two days from the Adang landing-place, and seven from Madihit; as, although we took ten, yet for the first five days we did not do a fair half-day’s work on any of them. We were warned that it would be impossible to use rafts, and that the banks were almost impassable, and we indeed found it so. Many months before starting, I was told that if I wished to penetrate far into the interior, to try the Trusan, and not the Limbang, as the former was inhabited, the latter not. I went up the Trusan a few miles, but found it so small, I had no idea it penetrated to so great a distance. The fact is, that the rains run off very fast, and that the ordinary states of the rivers give no idea of the amount of water they bring down, but had we taken that route, we should have reached our farthest point with comparatively little fatigue. The Orang Kaya Upit arrived at his house November 13th, twenty- five days after I reached Brunei; so that it is fortunate I did not wait for him. I may add, that on November 20th, some Bisaya chiefs set upon pañgeran Makota, the shabandar, and killed him. They were wearied with his exactions. The immediate cause of his death was seizing the daughters of seven Orang Kayas, one of whom he had in his curtains when attacked, and this caused his death. The girl pointed him out to her father, trying to escape in a small canoe. The alarm was given, and his boat tilting over while he tried to avoid the shower of spears and stones, he fell into the stream and was drowned; for he was the only Malay I ever heard of who could not swim. Such was the end of this clever bad man. The Sultan was furious, but his fury was not shared by his four viziers; so that the affair ended by a dozen lives being taken, instead of the hundreds the Sultan desired.
  • 45. Brunei, February 8th, 1861.—Above two years have passed since I wrote this journal. The scheme of building a fort at the Madalam mouth did not succeed, as the Sultan, after the shabandar’s death, was very unwilling to assist any of the aborigines. I was away during the year 1860, and in the course of that time, a party of the Muruts, from the upper Trusan, came over and encamped at the mouth of the Salindong stream, and from thence sent on three men in a bark canoe to tell their friends of their presence. These men met the Orang Kaya Gomba, a Bisayan, at Batang Parak, and were treacherously slain by him. The Muruts waited a long time at Salindong, hoping to be fetched away by their friends. They could not walk the whole distance, as they had their women and children and all their worldly goods with them, intending to remove to the lower Limbang, and live with the Orang Kaya Upit. While thus detained, they were surprised by a large party of Kayans, and every one taken or slain. However, one of the prisoners afterwards managed to get away, and reached his friends, bringing this sad tale. The Orang Kaya Gomba declares that he mistook the three for Kayans, which is almost impossible, as no head-hunter would have been found paddling down a hostile stream in a bark canoe. Neither the Sultan nor any of the viziers will make the least inquiry into this affair, but the memory of it is treasured up in the hearts of the Muruts, and Orang Kaya Gomba may yet meet with a bloody death. I have remarked that during all our wanderings near Kina Balu we only at one place found the dried heads of enemies hung up in the villages there, and during my journeys up the Limbang, I do not remember noticing any, and yet Orang Kaya Gomba’s murderous action shows they do value them, which is confirmed by pañgeran mumin making a present of the head of the man he killed to the Gadang Muruts; and during my stay in Brunei, I have met small parties of head-hunters, but seeking only the heads of their real enemies. Yet I have always avoided spending a night in their
  • 46. immediate neighbourhood, and have kept our arms ready for instant service. One evening, during a heavy squall, we took shelter in a little river to the south of Point Kitam, in the Limbang Bay, and to our exceeding discomfort found a Murut boat with eighteen armed men in ambush round a short turn of the stream; we knew they were not waiting for us, but having only four men, and a couple of fowling- pieces, we did not feel secure in their neighbourhood. As we rowed past them they took no notice of us, but no sooner had we anchored, than they pulled off towards our boat; but we should have felt little discomfort, had they not had their mat coverings stowed away, while all the Muruts had their arms ready for action. I told my men to show no sign of alarm, but keeping our guns within reach, waited their coming. It was a great relief to find that they only came to ask for a little tobacco, but some of us had been accustomed to the neighbourhood of the Seribas and Sakarang Dayaks, who on head-hunting expeditions spare none, if of a weaker party. We found they were on the look-out for some of the Tabuns, who, flying before the Kayans, had established themselves at Batu Miris, near the entrance of the Limbang river, and with whom they had an ancient feud. To show the apathy of the Bornean Government, I may mention that it permitted these skirmishes to take place close to the capital, and one day some of my men who were cutting wood near the Consulate, were startled by seeing two Tabuns rushing frantically past them; in a few minutes five Trusan Muruts appeared in full chase, and eagerly inquiring the direction taken by the fugitives, hurried at full speed on a false track purposely pointed out by my Manilla men. Another fact I may mention is that many Bisaya labourers who go over to our colony of Labuan to seek for work have actually attempted to disinter the bodies of those of our countrymen and women who have been buried there. They have tried this to the great grief and discomfort of their surviving friends, but the Bisayas have generally, if not always, been disappointed by the great depth of the graves, and their inefficient tools. It appears a disgusting thing that
  • 47. there should be any necessity to watch over the graves of one’s friends to prevent them being desecrated. I shall have occasion hereafter to mention the Secret Societies established by the Chinese, but as an illustration of the influence the members exercise over each other, I will tell the following story:— Perhaps those who have read my journeys to Kina Balu, and this Limbang journal, may be interested in the fate of my boy Ahtan, and I am sorry to say his conduct ultimately made me lose all interest in him. In the year 1858 the Chinese in Brunei started a Secret Society, called there a Hué; they said they were a branch of the Tienti, or Heaven and Earth Society, that has ramifications in nearly all the countries in which the Chinese have spread. At first but few joined it, but by threats and cajolery they at last induced nearly all but the head traders to enter it, and on one of the great Chinese religious feasts, Ahtan asked my permission to go to it. When he returned, it appeared to me he had a very hang-dog look, and next day I noticed he was very busy about my medicine- chest, and I found my laudanum bottle on the table. Being very much engaged at the time preparing my letters for the mail, I took no particular notice of his movements, but immediately after dinner, having taken coffee, I felt drowsy, and had scarcely entered my mosquito room, when I fell on the sofa, and remained in a stupefied sleep for thirteen hours. On my recovery, Ahtan came with a scared look, and said somebody had stolen my heavy iron chest, and it proved to be the case, but as I had six dogs, one of whom was a savage mastiff, my suspicions instantly fell upon my own people, and passing over my household servants, I fixed on my boatmen as the culprits. The Sultan, however, sent and begged I would leave the matter in his hands, and on my expressing my willingness, instantly arrested two of my servants, Ahtan and a Manilla Christian named Peter. They were separated, and at dead of night the Sultan went himself with a drawn kris in his hand to the latter, and said if he would confess he would save his life, but if not——; he did not finish the sentence, as Peter instantly fell on his knees, and clinging to the Sultan’s feet, begged that his life might be spared and he would
  • 48. explain all. It appeared that while he held and quieted the mastiff, Ahtan had taken a blacksmith and a carpenter to the chest, and they had carried it off. As these men were constantly employed by me, it explained the silence of the other dogs; but though he could tell how the chest was carried off, he knew nothing of what had since become of it. The Sultan then left him and went to Ahtan, but no threats or entreaties had the slightest effect on him, as he had sworn in the most solemn manner to be faithful to the members of the Tienti Hué, and would confess nothing. The two accused were seized, and as they also belonged to the Secret Society, suspicion was directed to it. I sent for the chief and the other officers of the Hué, and told them the whole story, and said, if the chest unbroken, with the 80l. in it, and all the papers, were not placed on the ground before my house within forty-eight hours, I would turn the Sultan’s attention on them. They protested their utter ignorance of the robbery, which was probably true, but they well knew how to influence all their members, and before the forty-eight hours were over, the chest, untouched, was thrown on the mud just above my house. Finding after a fortnight that the prisoners were receiving treatment totally at variance with English ideas of justice, I sent and begged the Sultan to pardon them, and turn his attention to getting rid of the Secret Society from his dominions. He complied, and it merely required a warm recommendation on his part to the chief officers to break up the society, to induce them to do it, as he declared that every robbery in future should be laid at their door, and every crime committed should be avenged on them. As the officers were men doing a good business at the time, they quickly got rid of their banners and meeting house, and I heard no more of the Hué during the rest of the time I remained in Borneo, but during my last visit I found the chief officers of the society reduced to comparative poverty, as their partners and agents in Singapore, happening to be real British subjects, had refused to have anything further to do with them when they knew of their conduct. I requested the Sultan to let the prisoners go, as all except Ahtan were kept in the stocks in an open verandah, exposed to sun and rain, and tormented the whole day by boat boys, who delighted in torturing those whom they considered as infidels: in Brunei they have
  • 49. no prisons whatever. Ahtan was better treated, as he was known to have been a favourite servant, though his conduct was very bad, particularly in dosing me with opium, yet I could not forget his kindness to me during our wanderings in the interior, and asked for his liberty on that plea. The Sultan’s answer was,—“The plea is good, but the stubbornness of that boy in refusing to confess when all the others had acknowledged their crime, deserves death.” I heard a few months ago that he was keeping a small shop in Labuan. A man in whom I felt a very great interest, and was very sorry to part with, was Musa, my Manilla steersman and coxswain; as a boy he had been educated as a Christian, but having been captured very young and sold by the Balignini pirates to the Mahomedans, he had been circumcised, and joined their communion. He had a particular antipathy to Signor Cuarteron, who returned the dislike, and used gravely to assure me that my quiet, respectful follower had a design to massacre him. When the priests first came to Brunei, all my Manilla men attended mass, but were suddenly disgusted with something which took place; and on my inquiring the cause, one of them said, “We don’t like to be told that if we don’t again join the Padre’s religion, he will send for a Spanish man-of-war to take us all off prisoners to Manilla.” If he really did threaten them, he made a great mistake, as some of them never went near the church again. Musa, though modest and gentle in his manner, was as brave as a lion, and would have followed me anywhere. Though very short, he was squarely built, and exceedingly strong; a very powerful swimmer, and good boatman. Many of these men excite a personal regard, and I have always felt that for Inchi Mahomed, my Malay writer, who was entrusted with the charge of the Consulate during my lengthened absences, and he well deserved the trust.
  • 51. CHAPTER VIII. THE SULU ARCHIPELAGO. FIRST VISIT. Picturesque Islands—Balambañgan—An old English Settlement— Large Monkeys—Optical Illusions—Flights of Birds—The Curlew —The way we shot them in Sarawak—Game—Banguey—Mali Wali—Cleared Hills—Fine Water—Sweet-smelling Jasmine— Cagayan Sulu—Intercourse with the Inhabitants—Appearance of the Country—Lovely Scenery—Market—Inhabitants—Insolent Traders—The Crater Harbour—Wall of Evergreen—Inner Lake— Climb the Cliff—Scenery—Alligators numerous—Sulu— Appearance from the Ship—Sugh, the Capital—Mr. Wyndham— The Watering-place—Suspicious Natives—Fugitives from Balignini—Reports—A Market—The Mountaineers civil—Walk to the Palace—The Stockades—Armed Crowd—Audience Hall— Absurd Reports—The Sultan and his Nobles—Dress—Politeness of the Sultan—Return to the Ship—Datu Daniel—The Racecourse—Effect of Dutch Shot—Tulyan Bay—Alarm of Villagers—Sulu Government—Laws—Feuds—The Mahomedan and the Pork—Population—Fighting-men—Slave Market— Dignified carriage of the Nobles—Dress—The Balignini—Dutch Attack—Appearance of the Country—Good Position of Island— Tulyan—Basilan—Numerous Islets—Samboañgan—Spanish Convict Settlement—Description of Country—Fort—Town— Shops—The Church—The Men—The Women—The Corner Shop —A Ball—Dancing difficult—Waltzes—Supplies at Samboañgan —A lonely Grave. During all the voyages I have made, I have never beheld islands so picturesque as those scattered over the surface of the Sulu Seas, or whose inhabitants more merited notice. I will therefore give a short account of the visits I made thither, before the attacks of the Spanish forces had altered the ancient state of affairs. I have already delineated the north-west coast, and will therefore commence my description from the island of Balambañgan, to the north of Maludu
  • 52. Bay, which must always be of some interest to Englishmen from our two unsuccessful attempts to form a settlement there. We dropped anchor off Balambañgan, which at night appears a low wooded island. I visited it in the morning in a cutter, and vainly sought any fresh traces of human beings, though we found some old deserted huts of the fishermen who frequent this shore for tripang. Continuing our explorations, we noticed something moving along the beach, and there were various conjectures among our party, some affirming it to be a buffalo, others a man; I never was more deceived in my own estimate of the size of an animal, as it proved to be a large monkey, which with its companions was seeking shell-fish on the sands; it was certainly very large, but not of such dimensions as to warrant its being compared to a bull, but there appeared to be some optical illusion caused by its looming over the water. Pursuing our path along the beach, the seamen at last thought they saw houses among the trees, but on landing we found we were again deceived by a row of white rocks, prettily overhung with creepers. Though no traces of inhabitants were to be found, yet animal life was well represented, innumerable monkeys swarmed at the edge of the jungle, while flights of birds of every kind kept rising before us. I never saw more monstrous pelicans, but after having been so deceived by the monkeys, I must not attempt to estimate their height. The best birds, however, for culinary purposes, were the curlews, some of which are as large as small fowls: unfortunately we were not provided with shot, and ball fell harmlessly among them. They are wary birds, but may yet be readily circumvented. There is a spot at the entrance of one of the minor branches of the Sarawak river, where the curlews congregate in thousands, but only at the height of spring-tides can you get profitable shots at them. There are broad sands there, and the birds spread over them to feed; by degrees the rising waters gradually press them back towards the wooded shore; and as beach after beach is covered, they fly screaming above in wide circles, gradually narrowing till they all settle on the spot near which the sportsmen lie concealed, either behind scattered bushes, or in a prepared bower of leafy branches. The evening has well closed in before the tip-top of high-water; and
  • 53. the loud scream of the myriads of birds deadens the detonation of the guns as they send their iron shower among them, enabling us to load and reload without completely scaring the birds. We once obtained ninety-five of the largest kind, and hundreds of smaller ones, to feast the crowd who were assembled near preparatory to a great tuba-fishing. Balambañgan is admirably situated to command the China seas; however, if its position be superior to Labuan, the latter has coal to counterbalance that advantage. While strolling along the beach we came upon the tracks of cattle, deer, and pigs, and another party from the ship had the good fortune to secure a large supply of excellent fish with the seine. This island, as well as the neighbouring coast of the mainland, appears to swarm with game; I landed on the latter, and found an extensive open plain, diversified with a few low eminences, backed by some cleared hills, and there the tracks of wild cattle, deer, and pigs were innumerable. The rhinoceros is also reported to be occasionally seen, but we came across no traces of it. Continuing our voyage, we passed the island of Banguey, in the northern part of which there are fine peaked hills, with inhabitants, and plenty of good water, therefore far preferable to Balambañgan for a settlement; as if the harbours be not good, there is sufficient shelter against both monsoons. The next island is Mali Wali, and here we anchored to examine it. We tried at many places, but found the little creeks shallow and lined with mangrove swamps; but by landing on the south side, at the east end of the stone beach, there is but a few minutes’ walk in dry forest between the shore and the cleared land. The appearance of the island is remarkable; for miles the hills apparently are clothed with grass, with only a narrow belt of jungle skirting the shingly beach; the reality, however, disappointed us, as we found that this verdant- looking land was but a heap of soft sandstone, with long coarse grass growing up between the crevices. However, there is a good supply of clear water from tiny streams and springs, and the tracks of deer were observed in many places, while on all sides a species of wild jasmine grew in luxuriance, bearing a very sweet-scented flower.