Immediate download Advanced Data Analytics Using Python: With Architectural Patterns, Text and Image Classification, and Optimization Techniques [2nd Edition] Sayan Mukhopadhyay ebooks 2024
Immediate download Advanced Data Analytics Using Python: With Architectural Patterns, Text and Image Classification, and Optimization Techniques [2nd Edition] Sayan Mukhopadhyay ebooks 2024
com
OR CLICK HERE
DOWLOAD NOW
https://ebookmeta.com/product/advanced-analytics-with-transact-sql-
exploring-hidden-patterns-and-rules-in-your-data-1st-edition-dejan-
sarka/
ebookmeta.com
https://ebookmeta.com/product/advanced-analytics-with-transact-sql-
exploring-hidden-patterns-and-rules-in-your-data-1st-edition-dejan-
sarka-2/
ebookmeta.com
https://ebookmeta.com/product/time-travel-for-love-and-profit-a-time-
travel-harem-adventure-1st-edition-simon-archer/
ebookmeta.com
Goldie Lox And Her Trio Of Bears Goldie Lox 1 1st Edition
Amy Star
https://ebookmeta.com/product/goldie-lox-and-her-trio-of-bears-goldie-
lox-1-1st-edition-amy-star/
ebookmeta.com
https://ebookmeta.com/product/foundations-of-python-network-
programming-3rd-edition-brandon-rhodes-john-goerzen-2/
ebookmeta.com
https://ebookmeta.com/product/master-web-design-with-html-css-
javascript-and-jquery-create-stunning-interactive-websites-frahaan-
hussain/
ebookmeta.com
https://ebookmeta.com/product/good-families-of-barcelona-a-social-
history-of-power-in-the-industrial-era-gary-wray-mcdonogh/
ebookmeta.com
https://ebookmeta.com/product/looking-within-finding-an-environmental-
justice-and-global-citizenship-lens-1st-edition-karen-druffel/
ebookmeta.com
How Small Social Systems Work From Soccer Teams to Jazz
Trios and Families Yair Neuman
https://ebookmeta.com/product/how-small-social-systems-work-from-
soccer-teams-to-jazz-trios-and-families-yair-neuman/
ebookmeta.com
Advanced Data
Analytics Using
Python
With Architectural Patterns,
Text and Image Classification,
and Optimization Techniques
Second Edition
Sayan Mukhopadhyay
Pratip Samanta
Advanced Data Analytics Using Python: With Architectural Patterns, Text
and Image Classification, and Optimization Techniques
v
Table of Contents
Normal Forms�����������������������������������������������������������������������������������������������������31
First Normal Form�����������������������������������������������������������������������������������������31
Second Normal Form�������������������������������������������������������������������������������������32
Third Normal Form����������������������������������������������������������������������������������������33
Elasticsearch�������������������������������������������������������������������������������������������������������35
Connection Layer API�������������������������������������������������������������������������������������38
Neo4j Python Driver��������������������������������������������������������������������������������������������39
neo4j-rest-client�������������������������������������������������������������������������������������������������39
In-Memory Database������������������������������������������������������������������������������������������40
MongoDB (Python Edition)����������������������������������������������������������������������������������40
Import Data into the Collection����������������������������������������������������������������������41
Create a Connection Using pymongo�������������������������������������������������������������42
Access Database Objects������������������������������������������������������������������������������42
Insert Data�����������������������������������������������������������������������������������������������������43
Update Data���������������������������������������������������������������������������������������������������43
Remove Data�������������������������������������������������������������������������������������������������43
Cloud Databases�������������������������������������������������������������������������������������������������43
Pandas����������������������������������������������������������������������������������������������������������������44
ETL with Python (Unstructured Data)������������������������������������������������������������������45
Email Parsing�������������������������������������������������������������������������������������������������45
Topical Crawling��������������������������������������������������������������������������������������������48
Summary������������������������������������������������������������������������������������������������������������52
vi
Table of Contents
Semi-Supervised Learning���������������������������������������������������������������������������������65
Decision Tree�������������������������������������������������������������������������������������������������������66
Which Attribute Comes First?������������������������������������������������������������������������66
Random Forest Classifier������������������������������������������������������������������������������68
Naïve Bayes Classifier�����������������������������������������������������������������������������������������68
Support Vector Machine��������������������������������������������������������������������������������������69
Nearest Neighbor Classifier��������������������������������������������������������������������������������71
Sentiment Analysis���������������������������������������������������������������������������������������������71
Image Recognition����������������������������������������������������������������������������������������������73
Regression with Python���������������������������������������������������������������������������������74
Least Square Estimation��������������������������������������������������������������������������������75
Logistic Regression���������������������������������������������������������������������������������������76
Classification and Regression�����������������������������������������������������������������������������76
Intentionally Bias the Model to Over-Fit or Under-Fit������������������������������������������77
Dealing with Categorical Data�����������������������������������������������������������������������������78
Summary������������������������������������������������������������������������������������������������������������79
vii
Table of Contents
viii
Table of Contents
ix
Table of Contents
Index�������������������������������������������������������������������������������������������������243
x
About the Authors
Sayan Mukhopadhyay has more than 13 years
of industry experience and has been associated
with companies such as Credit Suisse, PayPal,
CA Technologies, CSC, and Mphasis. He has
a deep understanding of applications for
data analysis in domains such as investment
banking, online payments, online advertising,
IT infrastructure, and retail. His area of
expertise is in applying high-performance
computing in distributed and data-driven
environments such as real-time analysis, high-
frequency trading, and so on.
He earned his engineering degree in electronics and instrumentation
from Jadavpur University and his master’s degree in research in
computational and data science from IISc in Bangalore.
xi
About the Technical Reviewer
Joos Korstanje is a data scientist with more
than five years of industry experience in
developing machine learning tools, of which a
large part is forecasting models. He currently
works at Disneyland Paris where he develops
machine learning for a variety of tools.
xiii
Acknowledgments
Thanks to Labonic Chakraborty (Ripa) and Soumili Chakraborty.
xv
Introduction
We are living in the data science/artificial intelligence era. To thrive in
this environment, where data drives decision-making in everything from
business to government to sports and entertainment, you need the skills
to manage and analyze huge amounts of data. Together we can use this
data to make the world better for everyone. In fact, humans have yet to find
everything we can do using this data. So, let us explore!
Our objective for this book is to empower you to become a leader
in this data-transformed era. With this book you will learn the skills to
develop AI applications and make a difference in the world.
This book is intended for advanced user, because we have incorporated
some advanced analytics topics. Important machine learning models and
deep learning models are explained with coding exercises and real-world
examples.
All the source code used in this book is available for download at
https://github.com/apress/advanced-data-analytics-python-2e.
Happy reading!
xvii
CHAPTER 1
OOP in Python
In this section, we explain some features of object-oriented programming
(OOP) in a Python context.
The most basic element of any modern application is an object. To
a programmer or architect, the world is a collection of objects. Objects
consist of two types of members: attributes and methods. Members can be
private, public, or protected. Classes are data types of objects. Every object
is an instance of a class. A class can be inherited in child classes. Two
classes can be associated using composition.
Python has no keywords for public, private, or protected, so
encapsulation (hiding a member from the outside world) is not implicit in
Python. Like C++, it supports multilevel and multiple inheritance. Like Java,
it has an abstract keyword. Classes and methods both can be abstract.
© Sayan Mukhopadhyay, Pratip Samanta 2023 1
S. Mukhopadhyay and P. Samanta, Advanced Data Analytics Using Python,
https://doi.org/10.1007/978-1-4842-8005-8_1
Chapter 1 A Birds Eye View to AI System
glob is I
prok is V
pish is X
tegj is L
glob glob Silver is 34 Credits
glob prok Gold is 57800 Credits
pish pish Iron is 3910 Credits
how much is pish tegj glob glob ?
how many Credits is glob prok Silver ?
how many Credits is glob prok Gold ?
how many Credits is glob prok Iron ?
how much wood could a woodchuck chuck if a woodchuck could
chuck wood?
Program has a knowledge base in config.txt.
I,1,roman
V,5,roman
X,10,roman
L,50,roman
C,100,roman
D,500,roman
M,1000,roman
Based on this input and the configuration program, the answer to the
question is given in input.txt in standard output, as shown here:
2
Chapter 1 A Birds Eye View to AI System
import operator
def __init__(self,cmpiler):
self.compiler = cmpiler
3
Chapter 1 A Birds Eye View to AI System
if current == 5:
raise Exception("Wrong Substraction")
def evaluate(self):
#check mximum repeatation is crossing the limit
if self.count > 3:
raise Exception("Repeat more than 3")
#symbol is proper or not
if self.symbol not in self.compiler.symbol_map:
raise Exception("Wrong Symbol")
#check if wrong symbol is repeated ie (V, ..
self.symbol,unit = self.compiler.
evaluateSymbol(self.symbol)
while self.symbol % 10 != 0:
self.symbol = self.symbol / 10
if self.count > 1 and self.symbol == 5:
raise Exception("Wrong Symbol repeated")
import sys
class compilerTrader(object):
#store mapping of symbols with score and unit
symbol_map = {}
#store the list of valid symbol
valid_values = []
4
Chapter 1 A Birds Eye View to AI System
5
Chapter 1 A Birds Eye View to AI System
else:
#logic for value with unit
if ' ' in value:
fields = value.split(' ')
user_unit = fields[-1]
if ' ' not in var:
self.symbol_map[var] =
int(fields[0]), user_unit
else:
#logic for multiple symbols
in input
total = int(fields[0])
factor = 0
arr = var.split(' ')
obs.initialize(arr)
for i in range(len(arr)):
obs.increment(arr[i])
if arr[i] in self.symbol_map
and arr[i+1] in self.symbol_map
and i < len(arr) -1:
current, current_
unit = self.
evaluateSymbol(
[arr[i]][0])
next, next_unit = self.
evaluateSymbol(
[arr[i+1]][0])
if current >= next:
factor = factor
+ current
6
Chapter 1 A Birds Eye View to AI System
else:
obs.verifySubstract(
current)
factor = factor -
current
else:
if arr[i] in self.
symbol_map:
current, current_
unit = self.
evaluateSymbol(
[arr[i]][0])
factor = factor +
current
else:
self.
symbol_map[
arr[i]] =
total/factor,
user_unit
self.valid_
values.append
(total/factor)
obs.calculate()
obs.evaluate()
The answering logic is in the answer layer, which calls Observer and
compiler. The answering class inherits the compiler class.
import sys
7
Chapter 1 A Birds Eye View to AI System
class answeringTrader(compilerTrader):
8
Chapter 1 A Birds Eye View to AI System
obs.calculate()
obs.evaluate()
values = values.replace("?" , "is ")
if unit == 'roman':
unit = ''
return(values + str(ans) + ' ' + unit)
Finally, the main program calls the answering class and the observer,
and then it performs the task and does unit testing on the logic.
9
Chapter 1 A Birds Eye View to AI System
import sys
import unittest
sys.path.append('./answerLayer')
sys.path.append('./compilerLayer')
sys.path.append('./utilityLayer')
def setUp(self):
pass
10
Chapter 1 A Birds Eye View to AI System
11
Chapter 1 A Birds Eye View to AI System
if __name__ == '__main__':
if len(sys.argv) != 3:
print("Usage is : " + sys.argv[0] + " <intput file
path> <config file path>")
exit(0)
tr = ClientTrader(sys.argv[2])
f = open(sys.argv[1])
for line in f:
response = tr.process(line.strip())
if response is not None:
print(response)
TestTrader.trader = tr
unittest.main(argv = [sys.argv[0]], exit = False)
12
Chapter 1 A Birds Eye View to AI System
import rpy2.robjects as ro
ro.r('data(input)')
ro.r('x <-HoltWinters(input data frame)')
import subprocess
subprocess.call(['java','-cp','*','edu.stanford.nlp.sentiment.
SentimentPipeline','-file','foo.txt'])
Please place foo.txt in the same folder where you run the
Python code.
nlp = StanfordCoreNLP('http://127.0.0.1:9000')
output = nlp.annotate(sentence, properties={
"annotators": "tokenize,ssplit,parse,sentiment",
"outputFormat": "json",
# Only split the sentence at End Of Line. We assume that this
method only takes in one single sentence.
"ssplit.eolonly": "true",
# Setting enforceRequirements to skip some annotators and make
the process faster
"enforceRequirements": "false"
})
14
Chapter 1 A Birds Eye View to AI System
15
Chapter 1 A Birds Eye View to AI System
def get_hour(timestamp):
return dt.datetime.utcfromtimestamp(timestamp /
1e3).hour
def get_value(session, scores, feature_name, feature_value):
s = scores.select((scores.c.feature_name == feature_
name) & (scores.c.feature_value == feature_value))
rs = s.execute()
row = rs.fetchone()
if row is not None:
return float(row['score'])
else:
return 0.0
@app.route('/predict', methods=['POST'])
def predict():
input_json = request.get_json(force=True)
features = ['size','domain','client_time','device','ad_
position','client_size', 'ip','root']
predicted = 0
feature_value = ''
for f in features:
if f not in g.dropped_features:
if f == 'ip':
feature_value = str(ipaddress.
IPv4Address(ipaddress.ip_
address(unicode(request.remote_
addr))))
else:
feature_value = input_json.get(f)
if f == 'ip':
if 'geo' not in g.dropped_features:
16
Discovering Diverse Content Through
Random Scribd Documents
and his hands trembling, for many weird tales had been told of this
same Señor Zorro and his brutality, none of which was true.
"I am sure that you will pardon me," Señor Zorro said, "when I ask
you to sit at the far end of the room. As I take each bite, I must
raise the bottom of my mask, for I have no wish to become known. I
put the pistol before me on the table, so, to discourage treachery.
And now, Don Carlos Pulido, I shall do justice to the meal you have
furnished."
Don Carlos and his daughter sat where they had been directed, and
the bandit ate with evident relish. Now and then he stopped to talk
to them, and once he had Don Carlos send out for more wine,
declaring it to be the best he had tasted for a year.
Don Carlos was only too glad to oblige him. He was playing to gain
time. He knew the horse the native rode, and judged that he had
reached the presidio at Reina de Los Angeles before this, and that
the soldiers were on their way. If he could hold this Señor Zorro until
they arrived!
"I am having some food prepared for you to carry with you, señor,"
he said. "You will pardon me while I get it? My daughter will
entertain you."
Señor Zorro bowed, and Don Carlos hurried from the room. But Don
Carlos had made a mistake in his eagerness. It was an unusual thing
for a girl to be left alone in the company of a man in such fashion,
especially with a man known to be an outlaw. Señor Zorro guessed
at once that he was being delayed purposely. For, again, it was an
unusual thing for a man like Don Carlos to go for the package of
food himself when there were servants that could be called by a
mere clapping of the hands. Don Carlos, in fact, had gone into the
other room to listen at a window for sounds of galloping horses.
"Señor!" Lolita whispered across the room.
"What is it, señorita?"
"You must go—at once. I am afraid that my father has sent for the
soldiers."
"And you are kind enough to warn me?"
"Do I wish to see you taken here? Do I wish to see fighting and
bloodshed?" she asked.
"That is the only reason, señorita?"
"Will you not go, señor?"
"I am loath to rush away from such a charming presence, señorita.
May I come again at the next siesta hour?"
"By the saints—no! This must end, Señor Zorro! Go your way—and
take care! You have done some things that I admire, hence I would
not see you captured. Go north, as far as San Francisco de Asis, and
turn honest, señor. It is the better way."
"Little priest!" he said.
"Shall you go, señor?"
"But your father has gone to fetch food for me. And could I depart
without thanking him for this meal?"
Don Carlos came back into the room then, and Señor Zorro knew by
the expression on his face that the soldiers were coming up the trail.
The don put a package on the table.
"Some food to carry with you, señor," he said. "And we would relish
more of your reminiscences before you start on your perilous
journey."
"I have spoken too much of myself already, señor, and it ill becomes
a caballero to do that. It were better that I thank you and leave you
now."
"At least, señor, drink another mug of wine."
"I fear," said Señor Zorro, "that the soldiers are much too close, Don
Carlos."
The face of the don went white at that, for the highwayman was
picking up his pistol, and Don Carlos feared he was about to pay the
price for his treacherous hospitality. But Señor Zorro made no move
to fire.
"I forgive you this breach of hospitality, Don Carlos, because I am an
outlaw and there has been a price put upon my head," he said.
"And, also, I hold you no ill will because of it. Buenas noches,
señorita! Señor, á Dios!"
Then a terrified servant who knew little concerning the events of the
evening rushed in at the door.
"Master! The soldiers are here!" he cried. "They are surrounding the
house!"
CHAPTER IX
THE CLASH OF BLADES
Here was a fix! Don Carlos had no wish to anger Don Diego Vega or
a man who stood high in the governor's regard. And how was he to
evade it? If Lolita could not force her heart to accept Don Diego,
perhaps she could learn to love Captain Ramón. After Don Diego, he
was the best potential son-in-law in the vicinity.
"Your answer, señor?" the captain was asking.
"I trust you will not misunderstand me, señor," Don Carlos said, in
lower tones. "I must make a simple explanation."
"Proceed, señor."
"But this morning Don Diego Vega asked me the same question."
"Ha!"
"You know his blood and his family, señor. Could I refuse him? Of
rights I could not. But I may tell you this—the señorita weds no man
unless it is her wish. So Don Diego has my permission to pay his
addresses, but if he fails to touch her heart—"
"Then I may try?" the captain asked.
"You have my permission, señor. Of course, Don Diego has great
wealth, but you have a dashing way with you, and Don Diego—that
is—he is rather—"
"I understand perfectly, señor," the captain said, laughing. "He is not
exactly a brave and dashing caballero. Unless your daughter prefers
wealth to a genuine man—"
"My daughter will follow the dictates of her heart, señor!" Don Carlos
said proudly.
"Then the affair is between Don Diego Vega and myself?"
"So long as you use discretion, señor. I would have nothing happen
that would cause enmity between the Vega family and mine."
"Your interests shall be protected, Don Carlos," Captain Ramón
declared.
As Don Diego talked, the Señorita Lolita observed her father and
Captain Ramón, and guessed what was being said. It pleased her, of
course, that a dashing officer should enter the lists for her hand, and
yet she had felt no thrill when first she looked into his eyes.
Señor Zorro, now, had thrilled her to the tips of her tiny toes, and
merely because he had talked to her, and touched the palm of her
hand with his lips. If Don Diego Vega were only more like the
highwayman! If some man appeared who combined Vega's wealth
with the rogue's spirit and dash and courage!
There was a sudden tumult outside, and into the room strode the
soldiers, Sergeant Gonzales at their head. They saluted their captain,
and the big sergeant looked with wonder at his wounded shoulder.
"The rogue escaped us," Gonzales reported. "We followed him for a
distance of three miles or so, as he made his way into the hills,
where we came upon him."
"Well?" Ramón questioned.
"He has allies."
"What is this?"
"Fully ten men were waiting for him there, my captain. They set
upon us before we were aware of their presence. We fought them
well, and three of them we wounded, but they made their escape
and took their comrades with them. We had not been expecting a
band, of course, and so rode into their ambush."
"Then we have to contend with a band of them!" Captain Ramón
said. "Sergeant, you will select a score of men in the morning, and
have command over them. You will take the trail of this Señor Zorro,
and you will not stop until he is either captured or slain. I will add a
quarter's wages to the reward of his excellency, the governor, if you
are successful."
"Ha! It is what I have wished!" Sergeant Gonzales cried. "Now we
shall run this coyote to earth in short order! I shall show you the
color of his blood—"
"'Twould be no more than right, since he has seen the color of the
captain's," Don Diego put in.
"What is this, Don Diego, my friend? Captain, you have crossed
blades with the rogue?"
"I have," the captain assented. "You but followed a tricky horse, my
sergeant. The fellow was here, in a closet, and came out after I had
entered. So it must have been some other man you met with his
companions up in the hills. This Señor Zorro treated me much as he
treated you in the tavern—had a pistol handy in case I should prove
too expert with the blade."
Captain and sergeant looked at each other squarely, each wondering
how much the other had been lying; while Don Diego chuckled
faintly and tried to press the Señorita Lolita's hand, and failed.
"This thing can be settled only in blood!" Gonzales declared. "I shall
pursue the rascal until he is run to earth. I have permission to select
my men?"
"You may take any at the presidio," the captain said.
"Sergeant Gonzales, I should like to go with you," Don Diego said
suddenly.
"By the saints! It would kill you, caballero! Day and night in the
saddle, up hill and down hill, through dust and heat, and with a
chance at fighting!"
"Well, perhaps it were best for me to remain in the pueblo," Don
Diego admitted. "But he has annoyed this family, of which I am a
true friend. At least, you will keep me informed? You will tell me how
he escapes if he dodges you? I at least may know that you are on
his trail, and where you are riding, so I may be with you in spirit?"
"Certainly, caballero—certainly!" Sergeant Gonzales replied. "I shall
give you the chance of looking upon the rogue's dead face. I swear
it!"
"'Tis a terrible oath, my sergeant. Suppose it should come to pass—"
"I mean, if I slay the rascal, caballero. My captain, do you return this
night to the presidio?"
"Yes," Ramón replied. "Despite my wound, I can ride a horse."
He glanced toward Don Diego as he spoke, and there was almost a
sneer upon his lips.
"What magnificent grit!" Don Diego said. "I, too, shall return to
Reina de Los Angeles, if Don Carlos will be as good as to have his
carriage around. I can tie my horse to the rear of it. To ride
horseback the distance again this day would be the death of me!"
Gonzales laughed and led the way from the house. Captain Ramón
paid his respects to the ladies, glowered at Don Diego, and followed.
The caballero faced Señorita Lolita again as her parents escorted the
captain to the door.
"You will think of the matter?" he asked. "My father will be at me
again within a few days, and I shall escape censure if I am able to
tell him that it is all settled. If you decide to wed me, have your
father send me word by a servant. Then I shall put my house in
order against the wedding day."
"I shall think of it," the girl said.
"We could be married at the mission of San Gabriel, only we should
have to make the confounded journey there. Fray Felipe, of the
mission, has been my friend from the days of my boyhood, and I
would have him say the words, unless you prefer otherwise. He
could come to Reina de Los Angeles and read the ceremony in the
little church on the plaza there."
"I shall think of it," the girl said again.
"Perhaps I may come out again to see you within a few days, if I
survive this night. Buenas noches, señorita! I suppose I should—er—
kiss your hand?"
"You need not take the trouble," Señorita Lolita replied. "It might
fatigue you."
"Ah—thank you! You are thoughtful, I see. I am fortunate if I get me
a thoughtful wife."
Don Diego sauntered to the door. Señorita Lolita rushed into her
own room and beat at her breasts with her hands, and tore at her
hair a bit, too angry, too enraged to weep. Kiss her hand, indeed!
Señor Zorro had not suggested it—he had done it. Señor Zorro had
dared death to visit her! Señor Zorro had laughed as he fought, and
then had escaped by a trick! Ah, if Don Diego Vega were half the
man this highwayman appeared!
She heard the soldiers gallop away, and after a little time she heard
Don Diego Vega depart in her father's carriage. And then she went
out into the great room again to her parents.
"My father, it is impossible that I wed with Don Diego Vega," she
said.
"What has caused your decision, my daughter?"
"I scarcely can tell, except that he is not the sort of man I wish for
my husband. He is lifeless; existence with him would be a continual
torment."
"Captain Ramón also has asked permission to pay you his
addresses," Doña Catalina said.
"And he is almost as bad. I do not like the look in his eyes," the girl
replied.
"You are too particular," Don Carlos told her. "If the persecution
continues another year we shall be beggars. Here is the best catch
in the country seeking you, and you would refuse him. And you do
not like a high army officer because you do not fancy the look in his
eyes!
"Think on it, girl! An alliance with Don Diego Vega is much to be
desired. Perhaps, when you know him better, you will like him more.
And the man may awaken. I thought I saw a flash of it this night,
deemed him jealous because of the presence of the captain here. If
you can arouse his jealousy—"
Señorita Lolita burst into tears, but soon the tempest of weeping
passed, and she dried her eyes.
"I—I shall do my best to like him," she said. "But I cannot bring
myself to say, yet, that I will be his wife."
She hurried into her room again, and called for the native woman
who attended her. Soon the house was in darkness, and the grounds
about it, save for the fires down by the adobe huts, where the
natives told one another grim tales of the night's events, each trying
to make his falsehood the greatest. A gentle snore came from the
apartment of Don Carlos Pulido and his wife.
But the Señorita Lolita did not slumber. She had her head propped
on one hand, and she was looking through a window at the fires in
the distance, and her mind was full of thoughts of Señor Zorro.
She remembered the grace of his bow, the music of his deep voice,
the touch of his lips upon her palm.
"I would he were not a rogue!" she sighed. "How a woman could
love such a man!"
CHAPTER XII
A VISIT
Don Carlos read that epistle aloud to his wife and daughter, and then
looked up to see how they took it. He scoffed at the danger himself,
being an old war-horse, but did not wish to put his womenfolk in
jeopardy.
"What think you?" he asked.
"It has been some time since we have visited the pueblo," Doña
Catalina said. "I have some friends left among the ladies there. I
think it will be an excellent thing to do."
"It certainly will not injure our fortunes to have it become known we
are house guests of Don Diego Vega," Don Carlos said. "What does
our daughter think?"
It was a concession to ask her, and Lolita realized that she was
granted this unusual favor because of Don Diego's wooing. She
hesitated some time before answering.
"I believe it will be all right," she said. "I should like to visit the
pueblo, for we see scarcely anybody here at the hacienda. But
people may talk concerning Don Diego and myself."
"Nonsense!" Don Carlos exploded. "Could there be anything more
natural than that we should visit the Vegas, since our blood is almost
as good as theirs and better than that of others?"
"But it is Don Diego's house, and not that of his father. Still—he will
not be there for two or three days, he says, and we can return when
he comes."
"Then it is settled!" Don Carlos declared. "I shall see my
superintendent and give him instructions."
He hurried into the patio and rang the big bell for the
superintendent, being well pleased. For when the Señorita Lolita saw
the rich furnishings in the house of Don Diego Vega, she might the
more readily accept Don Diego as a husband, he thought. When she
saw the silks and satins, the elegant tapestries, the furniture inlaid
with gold and studded with precious stones, when she realized that
she could be mistress of this and much more besides—Don Carlos
flattered himself that he knew the feminine heart.
Soon after the siesta hour, a carreta was brought before the door,
drawn by mules and driven by a native. Doña Catalina and Lolita got
into it, and Don Carlos bestrode his best horse and rode at its side.
And so they went down the trail to the highway, and down the
highway toward Reina de Los Angeles.
They passed folk who marveled to see the Pulido family thus going
abroad, for it was well known that they had met with ill fortune and
scarcely went anywhere now. It was even whispered that the ladies
did not keep up with the fashions, and that the servants were poorly
fed, but remained at the hacienda because their master was so kind.
But Doña Catalina and her daughter held their heads proudly, as did
Don Carlos, and they greeted the people they knew, and so
continued along the highway.
Presently they made a turning and could see the pueblo in the
distance—the plaza, and the church with its high cross on one side
of it, and the inn and storehouses, and a few residences of the more
pretentious sort, like Don Diego's, and the scattered huts of natives
and poor folk.