Python Machine Learning Workbook For Beginners 10 Machine Learning Projects Explained From Scratch Publishing pdf download
Python Machine Learning Workbook For Beginners 10 Machine Learning Projects Explained From Scratch Publishing pdf download
https://ebookbell.com/product/python-machine-learning-workbook-
for-beginners-10-machine-learning-projects-explained-from-
scratch-publishing-48507388
https://ebookbell.com/product/python-machine-learning-projects-learn-
how-to-build-machine-learning-projects-from-scratch-deepali-r-
vora-49422988
https://ebookbell.com/product/python-machine-learning-projects-learn-
how-to-build-machine-learning-projects-from-scratch-dr-deepali-r-
vora-49763682
https://ebookbell.com/product/python-machine-learning-projects-1st-
edition-lisa-tagliaferri-53726322
https://ebookbell.com/product/python-machine-learning-1st-edition-
weimeng-lee-57017492
Python Machine Learning Second Edition 2nd Edition Sebastian Raschka
Vahid Mirjalili
https://ebookbell.com/product/python-machine-learning-second-
edition-2nd-edition-sebastian-raschka-vahid-mirjalili-20632882
https://ebookbell.com/product/python-machine-learning-by-example-3rd-
edition-yuxi-hayden-liu-22069088
https://ebookbell.com/product/python-machine-learning-raschka-
sebastian-22122802
Python Machine Learning Machine Learning And Deep Learning With Python
Scikitlearn And Tensorflow 2 3rd Edition 3rd Edition Raschka
https://ebookbell.com/product/python-machine-learning-machine-
learning-and-deep-learning-with-python-scikitlearn-and-
tensorflow-2-3rd-edition-3rd-edition-raschka-22122808
https://ebookbell.com/product/python-machine-learning-blueprints-
intuitive-data-projects-you-can-relate-to-1st-edition-combs-23300286
© Copyright 2020 by AI Publishing
All rights reserved.
First Printing, 2020
Edited by AI Publishing
eBook Converted and Cover by Gazler Studio
Published by AI Publishing LLC
ISBN-13: 978-1-7347901-7-7
The contents of this book may not be copied, reproduced, duplicated, or transmitted without the
direct written permission of the author. Under no circumstances whatsoever will any legal liability or
blame be held against the publisher for any compensation, damages, or monetary loss due to the
information contained herein, either directly or indirectly.
Legal Notice:
You are not permitted to amend, use, distribute, sell, quote, or paraphrase any part of the content
within this book without the specific consent of the author.
Disclaimer Notice:
Kindly note that the information contained within this document is solely for educational and
entertainment purposes. No warranties of any kind are indicated or expressed. Readers accept that the
author is not providing any legal, professional, financial, or medical advice. Kindly consult a licensed
professional before trying out any techniques explained in this book.
By reading this document, the reader consents that under no circumstances is the author liable for any
losses, direct or indirect, that are incurred as a consequence of the use of the information contained
within this document, including, but not restricted to, errors, omissions, or inaccuracies.
How to Contact Us
To get the Python codes and materials used in this book, please click the
link below:
https://www.aispublishing.net/book-pmlwb
Through our interactive, coherent, and practical books and courses, we help
beginners learn skills that are crucial to developing AI and data science
projects.
Our courses and books range from basic introduction courses to language
programming and data science to advanced courses for machine learning,
deep learning, computer vision, big data, and much more. The
programming languages used include Python, R, and some data science and
AI software.
Our experts have cautiously developed our contents and kept them concise,
short, and comprehensive so that you can understand everything clearly and
effectively and start practicing the applications right away.
We also offer consultancy and corporate training in AI and data science for
enterprises so that their staff can navigate through the workflow efficiently.
With AI Publishing, you can always stay closer to the innovative world of
AI and data science.
If you are eager to learn the A to Z of AI and data science but have no clue
where to start, AI Publishing is the finest place to go.
We are working with developers and AI tech professionals just like you to
help them share their insights with the global AI and Data Science lovers.
You can share all your knowledge about hot topics in AI and Data Science.
Table of Contents
Preface
Book Approach
Who Is This Book For?
How to Use This Book?
Exercise Solutions
Chapter: Exercise 2.1
Exercise 1.1
Exercise 2.1
Exercise 3.1
Exercise 4.1
Exercise 5.1
Exercise 6.1
Exercise 7.1
Exercise 8.1
Exercise 9.1
Exercise 10.1
Preface
Thank you for your decision to purchase this book. I can assure you that
you will not regret your decision. The term data is the new oil is no longer a
mere cliche. Data is actually powering the industries of today.
Organizations and companies need to improve their growth, which depends
upon correct decisionmaking. Accurate decision-making requires facts,
figures, and statistical analysis of data, leading to the identification of
important data patterns. Data science does exactly that. With data and
machine learning, you can extract and visualize data in detail and create
statistical models, which, in turn, help you in decision-making. In this book,
you will learn all these concepts. So, buckle up for a journey that may give
you your career break!
§ Book Approach
The book follows a very simple approach. It is divided into two sections.
The first section consists of two chapters. Chapter 1 presents a very concise
introduction to data science and machine learning and provides a roadmap
for step by step learning approach to data science and machine learning.
The process for environment setup, including the software needed to run
scripts in this book, is also explained in this chapter. Chapter 2 contains a
crash course on Python for beginners. If you are already familiar with
Python, you can skip chapter 2.
Project 1 shows how you can predict the sale price of a house using linear
regression. Successful completion of this project will help you apply the
knowledge you gain to solve any supervised regression problem.
In the 2nd project, you will be developing a ham and spam message
classifier using naive Bayes algorithm. The concepts explained in this
project can be transferred to any text classification task.
The third project introduces you to the world of artificial neural networks,
where you use a densely connected neural network to predict car sale
prices. The concepts you learn in this project are essential to solve any
regression problem via artificial neural networks.
In project 4, you will study how to predict stock market trends using LSTM,
which is a type of recurrent neural network. Successful completion of this
project will help you in tackling time series problems via the LSTM.
The 5th project explains the process of language translation using sequence
to sequence LSTM. With the sequence to sequence LSTM, you can solve
pretty much any problem where inputs and outputs both are sequences of
data.
In project 6, you will study how you can classify dog and cat images using
a convolutional neural network (CNN). The concepts learned in this project
are applicable to any image classification task.
The 7th project shows how you can create a movie recommender system
based on the correlation between movie features. The ideas explained in
this project are applicable to any other recommender system, as well.
In project 8, you will perform a very interesting task of detecting faces from
images. You will see how to recognize human faces, eyes, and smiles from
images and videos.
The 9th project explains how you can recognize handwritten English
alphabets with a convolutional neural network. This project is comparable
to project 6, but instead of binary classification, in this project, you will see
how to perform multiclass classification on the image data.
Finally, in the 10th and last project, you will create a customer segmentation
model based on the K-means clustering algorithm that segments customers
into groups based on their income and spending habits. The concepts you
learn in this project can be used to model any clustering system.
In each project, a brief explanation of the theoretical concepts is given,
followed by practical examples. The Python notebook for each project is
provided in the Source Codes folder in GitHub and SharePoint repositories.
It is advised that instead of copying the code, you write the code yourself,
and in case of an error, you match your code with the corresponding Python
notebook, find and then correct the error. The datasets used in this book are
easily accessible. You can either download them at runtime or they are
available in the Datasets folder in the GitHub and SharePoint repositories.
The concepts are explained at a high level without digging deeper into the
mathematical details. In addition, though a background in the Python
programming language and feature engineering can help speed up learning,
the book contains a crash course on Python programming language in the
first chapter. Therefore, the only prerequisites to efficiently using this book
are access to a computer with the internet and basic knowledge of linear
algebra and calculus. All the codes and datasets have been provided.
However, to download data preparation libraries, you will need the internet.
We request you to download the PDF file containing the color images of the
screenshots/diagrams used in this book here:
https://www.aispublishing.net/book-pmlwb
In this chapter, you will see how to set up the Python environment needed to run
various data science and machine learning libraries. The chapter also contains a
crash Python course for absolute beginners to Python. Finally, the different data
science and machine learning libraries that we are going to study in this book
have been discussed. The chapter ends with a simple exercise.
Before you delve deep into developing data science and machine learning
applications, you have to know what the field of data science and machine
learning is, what you can do with that, and what are some of the best tools and
libraries that you can use.
If you wish to be a data science and machine learning expert, you have to learn
programming. There is no working around this fact. Although there are several
cloud-based machine learning platforms like Amazon Sage Maker and Azure
ML Studio where you can create data science applications without writing a
single line of code, however, to get finegrained control over your applications,
you will need to learn programming.
Start with very basic data science applications. I would rather recommend that
you should not start developing data science applications right away. Start with
basic mathematical and numerical operations like computing dot products and
matrix multiplication, etc.
Once you are familiar with basic machine learning and deep learning
algorithms, you are good to go for developing data science applications. Data
science applications can be of different types, i.e., predicting house prices,
recognizing images, classifying text, etc. Being a beginner, you should try to
develop versatile data science applications, and later, when you find your area
of interest, e.g., natural language processing or image recognition, delve deep
into that. It is important to mention that this book provides a very generic
introduction to data science, and you will see applications of data science to
structured data, textual data, and image data. However, this book is not
dedicated to any specific data science field.
The time has come to install Python on Windows using an IDE. In fact, we will
use Anaconda throughout this book, right from installing Python to writing
multi-threaded codes in the coming lectures. Now, let us get going with the
installation.
This section explains how you can download and install Anaconda on
Windows.
2. The browser will take you to the following webpage. Select the latest version
Python (3.7 at the time of writing this book). Now, click the Download butto
download the executable file. Depending upon the speed of your internet, the
file will download within 2–3 minutes.
3. Run the executable file after the download is complete. You will most likely
find the download file in your download folder. The name of the file should
similar to “Anaconda3- 5.1.0-Windows-x86_64.” The installation wizard wi
open when you run the file, as shown in the following figure. Click the Next
button.
4. Now click I Agree on the License Agreement dialog as shown in the followin
screenshot.
5. Check the Just Me radio button from the Select Installation Type dialogue bo
Click the Next button to continue.
6. Now, the Choose Install Location dialog will be displayed. Change the direc
if you want, but the default is preferred. The installation folder should at leas
have 3 GB of free space for Anaconda. Click the Next button.
7. Go for the second option, Register Anaconda as my default Python 3.7 in the
Advanced Installation Options dialog box. Click the Install button to start th
installation, which can take some time to complete.
8. Click Next once the installation is complete.
9. Click Skip on the Microsoft Visual Studio Code Installation dialog box.
10. You have successfully installed Anaconda on your Windows. Excellent job.
next step is to uncheck both checkboxes on the dialog box. Now, click on the
Finish button.
1.3.2. Mac Setup
Anaconda’s installation process is almost the same for Mac. It may differ
graphically, but you will follow the same steps you followed for Windows. The
only difference is that you have to download the executable file, which is
compatible with the Mac operating system.
This section explains how you can download and install Anaconda on Mac.
2. The browser will take you to the following webpage. Select the latest version
Python for Mac. (3.7 at the time of writing this book). Now, click the Downl
button to download the executable file. Depending upon the speed of your
internet, the file will download within 2–3 minutes.
3. Run the executable file after the download is complete. You will most likely
find the download file in your download folder. The name of the file should
similar to “Anaconda3-5.1.0-Windows-x86_64.” The installation wizard wil
open when you run the file, as shown in the following figure. Click the
Continue button.
$ cd / tmp
$ curl –o https://repo.anaconda.com.archive/Anaconda3-5.2.0-Linux-x86_64.sh
3. You should also use the cryptographic hash verification through the SHA-25
checksum to verify the integrity of the installer.
$ sha256sum Anaconda3-5.2.0-Linux-x86_64.sh
09f53738b0cd3bb96f5b1bac488e5528df9906be2480fe61df40e0e0d19e3d48 Anaconda3-5.2.0-Linux-
x86_64.sh
4. The fourth step is to run the Anaconda Script, as shown in the following figu
$ bash Anaconda3-5.2.0-Linux-x86_64.sh
The command line will generate the following output. You will be asked to
review the license agreement. Keep on pressing Enter until you reach the
end.
Output
Welcome to Anaconda3 5.2.0
In order to continue the installation process, please review the license agreement.
Please, press Enter to continue
>>>
…
Do you approve the license terms? [yes|No]
Type, Yes, when you get to the bottom of the License Agreement.
5. The installer will ask you to choose the installation location after you agree t
the license agreement. Simply press Enter to choose the default location. You
can also specify a different location if you want.
Output
[/home/tola/anaconda3] >>>
The installation will proceed once you press Enter. Once again, you have
to be patient as the installation process takes some time to complete.
6. You will receive the following result when the installation is complete. If you
wish to use the conda command, type Yes.
Output
…
Installation finished.
Do you wish the installer to prepend Anaconda3 install location to path in your /home/tola/.bashrc?
[yes|no]
[no]>>>
At this point, you will also have the option to download the Visual Studio
Code. Type yes or no to install or decline, respectively.
7. Use the following command to activate your brand new installation of
Anaconda3.
$ source `/.bashrc
8. You can also test the installation using the conda command.
$ conda list
In addition to local Python environments such as Anaconda, you can run deep
learning applications on Google Colab, as well, which is Google’s platform for
deep learning with GPU support. All the codes in this book have been run using
Google Colab. Therefore I would suggest that you use Google Colab, too.
To run deep learning applications via Google Colab, all you need is a
Google/Gmail account. Once you have a Google/ Gmail account, you can
simply go to:
https://colab.research.google.com/
Next, click on File -> New notebook, as shown in the following screenshot.
Next, to run your code using GPU, from the top menu, select Runtime ->
Change runtime type, as shown in the following screenshot:
You should see the following window. Here from the dropdown list, select
GPU, and click the Save button.
To make sure you are running the latest version of TensorFlow, execute the
following script in the Google Colab notebook cell. The following script will
update your TensorFlow version.
To check if you are really running TensorFlow version > 2.0, execute the
following script.
1. import tensorflow as tf
2. print (tf.__version__)
With Google Cloud, you can import the datasets from your Google drive.
Execute the following script. And click on the link that appears, as shown
below:
You will be prompted to allow Google Colab to access your Google drive. Click
the Allow button, as shown below:
You will see a link appear, as shown in the following image (the link has been
blinded here).
Copy the link and paste it in the empty field in the Google Colab cell, as shown
below:
This way, you can import datasets from your Google drive to your Google
Colab environment.
In the next chapter, you will see how to write your first program in Python,
along with other Python programming concepts.
Random documents with unrelated
content Scribd suggests to you:
and there stands five beautiful vicuña, looking intently at us. What
pretty animals, and how wild they look. They come here to pasture
with their kinsfolk, the llamas. "Richards ride round the mountain;
José go with the baggage steadily along the road, while I take up
this ravine, and try a shot." We all start. The male gives a whistle,
which sounds among the hills like the cry of a wild turkey; the four
females are off. He stands still; as I near him, he calls louder, and
long before I get within ball range, he is away over the mountain
brow. The sailor-boy Richards will never give up the chase; he has
run his mule out of breath, and now he takes after them on foot.
The vicuña is smaller and a much more neatly-formed animal
than the llama, with a coat of fine curly wool; its color resembles
that of the smaller deer. In the distribution of animals, as well as I
can judge, the vicuña naturally seeks an atmosphere just below the
llama. It is very swift and difficult to capture. The Indians take them
by driving them into pens. Now and then a young one may be found
tamed, and kept as a pet among the children; they are never used
as beasts of burden. Fine cloths and valuable hats are manufactured
from the vicuña. A skin sells in the market for fifty cents, and the
meat is better than that of the llama, though José expresses rather a
disgust at the idea of eating llama meat.
Our course is to the eastward. The snow-capped mountains are
in sight to the west. Temperature of a spring 48°; air, 44°. Lightning
flashes all around us; as the wind whirls from northeast to
southwest, rain and snow-flakes become hail, half the size of peas.
Thunder roars and echoes through the mountains; the mules hang
their heads, and travel slowly; the thinly-clad aboriginal walks
shivering as he drives the train ahead; the dark, cumulus cloud
seems to wrap itself around us.
The first house we met was Molina post; the men passed the
night with their mules in a storm, which beat against our tent all
night. The postman, a Spanish Creole, invited us into his house; I
saw his wife, two children, one Indian servant, and five dogs, seated
around a fire made of dung, over which the woman was cooking
mutton. Their bed was of barley straw, and a miserable old donkey
was peeping in the door at it; so I had the tent pitched. At 7 in the
morning the thermometer was 37° Fahr. This is a barren country,
and seems to be inhabited by the wilder animals. We chased a fox
among the rocks, and shot two viscachas, which resemble the rabbit
in size, color, and head, but the feet and tail are like those of the
opossum. The people are very fond of them. The arriero smiled
when he saw his supper. Richards cut one of them open to bottle its
young, but we had misjudged its appearance. An Indian boy said if
the mules ate any of the hair of this animal it would cause instant
death. We had no extra mules to prove the assertion. The fur is very
fine and valuable; they are running in and out of holes in the ground
or the clefts of rocks, to nibble the mountain grass. The mountains
are more rolling, and covered with a thick coat of pasture; flocks of
sheep speckle the mountains—black and white—cleanly washed by
the rains. They seek the atmosphere next below the vicuña, while
the good-natured shepherdess follows with a womanly regard for
the wishes of those she loves.
Another storm is coming; we hurry on, and arrive at the next
post in the small Indian town of Pancara. The postman told José that
the Alcalde had come to pay us a visit. A respectable old Indian,
with a silver-headed cane, who could not speak Spanish, appeared,
so José was my interpreter in Quichua. "How many people live in
this town, Señor Alcalde?" Alcalde, (eating parched corn from his
waistcoat pocket,) "Don't know." "Have you plenty to live upon in
this part of the country?" Alcalde, (with the most laughably
contented air,) "Roast corn and few potatoes. The people are going
away; will soon be left by myself." Alcalde—"Going to Cuzco?" José
—"Yes; and as we have a long travel, we have to feed our mules
well. Will you order us barley?" Alcalde—"I will go now and fetch it."
The town is falling to decay; many houses deserted, and their
roofs have tumbled in. Climate cold and unpleasant. Except our kind
friend, the Alcalde, the people look wretched.
The vegetable productions of this department are few, and can
only be raised in the deep valleys, where the dense atmosphere
interrupts the parching rays of the sun, and they are protected from
the cold mountain blasts of the night. No department in Peru is more
broken and barren than this, with a greater variety of climate. In our
sight are peaks of eternal snow, which run up to sharp points of
pure white, standing in rows; the humble Indian, cultivating his
patch of green lucerne in the valley, far below.
The animals are mostly those native to the country, and few of
them tame. The horse, ass, and horned cattle, are much smaller
than those on the coast, and are little used. Birds are very few, and
seldom found domesticated; even the common poultry find the
climate uncongenial.
Fishes are rare and small; only taken, I believe, in the Juaja
river. Of minerals and metals already known, there are silver,
quicksilver, copper, lead, iron, stone coal, and lime.
The silver mines of Castro-Virreyna have been worked for many
years. They are situated south of the town of Huancavelica, in the
Cordillera range. They count thirty mines, of which, at the present
day, but seven are worked. Stone coal is found near by sufficiently
good for engine purposes. One steam-engine made a voyage round
Cape Horn, and arrived safely at these mines, where it is said to be
doing a good business. In all cases, the pieces must not exceed one
hundred and fifty pounds weight, or they come to a stand-still at the
landing on the coast. Two pieces are balanced on the back of a
mule, which carries the heavy loads, never exceeding three hundred
pounds. This is the only way a steam-engine can possibly travel
through the department of Huancavelica. The unoccupied mines are
said to contain water, and air so offensive, that it is dangerous for
the workmen to enter them.
This department has a population, by the government estimate,
of 76,111 people. Two of the aboriginal race to one Creole will not
be far from the average proportion. As the old Alcalde honestly
confesses, he don't know how many people live in his small town, it
will be understood how difficult it is to get anything like a correct list.
The people are scattered over a great space of country. We travel a
day over the wild heights without meeting with a man, or find a
valley too thickly peopled for the productions raised therein.
The department is divided into four provinces, each governed by
a sub-prefect. These are again divided into districts, under
governors, all of whom are responsible to the prefect at the capital—
Huancavelica—who is allowed a secretary, three assistants, and a
porter. The civil list amounts annually to six thousand four hundred
and ninety-five dollars. The prefect is appointed by the government
at Lima, and holds his office during the pleasure of the President of
the republic. The sub-prefects and governors are also appointed by
the supreme government, though generally through the
recommendation of the prefect of the department.
Early in the morning we left Pancara; our good old friend, the
Alcalde, still eating roasted maize, while he cheerfully expressed a
desire to see us when we returned again. The Indians show great
surprise when they are told that we will not return that way, and
seem to be buried in deep thought, as though it troubled them to
make out the white man's motions.
Near this small town the road leads through a number of
standing rocks, which have been washed by the rains into sugar-loaf
forms; and so uniform are they, that it seemed like passing through
tents in an encampment. The rock is a soft sandstone, which wears
away very fast at the sides, and not on the top, where seems to be
the end of the grain. Their heights are from 12 to 18 feet, and so
well shaped, that one might be erroneously led to believe they were
the work of a pyramidal-minded race of men; but, upon closer
examination, we found the work going on in the side of a bank,
which was being regularly divided off into sugar-loaves. Had we
entered this apparent encampment at midnight, I should have called
out, for those rocks which stand off on the plateau a little distance
look like sentry boxes around the main body of an army.
The constant wearing away of these elevated portions of the
earth is beautifully demonstrated here, where the uplands seem to
be dissolving and settling down towards a level—examples of the
natural working of weather upon stones, so nearly resembling that
of human hands with hammer and chisel. We found these pyramids
for some distance along the road. Some of them were inhabited by
families of Indians, large square holes or rooms being cut in the
north side. Some rooms required steps to ascend; others were even
with the ground. I found the family at home in one of them. Near
the doorway was a horse-trough cut in the stone, and above it a
place like the handle of a pot, where the end of the halter was tied.
Cooking utensils, dogs, and children were seen in the lower story,
while the Indian woman was spinning wool in the upper, or bed-
room. A few regularly-built stone houses near by are not so
interesting.
On this part of our journey, Indian girls, with chicha and chupe
for sale, are seated at the tops of the steep ascents. Chicha is the
favorite drink of the Indians. A party—generally old women—seat
themselves around a wooden trough containing maize. Each one
takes a mouthful, and mashes the grain between her teeth—if she
has any—and casts it back into the trough in the most sickening
manner. As the mill-stones are often pretty well worn, the operation
requires time and perseverance. The mass, with water added, is
then boiled in large coppers, after which it is left to ferment in huge
earthen jars, when it is sold by the brewers without a license. It is
an intoxicating drink, but very healthful, the Indians say. Chupe is
the Peruvian national dish, and may be made of any and everything,
so long as it holds its relationship to soup. It is made generally of
mutton, potatoes, eggs, rice, all highly seasoned with pepper, &c.
As the weary traveller arrives almost breathless at the top of the
hill, the girl tempts him. I halted by one of them, and addressed her
in Spanish, but she answered in Quichua, and pointed to her chupe,
which I believe she had kept warm by sitting over it during the
morning. I thanked her kindly, and pushed on. Here and there an
Indian hut is to be seen at a distance. In the valley to our right are
flocks of sheep; and the merry laugh of the shepherdesses echoes
through the mountains. Two girls walking after their flocks, have
their arms around each other's necks, joking and laughing as they
leave home for a day among the hills. The sheep have just been let
out of their pen, and run, one before the other, nipping the frost-
tipped pasture. The dogs follow sulkily, with heads and tails hanging,
as though they would rather stay at home if there was any company.
Here, as we rise to the top of a mountain, we behold all around
one broken mass, ridge beyond ridge, as far as the eye can reach,
like waves of the tempest-tossed ocean. Our mules are harassed,
and the chronometer positively refuses to go any further. As we
descend the Indians are harvesting barley. Horned cattle seem to
fancy the atmospheric pressure just below the sheep.
The arrieros keep the higher road which brings us to the left of a
valley. From the ridge we see the small town of Acobamba, and a
turn in the Juaja river, dashing over its rocky bed, as the wild duck
flies quickly against the current. The country has a fresher
appearance. In the ravines, clusters of green bushes and flowers
bloom; 5 p. m., air, 43°; wet bulb, 39°, at Parcas post.
I succeeded in securing a duck supper from a small lake, with a
thick growth of rushes in the centre. The common mallard duck, and
a black species, are found with red and green bills, and red legs.
When these take fright, they hide themselves in the rushes and
seldom fly. There are a number of beds of lakes which are filled in
the rainy season; at present they are dry; on this route it is usual for
travellers to carry bottles of water with them. A man in poncho and
mountain travelling dress rode up behind us, with an Indian girl
seated behind his saddle. He refreshed us with the compliments of
the morning in plain English. He came out of the valley from
Acobamba, though born in New Haven, Connecticut. His spirited
horse was fretting itself over the rugged road. This man was
proprietor of a circus company; had been many years in South
America, and as we slowly wound our way up the mountain, told us
his past history; what he had seen, and how often he thought of
returning to New England. "But nobody knows me now. Years ago I
heard of the changes there, and don't believe I should know my
native place. I have adopted the manners and customs of these
people, and if I should return to the United States again, I fear my
earnings would not be sufficient. I have worked in this country for
years, and am worth nothing at last." His stories of travels were
interesting. He had encountered travellers of all nations, and amused
me with the way in which some of them worked their way through
the rough country, among the people of Mexico and South America.
Speaking of the mountain roads between Popoyan and Bogota, in
New Granada, over which travellers are borne in light bamboo chairs
upon the backs of Indians, I discovered that he had encountered
two of my own near relations on that route, nearly twenty years
before.
He had sent a branch of his circus to Cerro de Pasco, and
ordered the horses, on a raft at Huallaga river, to descend that
stream, and the main trunk of the Amazon, to Pará. He had
navigated the Mississippi in a canoe, and assured me at first he
would try to sell his horses and go with me down the Purus. Every
now and then his English ran off into Spanish. Then he would beg
my pardon for not speaking his mother tongue as well as when a
boy.
The Indians of the surrounding country were gathered at Marcas
post, to celebrate the saint's day of San Jago, an old church in the
valley. The obliging master of the post had just returned from
church, a little intoxicated, like most other folks about him. The
Indians were dressed in queer costumes, marching in procession,
with drums and fifes, through crowds of women; some wore cows-
horns and black masks, others cocked hats and gold laced coats;
while the women were dressed in all colors. Young Creoles dashed
about on horse-back; girls were singing and hanging most
affectionately on the shoulders of their lovers. The whole crowd was
high on a chicha diet. The morning had been spent in prayers, after
which a grand procession, headed by the priest. We came in at the
evening ceremony. The scenery was as beautiful as strange; the
church below us, and the people lining the road from it to the post
house, while drums mingled with the shouts and singing of the
women. Down the sides of the mountain, Sage's circus company
slowly advance. A queer-looking Mexican is the clown. A little dark
complexioned Guayaquil girl, a neat rider, accompanies a fine looking
Peruvian, whose fat wife, with sun-burnt face, follows. Then a pony
and his playmate, the dog, with a beautiful Peruvian girl, servants,
and a long train of baggage mules, all mixed in with the
congregation. As the sun sets over the western mountains, a storm
rises in the southwest, with thunder and lightning.
A long steep descent brought us into the valley of Huanta, where
we entered the department of Ayacucho. The horse stands at ease;
the swine repose coolly under the shade of a fig-tree; humming
birds buzz among the flowers, and the fresh-water streams ripple
through the highly cultivated lucerne fields. The gay, laughing faces
of the people speak for the happiness of the valley, as do the
beautiful flowers for its richness. Potatoes, beans, apples,
chirimoyas, and granadillas are for sale by the road-side. Indian girls
often invite us to take chicha. The climate is pleasant. At 9 a. m.,
thermometer 60°. The fig-tree is very large, and bending with fruit,
while peach blossoms overhang the road; large clusters of green
cactus shade the quiet little ring-dove; the partridge calls from
beneath the barley beards; the people are seated by the shady
brook in midsummer costume. Yesterday we were shivering under a
midwinter snow-storm, high up on the mountains.
At the town of Huanta, my letters were handed to the governor,
who kindly gave me possession of the house of the sub-prefect, who
had gone, with his family, visiting about the country. Huanta has a
population of two thousand people. From the balcony we have a full
view of the plaza and the market people, with the hills in the back
ground, among which there are some rich silver mines. Many have
been abandoned on account of water. People are anxious to receive
silver bars, but not over anxious about paying the necessary
expenses for getting them. The Indian finds great hardship and little
profit, while he goes with hammer and chisel mining out the rich
metal. The Creole seats himself at the mouth of the mine, wrapped
in his broadcloth cloak, and receives the treasure. The poor Indian
prefers cultivating the soil, from which it is difficult to persuade him;
force, at times, is indirectly applied through the influence and power
of the authorities. The more intelligent race take advantage of his
ignorance. Some, who are very intemperate, of course are generally
very poor; such are enticed to the mines by a regular supply of
chicha; others, again, are taught to believe that to labor in this world
for the benefit of others is to lay up treasures for them in a better
place; they have a dreadful fear of temporal powers, and dare not
disobey. There are different sorts of slavery existing among different
kinds of free people. If obliged to choose, many would rather be
negro slaves in North America, than free Indians in the South.
The governor had our mules cared for, and invited me to his
table under the shade of the eastern balcony. He was a cheerful,
agreeable man; if he knew how, no doubt would better the condition
of those around him. His fine, healthy boys are growing up in
idleness, and a pretty little daughter stands most of the day in the
balcony watching the Indians in the plaza, under their umbrella
shades, selling fruit. She pointed out an old Spanish Creole, said to
be one hundred and five years old.
There are beggars and marks of the smallpox. In the ravines,
along the sides of the valley, ague and fever sometimes prevail, but,
generally, the valley is very healthy. The nights are cold and days
warm. During our few days' stay here, the twilight was followed by
flashes of lightning, which lit up the whole valley. The nights are
cloudy, which baffles our watch for the stars. The day's travel before
our arrival here was harassing.
The roof of the government house in Huanta is well tiled, and
the walls well plastered, with paintings of full figures of saints, fairly
executed, on them; the rooms are large, furnished, and carpeted.
This is the exception to the rule.
The Huancavelica mules and arrieros returned, and we engaged
others. The postman examined the baggage; pairs off the loads; and
receives half the passage-money in advance the day before starting.
He inquires, with an enterprising air, what time we would like to
leave in the morning? I have found it best to tell them to come
before the time appointed. The frequent excuses are various—a
mule will be missing, or, the arriero may want a wife—he is never at
a loss for a reason to keep you waiting until he is ready. The best
way, after fretting a little at first, is to take things a little easier than
they do. It is amusing to see how they dislike to be outdone, and
hurry to break down opposition. Whenever these people meet with
difficulties, the rule is to take a seat, and from the pocket take a
small piece of paper or corn husk; a tin box supplies tobacco, to be
rolled up in the shape of a cigar, and placed behind the ear; a match
box and strike-a-light are produced, and the difficulty is considered
in so cool a manner, while the smoke curls upwards, that unless you
saw a mule, baggage and all, had broken through a miserable
bridge, or fallen down a precipice, you would not believe anything
had happened. The tobacco imported from Havana into Peru is
highly prized, and a quantity consumed. Massachusetts cotton goods
are sold by the Indians, in the plazas of these inland towns, at three
times their value in the United States.
By Lieut. L. Gibbon U. S. N. Lith. of P.S. Duval & Co. Phil.
ebookbell.com