100% found this document useful (1 vote)
87 views

Feature Engineering for Machine Learning and Data Analytics First Edition Dong - Quickly download the ebook in PDF format for unlimited reading

The document promotes a collection of ebooks focused on feature engineering for machine learning and data analytics, available for instant download at textbookfull.com. It includes titles by various authors covering principles, techniques, and applications in the field. The content also features a comprehensive overview of the chapters and topics related to data types and analytics methods.

Uploaded by

bazexamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
87 views

Feature Engineering for Machine Learning and Data Analytics First Edition Dong - Quickly download the ebook in PDF format for unlimited reading

The document promotes a collection of ebooks focused on feature engineering for machine learning and data analytics, available for instant download at textbookfull.com. It includes titles by various authors covering principles, techniques, and applications in the field. The content also features a comprehensive overview of the chapters and topics related to data types and analytics methods.

Uploaded by

bazexamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Explore the full ebook collection and download it now at textbookfull.

com

Feature Engineering for Machine Learning and Data


Analytics First Edition Dong

https://textbookfull.com/product/feature-engineering-for-
machine-learning-and-data-analytics-first-edition-dong/

OR CLICK HERE

DOWLOAD EBOOK

Browse and Get More Ebook Downloads Instantly at https://textbookfull.com


Click here to visit textbookfull.com and download textbook now
Your digital treasures (PDF, ePub, MOBI) await
Download instantly and pick your perfect format...

Read anywhere, anytime, on any device!

Feature engineering for machine learning principles and


techniques for data scientists First Edition Casari

https://textbookfull.com/product/feature-engineering-for-machine-
learning-principles-and-techniques-for-data-scientists-first-edition-
casari/
textbookfull.com

The Art of Feature Engineering: Essentials for Machine


Learning 1st Edition Pablo Duboue

https://textbookfull.com/product/the-art-of-feature-engineering-
essentials-for-machine-learning-1st-edition-pablo-duboue/

textbookfull.com

AI and Machine Learning Paradigms for Health Monitoring


System: Intelligent Data Analytics Hasmat Malik

https://textbookfull.com/product/ai-and-machine-learning-paradigms-
for-health-monitoring-system-intelligent-data-analytics-hasmat-malik/

textbookfull.com

Advanced Data Analytics Using Python: With Machine


Learning, Deep Learning and NLP Examples Mukhopadhyay

https://textbookfull.com/product/advanced-data-analytics-using-python-
with-machine-learning-deep-learning-and-nlp-examples-mukhopadhyay/

textbookfull.com
Recent Developments in Machine Learning and Data Analytics
IC3 2018 Jugal Kalita

https://textbookfull.com/product/recent-developments-in-machine-
learning-and-data-analytics-ic3-2018-jugal-kalita/

textbookfull.com

Machine Learning and Big Data Analytics Paradigms:


Analysis, Applications and Challenges Aboul Ella Hassanien

https://textbookfull.com/product/machine-learning-and-big-data-
analytics-paradigms-analysis-applications-and-challenges-aboul-ella-
hassanien/
textbookfull.com

Data Processing with Optimus: Supercharge big data


preparation tasks for analytics and machine learning with
Optimus using Dask and PySpark Leon
https://textbookfull.com/product/data-processing-with-optimus-
supercharge-big-data-preparation-tasks-for-analytics-and-machine-
learning-with-optimus-using-dask-and-pyspark-leon/
textbookfull.com

Intelligent Feature Selection for Machine Learning Using


the Dynamic Wavelet Fingerprint Mark K. Hinders

https://textbookfull.com/product/intelligent-feature-selection-for-
machine-learning-using-the-dynamic-wavelet-fingerprint-mark-k-hinders/

textbookfull.com

Scala and Spark for Big Data Analytics Explore the


concepts of functional programming data streaming and
machine learning 1st Edition Md. Rezaul Karim
https://textbookfull.com/product/scala-and-spark-for-big-data-
analytics-explore-the-concepts-of-functional-programming-data-
streaming-and-machine-learning-1st-edition-md-rezaul-karim/
textbookfull.com
FEATURE ENGINEERING FOR
MACHINE LEARNING AND
DATA ANALYTICS
Chapman & Hall/CRC
Data Mining and Knowledge Series
Series Editor: Vipin Kumar

RapidMiner
Data Mining Use Cases and Business Analytics Applications
Markus Hofmann and Ralf Klinkenberg
Computational Business Analytics
Subrata Das
Data Classification
Algorithms and Applications
Charu C. Aggarwal
Healthcare Data Analytics
Chandan K. Reddy and Charu C. Aggarwal
Accelerating Discovery
Mining Unstructured Information for Hypothesis Generation
Scott Spangler
Event Mining
Algorithms and Applications
Tao Li
Text Mining and Visualization
Case Studies Using Open-Source Tools
Markus Hofmann and Andrew Chisholm
Graph-Based Social Media Analysis
Ioannis Pitas
Data Mining
A Tutorial-Based Primer, Second Edition
Richard J. Roiger
Data Mining with R
Learning with Case Studies, Second Edition
Luís Torgo
Social Networks with Rich Edge Semantics
Quan Zheng and David Skillicorn
Large-Scale Machine Learning in the Earth Sciences
Ashok N. Srivastava, Ramakrishna Nemani, and Karsten Steinhaeuser
Data Science and Analytics with Python
Jesus Rogel-Salazar
Feature Engineering for Machine Learning and Data Analytics
Guozhu Dong and Huan Liu

For more information about this series please visit:


https://www.crcpress.com/Chapman--HallCRC-Data-Mining-and-Knowledge-Discovery-Series/book-series/CHDAMINODIS
FEATURE ENGINEERING FOR
MACHINE LEARNING AND
DATA ANALYTICS

Edited by
Guozhu Dong and Huan Liu
MATLAB• is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks
does not warrant the accuracy of the text or exercises in this book. This book’s use or discussion
of MATLAB• software or related products does not constitute endorsement or sponsorship by The
MathWorks of a particular pedagogical approach or particular use of the MATLAB• software.

CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742

© 2018 by Taylor & Francis Group, LLC


CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works

Printed on acid-free paper


Version Date: 20180301

International Standard Book Number-13: 978-1-1387-4438-7 (Hardback)

This book contains information obtained from authentic and highly regarded sources. Reasonable
efforts have been made to publish reliable data and information, but the author and publisher cannot
assume responsibility for the validity of all materials or the consequences of their use. The authors and
publishers have attempted to trace the copyright holders of all material reproduced in this publication
and apologize to copyright holders if permission to publish in this form has not been obtained. If any
copyright material has not been acknowledged please write and let us know so we may rectify in any
future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information
storage or retrieval system, without written permission from the publishers.

For permission to photocopy or use material electronically from this work, please access
www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc.
(CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization
that provides licenses and registration for a variety of users. For organizations that have been granted
a photocopy license by the CCC, a separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and
are used only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
To my family, especially baby Hazel [G. D.]

To my family [H. L.]

To all contributing authors [G. D. & H. L.]


Contents

Preface xv

Contributors xvii

1 Preliminaries and Overview 1


Guozhu Dong and Huan Liu
1.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.2 Feature Engineering . . . . . . . . . . . . . . . . . . . 3
1.1.3 Machine Learning and Data Analytic Tasks . . . . . . 3
1.2 Overview of the Chapters . . . . . . . . . . . . . . . . . . . . 4
1.3 Beyond this Book . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.1 Feature Engineering for Specific Data Types . . . . . . 8
1.3.2 Feature Engineering on Non-Data-Specific Topics . . . 9

I Feature Engineering for Various Data Types 13


2 Feature Engineering for Text Data 15
Chase Geigle, Qiaozhu Mei, and ChengXiang Zhai
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2 Overview of Text Representation . . . . . . . . . . . . . . . . 17
2.3 Text as Strings . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4 Sequence of Words Representation . . . . . . . . . . . . . . . 19
2.5 Bag of Words Representation . . . . . . . . . . . . . . . . . . 21
2.5.1 Term Weighting . . . . . . . . . . . . . . . . . . . . . 22
2.5.2 Beyond Single Words . . . . . . . . . . . . . . . . . . . 27
2.6 Structural Representation of Text . . . . . . . . . . . . . . . 28
2.6.1 Semantic Structure Features . . . . . . . . . . . . . . . 30
2.7 Latent Semantic Representation . . . . . . . . . . . . . . . . 31
2.7.1 Latent Semantic Analysis . . . . . . . . . . . . . . . . 31
2.7.2 Probabilistic Latent Semantic Analysis . . . . . . . . . 33
2.7.3 Latent Dirichlet Allocation . . . . . . . . . . . . . . . 35
2.8 Explicit Semantic Representation . . . . . . . . . . . . . . . 37
2.9 Embeddings for Text Representation . . . . . . . . . . . . . 37
2.9.1 Matrix Factorization for Word Embeddings . . . . . . 38
2.9.2 Neural Networks for Word Embeddings . . . . . . . . 40

vii
viii Contents

2.9.3 Document Representations from Word Embeddings . . 41


2.10 Context-Sensitive Text Representation . . . . . . . . . . . . 42
2.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

3 Feature Extraction and Learning for Visual Data 55


Parag S. Chandakkar, Ragav Venkatesan, and Baoxin Li
3.1 Classical Visual Feature Representations . . . . . . . . . . . 57
3.1.1 Color Features . . . . . . . . . . . . . . . . . . . . . . 57
3.1.2 Texture Features . . . . . . . . . . . . . . . . . . . . . 61
3.1.3 Shape Features . . . . . . . . . . . . . . . . . . . . . . 63
3.2 Latent Feature Extraction . . . . . . . . . . . . . . . . . . . 66
3.2.1 Principal Component Analysis . . . . . . . . . . . . . 67
3.2.2 Kernel Principal Component Analysis . . . . . . . . . 68
3.2.3 Multidimensional Scaling . . . . . . . . . . . . . . . . 69
3.2.4 Isomap . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.2.5 Laplacian Eigenmaps . . . . . . . . . . . . . . . . . . . 70
3.3 Deep Image Features . . . . . . . . . . . . . . . . . . . . . . 71
3.3.1 Convolutional Neural Networks . . . . . . . . . . . . . 72
3.3.1.1 The Dot-Product Layer . . . . . . . . . . . . 72
3.3.1.2 The Convolution Layer . . . . . . . . . . . . 73
3.3.2 CNN Architecture Design . . . . . . . . . . . . . . . . 75
3.3.3 Fine-Tuning Off-the-Shelf Neural Networks . . . . . . 76
3.3.4 Summary and Conclusions . . . . . . . . . . . . . . . . 79

4 Feature-Based Time-Series Analysis 87


Ben D. Fulcher
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
4.1.1 The Time Series Data Type . . . . . . . . . . . . . . . 87
4.1.2 Time-Series Characterization . . . . . . . . . . . . . . 89
4.1.3 Applications of Time-Series Analysis . . . . . . . . . . 90
4.2 Feature-Based Representations of Time Series . . . . . . . . 92
4.3 Global Features . . . . . . . . . . . . . . . . . . . . . . . . . 95
4.3.1 Examples of Global Features . . . . . . . . . . . . . . 95
4.3.2 Massive Feature Vectors and Highly Comparative Time-
Series Analysis . . . . . . . . . . . . . . . . . . . . . . 98
4.4 Subsequence Features . . . . . . . . . . . . . . . . . . . . . . 102
4.4.1 Interval Features . . . . . . . . . . . . . . . . . . . . . 102
4.4.2 Shapelets . . . . . . . . . . . . . . . . . . . . . . . . . 103
4.4.3 Pattern Dictionaries . . . . . . . . . . . . . . . . . . . 105
4.5 Combining Time-Series Representations . . . . . . . . . . . . 106
4.6 Feature-Based Forecasting . . . . . . . . . . . . . . . . . . . 108
4.7 Summary and Outlook . . . . . . . . . . . . . . . . . . . . . 109
Contents ix

5 Feature Engineering for Data Streams 117


Yao Ma, Jiliang Tang, and Charu Aggarwal
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
5.2 Streaming Settings . . . . . . . . . . . . . . . . . . . . . . . . 119
5.3 Linear Methods for Streaming Feature Construction . . . . . 121
5.3.1 Principal Component Analysis for Data Streams . . . 121
5.3.2 Linear Discriminant Analysis for Data Streams . . . . 123
5.4 Non-Linear Methods for Streaming Feature Construction . . 125
5.4.1 Locally Linear Embedding for Data Streams . . . . . 125
5.4.2 Kernel Learning for Data Streams . . . . . . . . . . . 126
5.4.3 Neural Networks for Data Streams . . . . . . . . . . . 128
5.4.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 132
5.5 Feature Selection for Data Streams with Streaming Features 132
5.5.1 The Grafting Algorithm . . . . . . . . . . . . . . . . . 133
5.5.2 The Alpha-Investing Algorithm . . . . . . . . . . . . . 133
5.5.3 The Online Streaming Feature Selection Algorithm . . 134
5.5.4 Unsupervised Streaming Feature Selection in
Social Media . . . . . . . . . . . . . . . . . . . . . . . 135
5.6 Feature Selection for Data Streams with Streaming Instances 135
5.6.1 Online Feature Selection . . . . . . . . . . . . . . . . . 136
5.6.2 Unsupervised Feature Selection on Data Streams . . . 136
5.7 Discussions and Challenges . . . . . . . . . . . . . . . . . . . 136
5.7.1 Stability . . . . . . . . . . . . . . . . . . . . . . . . . . 137
5.7.2 Number of Features . . . . . . . . . . . . . . . . . . . 137
5.7.3 Heterogeneous Streaming Data . . . . . . . . . . . . . 137

6 Feature Generation and Feature Engineering for Sequences 145


Guozhu Dong, Lei Duan, Jyrki Nummenmaa, and Peng Zhang
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
6.2 Basics on Sequence Data and Sequence Patterns . . . . . . . 148
6.3 Approaches to Using Patterns in Sequence Features . . . . . 149
6.4 Traditional Pattern-Based Sequence Features . . . . . . . . . 150
6.5 Mined Sequence Patterns for Use in Sequence Features . . . 151
6.5.1 Frequent Sequence Patterns . . . . . . . . . . . . . . . 152
6.5.2 Closed Sequential Patterns . . . . . . . . . . . . . . . 154
6.5.3 Gap Constraints for Sequence Patterns . . . . . . . . . 155
6.5.4 Partial Order Patterns . . . . . . . . . . . . . . . . . . 156
6.5.5 Periodic Sequence Patterns . . . . . . . . . . . . . . . 158
6.5.6 Distinguishing Sequence Patterns . . . . . . . . . . . . 158
6.5.7 Pattern Matching for Sequences . . . . . . . . . . . . . 160
6.6 Factors for Selecting Sequence Patterns as Features . . . . . 161
6.7 Sequence Features Not Defined by Patterns . . . . . . . . . . 161
6.8 Sequence Databases . . . . . . . . . . . . . . . . . . . . . . . 162
6.9 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . 163
x Contents

7 Feature Generation for Graphs and Networks 167


Yuan Yao, Hanghang Tong, Feng Xu, and Jian Lu
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
7.2 Feature Types . . . . . . . . . . . . . . . . . . . . . . . . . . 168
7.3 Feature Generation . . . . . . . . . . . . . . . . . . . . . . . 169
7.3.1 Basic Models . . . . . . . . . . . . . . . . . . . . . . . 170
7.3.2 Extensions . . . . . . . . . . . . . . . . . . . . . . . . 175
7.3.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . 179
7.4 Feature Usages . . . . . . . . . . . . . . . . . . . . . . . . . . 181
7.4.1 Multi-Label Classification . . . . . . . . . . . . . . . . 181
7.4.2 Link Prediction . . . . . . . . . . . . . . . . . . . . . . 181
7.4.3 Anomaly Detection . . . . . . . . . . . . . . . . . . . . 182
7.4.4 Visualization . . . . . . . . . . . . . . . . . . . . . . . 182
7.5 Conclusions and Future Directions . . . . . . . . . . . . . . . 183
7.6 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

II General Feature Engineering Techniques 189


8 Feature Selection and Evaluation 191
Yun Li and Tao Li
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
8.2 Feature Selection Frameworks . . . . . . . . . . . . . . . . . 192
8.2.1 Search-Based Feature Selection Framework . . . . . . 193
8.2.2 Correlation-Based Feature Selection Framework . . . . 194
8.3 Advanced Topics for Feature Selection . . . . . . . . . . . . . 196
8.3.1 Stable Feature Selection . . . . . . . . . . . . . . . . . 196
8.3.2 Sparsity-Based Feature Selection . . . . . . . . . . . . 199
8.3.3 Multi-Source Feature Selection . . . . . . . . . . . . . 200
8.3.4 Distributed Feature Selection . . . . . . . . . . . . . . 203
8.3.5 Multi-View Feature Selection . . . . . . . . . . . . . . 204
8.3.6 Multi-Label Feature Selection . . . . . . . . . . . . . . 205
8.3.7 Online Feature Selection . . . . . . . . . . . . . . . . . 206
8.3.8 Privacy-Preserving Feature Selection . . . . . . . . . . 208
8.3.9 Adversarial Feature Selection . . . . . . . . . . . . . . 210
8.4 Future Work and Conclusion . . . . . . . . . . . . . . . . . . 211

9 Automating Feature Engineering in Supervised Learning 221


Udayan Khurana
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
9.1.1 Challenges in Performing Feature Engineering . . . . 224
9.2 Terminology and Problem Definition . . . . . . . . . . . . . . 225
9.3 A Few Simple Approaches . . . . . . . . . . . . . . . . . . . 226
9.4 Hierarchical Exploration of Feature Transformations . . . . . 227
9.4.1 Transformation Graph . . . . . . . . . . . . . . . . . . 228
9.4.2 Transformation Graph Exploration . . . . . . . . . . . 229
Contents xi

9.5 Learning Optimal Traversal Policy . . . . . . . . . . . . . . . 231


9.5.1 Feature Exploration through Reinforcement Learning 233
9.6 Finding Effective Features without Model Training . . . . . . 235
9.6.1 Learning to Predict Useful Transformations . . . . . . 237
9.7 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . 239
9.7.1 Other Related Work . . . . . . . . . . . . . . . . . . . 239
9.7.2 Research Opportunities . . . . . . . . . . . . . . . . . 240
9.7.3 Resources . . . . . . . . . . . . . . . . . . . . . . . . . 240

10 Pattern-Based Feature Generation 245


Yunzhe Jia, James Bailey, Ramamohanarao Kotagiri, and Christopher
Leckie
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
10.2 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
10.2.1 Data and Patterns . . . . . . . . . . . . . . . . . . . . 247
10.2.2 Patterns for Non-Transactional Data . . . . . . . . . . 248
10.3 Framework of Pattern-Based Feature Generation . . . . . . . 251
10.3.1 Pattern Mining . . . . . . . . . . . . . . . . . . . . . . 251
10.3.2 Pattern Selection . . . . . . . . . . . . . . . . . . . . . 252
10.3.3 Feature Generation . . . . . . . . . . . . . . . . . . . . 253
10.4 Pattern Mining Algorithms . . . . . . . . . . . . . . . . . . . 254
10.4.1 Frequent Pattern Mining . . . . . . . . . . . . . . . . 254
10.4.2 Contrast Pattern Mining . . . . . . . . . . . . . . . . . 256
10.5 Pattern Selection Approaches . . . . . . . . . . . . . . . . . . 258
10.5.1 Post-Processing Pruning . . . . . . . . . . . . . . . . . 258
10.5.2 In-processing Pruning . . . . . . . . . . . . . . . . . . 260
10.6 Pattern-Based Feature Generation . . . . . . . . . . . . . . . 262
10.6.1 Unsupervised Mapping Functions . . . . . . . . . . . . 262
10.6.2 Supervised Mapping Functions . . . . . . . . . . . . . 263
10.6.3 Feature Generation for Sequence Data and Graph Data 265
10.6.4 Comparison with Similar Techniques . . . . . . . . . . 265
10.7 Pattern-Based Feature Generation for Classification . . . . . 266
10.7.1 Problem Statement . . . . . . . . . . . . . . . . . . . . 266
10.7.2 Direct Classification in the Pattern Space . . . . . . . 267
10.7.3 Indirect Classification in the Pattern Space . . . . . . 268
10.7.4 Connection with Stacking Technique . . . . . . . . . . 269
10.8 Pattern-Based Feature Generation for Clustering . . . . . . . 269
10.8.1 Clustering in the Pattern Space . . . . . . . . . . . . . 269
10.8.2 Subspace Clustering . . . . . . . . . . . . . . . . . . . 270
10.9 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

11 Deep Learning for Feature Representation 279


Suhang Wang and Huan Liu
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
11.2 Restricted Boltzmann Machine . . . . . . . . . . . . . . . . . 280
xii Contents

11.2.1 Deep Belief Networks and Deep Boltzmann Machine . 281


11.2.2 RBM for Real-Valued Data . . . . . . . . . . . . . . . 283
11.3 AutoEncoder . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
11.3.1 Sparse Autoencoder . . . . . . . . . . . . . . . . . . . 286
11.3.2 Denoising Autoencoder . . . . . . . . . . . . . . . . . 287
11.3.3 Stacked Autoencoder . . . . . . . . . . . . . . . . . . . 287
11.4 Convolutional Neural Networks . . . . . . . . . . . . . . . . . 288
11.4.1 Transfer Feature Learning of CNN . . . . . . . . . . . 290
11.5 Word Embedding and Recurrent Neural Networks . . . . . . 291
11.5.1 Word Embedding . . . . . . . . . . . . . . . . . . . . . 291
11.5.2 Recurrent Neural Networks . . . . . . . . . . . . . . . 294
11.5.3 Gated Recurrent Unit . . . . . . . . . . . . . . . . . . 295
11.5.4 Long Short-Term Memory . . . . . . . . . . . . . . . . 296
11.6 Generative Adversarial Networks and Variational Autoencoder 296
11.6.1 Generative Adversarial Networks . . . . . . . . . . . . 297
11.6.2 Variational Autoencoder . . . . . . . . . . . . . . . . . 298
11.7 Discussion and Further Readings . . . . . . . . . . . . . . . . 299

III Feature Engineering in Special Applications 309


12 Feature Engineering for Social Bot Detection 311
Onur Varol, Clayton A. Davis, Filippo Menczer, and Alessandro Flammini
12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
12.2 Social Bot Detection . . . . . . . . . . . . . . . . . . . . . . . 312
12.2.1 Holistic Approach . . . . . . . . . . . . . . . . . . . . 313
12.2.2 Pairwise Account Comparison . . . . . . . . . . . . . . 313
12.2.3 Egocentric Analysis . . . . . . . . . . . . . . . . . . . 314
12.3 Online Bot Detection Framework . . . . . . . . . . . . . . . 314
12.3.1 Feature Extraction . . . . . . . . . . . . . . . . . . . . 315
12.3.1.1 User-Based Features . . . . . . . . . . . . . . 316
12.3.1.2 Friend Features . . . . . . . . . . . . . . . . 316
12.3.1.3 Network Features . . . . . . . . . . . . . . . 318
12.3.1.4 Content and Language Features . . . . . . . 318
12.3.1.5 Sentiment Features . . . . . . . . . . . . . . 319
12.3.1.6 Temporal Features . . . . . . . . . . . . . . . 320
12.3.2 Possible Directions for Feature Engineering . . . . . . 320
12.3.3 Feature Analysis . . . . . . . . . . . . . . . . . . . . . 320
12.3.4 Feature Selection . . . . . . . . . . . . . . . . . . . . . 323
12.3.4.1 Feature Classes . . . . . . . . . . . . . . . . . 323
12.3.4.2 Top Individual Features . . . . . . . . . . . . 324
12.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
12.5 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Contents xiii

13 Feature Generation and Engineering for Software Analytics 335


Xin Xia and David Lo
13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
13.2 Features for Defect Prediction . . . . . . . . . . . . . . . . . 337
13.2.1 File-level Defect Prediction . . . . . . . . . . . . . . . 337
13.2.1.1 Code Features . . . . . . . . . . . . . . . . . 338
13.2.1.2 Process Features . . . . . . . . . . . . . . . . 340
13.2.2 Just-in-time Defect Prediction . . . . . . . . . . . . . 341
13.2.3 Prediction Models and Results . . . . . . . . . . . . . 343
13.3 Features for Crash Release Prediction for Apps . . . . . . . . 343
13.3.1 Complexity Dimension . . . . . . . . . . . . . . . . . . 344
13.3.2 Time Dimension . . . . . . . . . . . . . . . . . . . . . 345
13.3.3 Code Dimension . . . . . . . . . . . . . . . . . . . . . 346
13.3.4 Diffusion Dimension . . . . . . . . . . . . . . . . . . . 346
13.3.5 Commit Dimension . . . . . . . . . . . . . . . . . . . . 347
13.3.6 Text Dimension . . . . . . . . . . . . . . . . . . . . . . 347
13.3.7 Prediction Models and Results . . . . . . . . . . . . . 348
13.4 Features from Mining Monthly Reports to Predict Developer
Turnover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
13.4.1 Working Hours . . . . . . . . . . . . . . . . . . . . . . 349
13.4.2 Task Report . . . . . . . . . . . . . . . . . . . . . . . . 349
13.4.3 Project . . . . . . . . . . . . . . . . . . . . . . . . . . 350
13.4.4 Prediction Models and Results . . . . . . . . . . . . . 351
13.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351

14 Feature Engineering for Twitter-Based Applications 359


Sanjaya Wijeratne, Amit Sheth, Shreyansh Bhatt, Lakshika Balasuriya,
Hussein S. Al-Olimat, Manas Gaur, Amir Hossein Yazdavar,
Krishnaprasad Thirunarayan
14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
14.2 Data Present in a Tweet . . . . . . . . . . . . . . . . . . . . 361
14.2.1 Tweet Text-Related Data . . . . . . . . . . . . . . . . 362
14.2.2 Twitter User-Related Data . . . . . . . . . . . . . . . 363
14.2.3 Other Metadata . . . . . . . . . . . . . . . . . . . . . 364
14.3 Common Types of Features Used in Twitter-Based Applications 364
14.3.1 Textual Features . . . . . . . . . . . . . . . . . . . . . 365
14.3.2 Image and Video Features . . . . . . . . . . . . . . . . 368
14.3.3 Twitter Metadata-Related Features . . . . . . . . . . . 369
14.3.4 Network Features . . . . . . . . . . . . . . . . . . . . . 370
14.4 Twitter Feature Engineering in Selected Twitter-Based Studies 370
14.4.1 Twitter User Profile Classification . . . . . . . . . . . 371
14.4.2 Assisting Coordination during Crisis Events . . . . . . 372
14.4.3 Location Extraction from Tweets . . . . . . . . . . . . 375
14.4.4 Studying the Mental Health Conditions of Depressed
Twitter Users . . . . . . . . . . . . . . . . . . . . . . . 377
xiv Contents

14.4.5 Sentiment and Emotion Analysis on Twitter . . . . . . 379


14.5 Twitris: A Real-Time Social Media Analysis Platform . . . . 381
14.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
14.7 Acknowledgment . . . . . . . . . . . . . . . . . . . . . . . . . 384

Index 395
Preface

Feature engineering plays a vital role in big data analytics. Machine learning
and data mining algorithms cannot work without data. Little can be achieved
if there are few features to represent the underlying data objects, and the
quality of results of those algorithms largely depends on the quality of the
available features. Data can exist in various forms such as image, text, graph,
sequence, and time series. A common way to represent data for data analytics
is to use feature vectors. Feature engineering meets the needs in the generation
and selection of useful features, as well as several other issues.
This book is devoted to feature engineering. It covers various aspects
of feature engineering, including feature generation, feature extraction, fea-
ture transformation, feature selection, and feature analysis and evaluation. It
presents concepts, methods, examples, as well as applications.
Feature engineering is often data type specific and application dependent.
This calls for multiple chapters on different data types that require specialized
feature engineering techniques to meet various data analytic needs. Hence, this
book contains chapters on feature engineering for major data types such as
texts, images, sequences, time series, graphs, streaming data, software engi-
neering data, Twitter data, and social media data. It also contains generic
feature generation approaches, as well as methods for generating tried-and-
tested, hand-crafted, domain-specific features.
This book contains many useful feature engineering concepts and tech-
niques, which are an important part of machine learning and data analytics.
They can help readers to meet their needs in multiple scenarios: (a) gener-
ate features to represent the data when there are no features, (b) generate
effective features when (one may be concerned that) existing features are
not good/competitive enough, (c) select features when there are too many
features, (d) generate and select effective features for specific types of appli-
cations, and (e) understand the challenges associated with, and the needed
approaches to handle, various data types. This list is certainly not exhaustive.
The first chapter is an introduction, which defines the concepts of fea-
tures and feature engineering, offers an overview of the book, and provides
pointers to topics not covered in this book. The next six chapters are devoted
to feature engineering, including feature generation, for specific data types,
namely texts, images, sequences, time series, graphs, and streaming data. The
subsequent four chapters cover generic approaches for feature engineering,
namely feature selection, feature transformation-based feature engineering,

xv
xvi Preface

deep learning–based feature engineering, and pattern-based feature genera-


tion and engineering. The last three chapters discuss feature engineering for
social bot detection, software management, and Twitter-based applications
respectively.
Getting familiar with the concepts and techniques covered in this book will
boost one’s understanding and expertise in machine learning and big data
analytics. This book can be used as a reference for data analysts, big data
scientists, data preprocessing workers, project managers, project developers,
prediction modelers, professors, researchers, graduate students, and upper-
level undergraduate students. This book can be used as the primary text for
courses on feature engineering, and as supplementary materials for courses on
machine learning, data mining, and big data analytics.
We wish to express our profound gratitude to the contributing authors of
the chapters of the book; without their expertise and dedicated efforts, this
book would not be possible. We are grateful to Randi Cohen and Veronica
Rodriguez who provided guidance and assistance on the publishing side of this
effort. We are indebted to Jiawei Han, Jian Pei, Nicholas Skapura, Xintao Wu,
and Junjie Zhang who kindly suggested domain experts as potential authors
and so on, and also to Vineeth Rakesh Mohan who provided useful feedback
on parts of this book.

Guozhu Dong, Dayton, Ohio

Huan Liu, Phoenix, Arizona


Contributors

Charu Aggarwal Bloomington, Indiana, USA


IBM Research
Yorktown Heights, New York, USA Ben D. Fulcher
Monash University
Hussein S. Al-Olimat Melbourne, Victoria, Australia
Wright State University
Dayton, Ohio, USA Manas Gaur
James Bailey Wright State University
The University of Melbourne Dayton, Ohio, USA
Parkville, Victoria, Australia
Chase Geigle
Lakshika Balasuriya University of Illinois at
Wright State University Urbana-Champaign
Dayton, Ohio, USA Urbana-Champaign, Illinois, USA
Shreyansh Bhatt Yunzhe Jia
Wright State University
The University of Melbourne
Dayton, Ohio, USA
Parkville, Victoria, Australia
Parag S. Chandakkar
Arizona State University Ramamohanarao Kotagiri
Phoenix, Arizona, USA The University of Melbourne
Parkville, Victoria, Australia
Clayton A. Davis
Indiana University Christopher Leckie
Bloomington, Indiana, USA The University of Melbourne
Parkville, Victoria, Australia
Guozhu Dong
Wright State University Baoxin Li
Dayton, Ohio, USA
Arizona State University
Lei Duan Phoenix, Arizona, USA
Sichuan University
Chengdu, Sichuan, China Tao Li
Nanjing University of Posts and
Alessandro Flammini Telecommunications
Indiana University Nanjing, Jiangsu, China

xvii
xviii Contributors

Yun Li Hanghang Tong


Nanjing University of Posts and Arizona State University
Telecommunications Phoenix, Arizona, USA
Nanjing, Jiangsu, China
Onur Varol
Huan Liu Indiana University
Arizona State University Bloomington, Indiana, USA
Phoenix, Arizona, USA
Ragav Venkatesan
David Lo Arizona State University
Singapore Management University Phoenix, Arizona, USA
Singapore
Suhang Wang
Jian Lu Arizona State University
Nanjing University Phoenix, Arizona, USA
Nanjing, Jiansu, China
Sanjaya Wijeratne
Yao Ma
Wright State University
Michigan State University Dayton, Ohio, USA
East Lansing, Michigan, USA
Xin Xia
Qiaozhu Mei
Monash University
University of Illinois at
Melbourne, Victoria, Australia
Urbana-Champaign
Urbana-Champaign, Illinois, USA Feng Xu
Nanjing University
Filippo Menczer
Nanjing, Jiansu, China
Indiana University
Bloomington, Indiana, USA
Yuan Yao
Jyrki Nummenmaa Nanjing University
University of Tampere Nanjing, Jiansu, China
Tampere, Finland
Amir Hossein Yazdavar
Amit Sheth Wright State University
Wright State University Dayton, Ohio, USA
Dayton, Ohio, USA
ChengXiang Zhai
Jiliang Tang University of Illinois at
Michigan State University Urbana-Champaign
East Lansing, Michigan, USA Urbana-Champaign, Illinois, USA

Krishnaprasad Thirunarayan Peng Zhang


Wright State University Sichuan University
Dayton, Ohio, USA Chengdu, Sichuan, China
Chapter 1
Preliminaries and Overview

Guozhu Dong
Wright State University, Dayton, Ohio, USA

Huan Liu
Arizona State University, Phoenix, Arizona, USA

1.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.2 Feature Engineering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.3 Machine Learning and Data Analytic Tasks . . . . . . . . . . . . 3
1.2 Overview of the Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Beyond this Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.1 Feature Engineering for Specific Data Types . . . . . . . . . . . 8
1.3.2 Feature Engineering on Non-Data-Specific Topics . . . . . . 9
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

At the end of the day, some machine learning projects succeed


and some fail. What makes the difference? Easily the most
important factor is the features used.
Feature engineering is the key.

Pedro Domingos, 2012 [2].

This chapter first provides preliminaries on the basic concepts related to


features, feature engineering, and data analytic tasks. It then gives an overview
of this book. Finally, it offers pointers to other feature engineering topics not
covered in other chapters of this book.

1.1 Preliminaries
1.1.1 Features
In machine learning, data mining, and data analytics, a feature is an
attribute or variable used to describe some aspect of individual data objects.

1
2 Feature Engineering for Machine Learning and Data Analytics

Example features include age and eye color for persons, and major and grade
point average for students.
Informative features are the basis for data analytics. They are useful for
describing the underlying objects, and for distinguishing and characterizing
different (explicit or latent) groups of objects. They are also vital for producing
accurate and easy-to-explain predictive models, and yielding good results in
various data analytic tasks. “Feature,” “variable,” and “attribute” are often
used as synonyms.
For a given application and a fixed point in time, often a fixed set of
features is implicitly chosen to describe all underlying data objects; each object
takes a particular value for each of those features. This results in a feature-
vector-based representation of the data objects.
Features are divided into several feature types, including categorical, ordi-
nal, and numerical. Different feature types require different kinds of analysis,
due to structural differences in their domains.
• The domain of a categorical feature is a set of discrete val-
ues. For example, color is a categorical feature whose domain is
{black, blue, brown, green, red, white, yellow}.

• A special type of categorical feature is binary, whose domain has exactly


two values.
• The domain of an ordinal feature is a set of ordered values. The degree
feature is an ordinal feature whose domain is {Bachelor, M aster, P hD}
and the three values are ordered as follows: Bachelor < M aster < P hD.

• The domain of a numerical feature is a set of numerical values. A nu-


merical feature is also called quantitative or continuous. For example,
the age feature is a numerical one whose domain is the set of integers
between 0 and 150.
There is a less-than (denoted by <) relationship between each pair of
numerical values, e.g., 3 < 4. This relationship and the implied nearby-
ness among numerical values are often exploited in machine learning and
data analytics.
• A numerical feature is a ratio-scaled feature if the following is true: a
value u is twice as much as a value v with respect to some meaning (e.g.,
warmness or length) associated with the feature, whenever it is the case
that u = 2 ∗ v.
In many applications categorical features are represented as numerical val-
ues. Care is needed in such cases as the order implied by the numerical values
is typically meaningless. In R packages categorical variables are treated as fac-
tors. A so-called “one-hot encoding” is often used to transform such features.
The usefulness of a feature is measured ultimately in terms of the im-
provement the feature adds to the data analytic task at hand. For example,
Preliminaries and Overview 3

in classification this is mostly in terms of the improvement in classification


accuracy. The understandability and interpretability of the feature are also of
significant interest.

1.1.2 Feature Engineering


This book uses a very general definition for feature engineering. It includes
the topics of feature transformation, feature generation, feature extraction,
feature selection, feature analysis and evaluation, general automatic feature
engineering methodology, and feature engineering applications. We briefly ex-
plain these concepts below.

(1) Feature transformation is about constructing new features from existing


features; this is often achieved using mathematical mappings.

(2) Feature generation is about generating new features that are often not
the result of feature transformations. For example, assuming that one
does not view a pixel in an image as a feature, one generates new features
for images. Moreover, it makes sense to say that features defined from
patterns are generated features. Many domain-specific ways for defining
features also belong in the feature generation category. Sometimes the
term feature extraction is used for feature generation.
(3) Feature selection is about selecting a small set of features from a very
large pool of features. The reduced feature set size makes it computa-
tionally feasible to use certain algorithms. Feature selection may also
lead to improved quality on the result of those algorithms.

(4) Feature analysis and evaluation is about concepts, methods, and mea-
sures for evaluating the usefulness of features and feature sets. This is
often included as part of feature selection.
(5) General automatic feature engineering methodology is about generic ap-
proaches for automatically generating a large number of features and
selecting an effective subset of the generated features.
(6) Feature engineering applications involve feature engineering but the fo-
cus is to solve some other data analytic tasks in specific contexts. Ex-
amples include analyzing Twitter data to improve the quality of disaster
response and relief efforts.

1.1.3 Machine Learning and Data Analytic Tasks


Generally speaking, all machine learning, data mining, and data analytic
tasks rely on and can benefit from effective feature engineering. Specific tasks
include classification, regression, clustering, outlier detection, pattern/rule
4 Feature Engineering for Machine Learning and Data Analytics

mining, predictive modeling, contrasting and characterizing data classes, con-


cept discovery, distance learning, probability estimation, ontology/taxonomy
construction, information retrieval, business intelligence, and so on. Below we
provide basic concepts for some of these tasks. More information can be found
in textbooks on machine learning and data mining such as [6, 7, 26, 30].
Classification is the task of learning a function f that maps each data
object x to one member of some given set of predefined class labels y. The
resulting function f is often referred to as a classification model. For a given
application, the learning of a classification model is achieved by applying some
method to a training dataset, namely a set of (x, y) pairs where x is a data
object and y is a class label.
Regression is similar to classification except that y is a numerical attribute
instead of a class label.
Clustering is the task of partitioning a given dataset D into a number
of subsets (the clusters) so that the objects within a cluster are highly sim-
ilar to each other and objects in different clusters are highly different from
each other. Similarity is often measured using a distance function, but other
approaches also exist. Clustering is also referred to as segmentation and as
concept discovery.
Outlier detection (also called anomaly detection) is the task of identifying
objects that do not conform to an expected pattern exhibited by the majority
of objects in a given dataset.
Pattern mining is the task of identifying patterns that are interesting in
some sense. A pattern can be viewed as a condition of individual objects that
can be evaluated as true or false. The pattern mining process can be applied
to one dataset, in which case one wants to mine interesting frequent patterns;
it can also be applied to multiple datasets (e.g., classes), in which case one
wants to mine interesting patterns that distinguish one of the datasets from
the other datasets.

1.2 Overview of the Chapters


This book has three parts, together with this introductory chapter. Part
1 consists of six chapters (2 to 7) on feature engineering for various data
types. Part 2 contains four chapters (8 to 11) on general feature engineering
techniques which are not specific to data types. Part 3 includes three chapters
(12 to 14) on feature engineering in special applications.
Chapter 2 provides a systematic review of the main techniques for feature
representations for text data. Text data can be regarded as data reported by
human sensors, which are supplementary to data collected by physical sen-
sors. Text data are useful in many applications especially for supporting de-
cision making and analyzing people’s opinions and preferences. This chapter
Preliminaries and Overview 5

discusses (a) the dominant bag of words–based text representation, (b) ap-
proaches that use multiple words as features, and (c) structural features that
require natural language processing techniques or statistical pattern analysis
methods. It further describes how to learn latent semantic representations us-
ing methods such as probabilistic topic models and neural networks, and how
text data can be analyzed together with non-textual context data to extract
contextualized text representations.
A majority of visual computing tasks involve prediction, regression or deci-
sion making using features extracted from the original, raw visual data (images
or videos). Chapter 3 presents a hierarchy of feature representations for im-
age data, starting with classic, hand-crafted features. The classic features are
designed by human experts and they are based on task-specific prior knowl-
edge. They are easily interpretable and characterize fundamental aspects of
images such as color, texture and shape. The features at the next level are
latent feature representations. Such features represent task-specific structures
in the feature space such as sparsity, decorrelation of reduced dimension, low
rank, etc.
Time series is an important type of data that are frequently encountered
in data analytics. Chapter 4 provides an overview of a vast literature of rep-
resentations and analysis methods for time series. It first presents discussion
on global distances between time-series values including Euclidean and elastic
distance measures like DTW. It then discusses three kinds of features, namely
subsequences that provide more localized shape-based information, global fea-
tures that capture higher order structure, and interval features that capture
discriminative properties in time-series subsequences. It also discusses factors
that influence the selection of the most useful method for a given task.
Chapter 5 provides an overview of feature engineering for streaming data,
with a focus on streaming feature construction and selection. It first summa-
rizes the typical streaming settings and their corresponding formal defini-
tions. Then it reviews automated feature construction algorithms including
linear and non-linear methods. Next it gives an overview of feature selection
algorithms with different streaming settings. Finally it discusses some open
questions and possible research directions about feature engineering for data
streams.
Sequence data occur in many applications including bioinformatics, mu-
sic, literature, health care, and security. Chapter 6 first discusses the basic
concepts for sequence data. It then discusses three major classes of sequence
features, namely traditional pattern-based sequence features, general pattern-
based features, and sequence features that do not involve the use of patterns. It
presents several approaches for using sequence patterns as sequence features,
and it provides an overview of sequence pattern types as well as methods to
mine such patterns. It also considers factors that are important for selecting
patterns as features.
Graph and network data are essential for various graph analysis tasks
such as social network analysis, protein–protein interaction analysis, and
6 Feature Engineering for Machine Learning and Data Analytics

chemical molecule toxicity analysis. Chapter 7 focuses on feature genera-


tion for graphs and networks. It first discusses the feature types for graphs,
including neighborhood-level features and global-level features. Next, it de-
scribes existing feature generation methods, divided into feature extraction
approaches and feature learning approaches. Finally, it presents several ap-
plications to illustrate graph feature usages, including the applications of
multi-label classification on nodes, link prediction, anomaly detection, and
visualization.
Feature selection is one of the key problems for machine learning and data
mining. Chapter 8 reviews recent developments on this topic. A brief histor-
ical background of the field is given, followed by a selection of topics which
are of particular current interests, such as stable feature selection, multi-view
feature selection, distributed feature selection, multi-label feature selection,
online feature selection and adversarial feature selection. The chapter then
reviews recent research advances of these topics.
The process of predictive modeling requires extensive feature engineering.
It often involves the transformation of a given feature space, typically using
mathematical functions, with the objective of reducing the modeling error for
a given target. However, there is no well-defined basis for performing effec-
tive feature engineering. It involves domain knowledge, intuition, and most
of all, a lengthy process of trial and error. The human attention involved in
overseeing this process significantly influences the cost of model generation.
Moreover, when the data presented is not well described and labeled, effective
manual feature engineering becomes an even more prohibitive task. Chapter
9 discusses ways to algorithmically tackle the problem of feature engineering
using transformation functions in the context of supervised learning.
Frequent patterns are combinations of conditions on features that have
a high frequency of co-occurrence, which can represent interesting interac-
tion relationships among features in a given dataset. Features generated using
patterns can be more discriminative than individual features. Chapter 10
provides a systematic overview on pattern-based feature generation. Specifi-
cally, it presents approaches for generating patterns, techniques for pruning
large pattern sets, strategies for constructing new features using patterns, and
applications of pattern-based feature generation for classification and cluster-
ing.
Deep learning methods have become increasingly popular in recent years
because of their tremendous success in image classification, speech recognition
and natural language processing tasks. The great success of deep learning
mainly comes from specially designed structures of deep nets, which are able
to learn discriminative non-linear features that can facilitate the task at hand.
In essence, the majority of existing deep learning algorithms can be used as
powerful feature learning/extraction tools, i.e., the latent features extracted
by deep learning algorithms are the learned new representations. Chapter 11
reviews various classical and popular deep learning algorithms and explains
how they can be used for feature representation learning. It also discusses
Preliminaries and Overview 7

how they are used for hierarchical and disentangle representation learning,
and how they can be applied for various domains.
Increasing evidence suggests that social platforms like Twitter accommo-
date an increasing number of autonomous entities known as social bots, which
are controlled by software that generates content and establishes interactions
with other accounts. Chapter 12 considers feature engineering for social bot
detection in the context of social media. It describes the setting of such de-
tection, and it presents various kinds of features, some of which are unique
for social media, including their definition, selection, and usefulness for social
bot detection. It also describes a system called Botometer that analyzes pub-
lic information about a Twitter account, extracting over a thousand features
describing the account and its neighbors, and discusses experiments where the
extracted features were used to build classifiers for bot detection.
Chapter 13 considers feature generation and engineering for software
analytics. It shows how domain-specific features can be designed and used
to automate three software engineering tasks: (1) detecting defective software
modules, (2) identifying a crashing mobile app release, and (3) predicting who
will leave a software team. For each task, different sets of features are extracted
from a diverse set of software artifacts, and used to build predictive models.
The chapter also discusses recent advances as well as their potential.
Chapter 14 presents studies concerning feature engineering for Twitter-
based applications. It first discusses how Twitter data can be downloaded
from the Twitter Application Programming Interface (API) and the kinds of
data available in the downloaded tweets. Then, it discusses various textual
features, image and video features, Twitter metadata-related features, and
network features that can be extracted. Next, it discusses the uses of different
feature types along with an analysis of why certain features perform well
in the context of informal short text messages typically found in tweets. It
then presents five real-world Twitter applications that utilize different feature
types. For each application, it also highlights the features that perform well
in the corresponding application setting. Finally, it concludes the chapter by
discussing Twitris, a real-time semantic social web analytics platform that has
already been commercialized, and its use of Twitter features.

1.3 Beyond this Book


No single book can give due attention to the rich variety of topics of fea-
ture engineering. This section provides some pointers to topics not covered in
other parts of the book. It includes topics on speech features, music features,
malware detection data features, log data features, transfer learning–based
feature engineering, numerical feature discretization, feature engineering in-
side machine learning and data analytic algorithms, and early papers and
8 Feature Engineering for Machine Learning and Data Analytics

books on feature engineering. Due to the broadness of the feature engineering


field, this chapter is certainly not complete.

1.3.1 Feature Engineering for Specific Data Types


There have been numerous studies on speech feature generation (e.g.,
[11,22]), often conducted as part of speech recognition (see [20]). Reference [28]
gives an account of acoustic features used for emotional speech recognition;
these features include the pitch, the formants, the vocal-tract cross-section ar-
eas, the mel-frequency cepstral coefficients, the Teager energy operator-based
features, the intensity of the speech signal, and the speech rate.
Music data mining and analysis have attracted a lot of attention [13, 29],
whose tasks include genre classification, emotion and mood detection [25],
instrument detection, and music characteristic identification. Within a piece
of music one may be interested in analyzing emotion or mood differences
between different parts [12], and finding repeating patterns [8]. Music data
is quite complex, as it includes an acoustic part (pitch, intensity, etc.), a
music score part, and a text part (the lyrics). Music data can be treated as
large sequences, although the alphabet of the sequences is quite large and
different elements are related to each other in significant ways, and one needs
to consider issues such as the handling of several concurrent sequences for
each of the acoustic, music score and lyrics parts. Music data and speech data
are also related. Chapter 4 on time series analysis and Chapter 6 on sequence
feature engineering are related to music data analysis.
Analyzing executable codes to detect malware is an important problem.
Several types of static features were used in [23], namely DLL-related features,
system call features, and string/sequence features. The DLL-related features
include the DLLs contained in the binary code, the DLL function calls, and
the number of different system calls used within each DLL. Function length
features were used for malware classification in [27], and network behavior
features were used in [18]. Reference [5] gives a survey of malware classification.
Another kind of data with distinct characteristics is the execution and net-
work navigation log data. An example is network intrusion data such as the
1999 KDD Cup dataset [10]. This KDD Cup dataset contains logs (raw TCP
dump data) collected from a typical LAN. Reference [9] discusses generat-
ing and selecting features for this dataset; it considered four types of features,
namely basic features (e.g., those derived from packet headers without inspect-
ing the payload), content features, time-based traffic features, and host-based
traffic features.
Analyzing game-related data can be useful in several ways, including un-
derstanding human behavior, designing winning game playing strategies, and
improving game designs. However, game-play data lack structure and has big
volumes. Reference [1] discusses issues related to feature generation and se-
lection for game-play data.
Preliminaries and Overview 9

1.3.2 Feature Engineering on Non-Data-Specific Topics


Transfer learning can be used to find effective features for a new dataset
from another dataset, although algorithms in this field are often originally
designed for other data analytic tasks such as classification and clustering.
Transfer learning can also help avoid much expensive data labeling efforts.
Transfer learning can also mine similar structures such as shared decision
trees [3]. For a survey, see [19].
Feature discretization (also called binning) of numerical data is useful
for feature transformation and feature generation, and sometimes feature se-
lection. Feature discretization is about constructing informative categorical
representations of numerical features so that the categorical values retain as
much information in the original numerical values as possible. Representa-
tive research includes [4, 15]. Reference [21] is a recent a survey on feature
discretization. This is still an active field of research [17, 24].
Implicit feature generation/transformation is often a part of machine learn-
ing and data mining algorithms aimed at solving specific problems. Often new
features are automatically constructed and selected for use in machine learn-
ing systems such as deep learning (see Chapter 11). Also, meta classification
uses predicted values of other classifiers as features [14].
Reference [16] is an early book that was devoted to several aspects of fea-
ture engineering. It contains chapters on feature selection, feature extraction,
and feature construction. For example, it includes chapters on feature extrac-
tion using adaptive wavelets and using neural networks, feature transformation
by function decomposition, and automatic fractal feature extraction for image
recognition. This current book is more complete and more up to date; it covers
a wider range of topics and techniques for feature engineering, and it includes
many hand-crafted domain-specific feature generation techniques.

Bibliography
[1] Alessandro Canossa. Meaning in gameplay: Filtering variables, defining
metrics, extracting features and creating models for gameplay analysis.
In Game Analytics, pages 255–283. Springer, 2013.
[2] Pedro Domingos. A few useful things to know about machine learning.
Communications of the ACM, 55(10):78–87, 2012.
[3] Guozhu Dong and Qian Han. Mining accurate shared decision trees from
microarray gene expression data for different cancers. In Proceedings of
the International Conference on Bioinformatics & Computational Biology
(BIOCOMP), 2013.
10 Feature Engineering for Machine Learning and Data Analytics

[4] Usama Fayyad and Keki Irani. Multi-interval discretization of


continuous-valued attributes for classification learning. In Proceedings
of the 13th International Joint Conference on Artificial Intelligence (IJ-
CAI), pages 1022–1029, 1993.
[5] Ekta Gandotra, Divya Bansal, and Sanjeev Sofat. Malware analysis and
classification: A survey. Journal of Information Security, 5(02):56, 2014.
[6] Jiawei Han, Jian Pei, and Micheline Kamber. Data Mining: Concepts and
Techniques. Elsevier, 2011.
[7] David J Hand, Heikki Mannila, and Padhraic Smyth. Principles of Data
Mining. MIT Press, 2001.
[8] Jia-Lien Hsu, Arbee LP Chen, and C-C Liu. Efficient repeating pattern
finding in music databases. In Proceedings of the Seventh International
Conference on Information and Knowledge Management, pages 281–288.
ACM, 1998.
[9] H Günes Kayacik, A Nur Zincir-Heywood, and Malcolm I Heywood. Se-
lecting features for intrusion detection: A feature relevance analysis on
KDD 99 intrusion detection datasets. In Proceedings of the Third Annual
Conference on Privacy, Security and Trust, 2005.
[10] KDD Cup. 1999. http://kdd.ics.uci.edu/databases/kddcup99
[11] Yelin Kim, Honglak Lee, and Emily Mower Provost. Deep learning
for robust feature generation in audiovisual emotion recognition. In
IEEE International Conference on Acoustics, Speech and Signal Process-
ing (ICASSP), pages 3687–3691. IEEE, 2013.
[12] Hua-Fu Li. Memsa: Mining emerging melody structures from music query
data. Multimedia Systems, 17(3):237–245, 2011.
[13] Tao Li, Mitsunori Ogihara, and George Tzanetakis. Music Data Mining.
CRC Press, 2011.
[14] Wei-Hao Lin and Alexander Hauptmann. News video classification using
SVM-based multimodal classifiers and combination strategies. In Proceed-
ings of the Tenth ACM International Conference on Multimedia, pages
323–326. ACM, 2002.
[15] Huan Liu, Farhad Hussain, Chew Lim Tan, and Manoranjan Dash. Dis-
cretization: An enabling technique. Data Mining and Knowledge Discov-
ery, 6(4):393–423, 2002.
[16] Huan Liu and Hiroshi Motoda. Feature Extraction, Construction and
Selection: A Data Mining Perspective, volume 453. Springer Science &
Business Media, 1998.
Other documents randomly have
different content
"Mutta nuo kaksi harhalaukausta minua harmittavat", valitti tyttö.
"Ja pistoolinne on mainion tarkkakäyntinen. Jos annatte minulle
uudet panokset, niin lupaan varmasti osata maaliin kahdeksan
kertaa."

"Sitä en epäile. Mutta nyt minun täytyy hankkia uusi nostokiekko.


Viaburi! Tänne hoi, — tuo varastosta yksi plokki."

"Minä löisin vetoa siitä, että te ette osaisi kahdeksaa kertaa


kahdeksasta", sanoi Joan ylpeästi.

"Siihen vedonlyöntiin minä varon suostumasta", vastasi Sheldon.


"Kuka on opettanut teitä ampumaan?"

"Isäni ensin ja sitten Von ja hänen cowboynsa. Isä vasta osasi


ampua, mutta kyllä Vonkin oli aika taitava."

Sheldon tuumi mielessään, kuka tuo Von mahtoi olla — oliko ehkä
juuri hän kaksi vuotta takaperin saanut Joanin vakuutetuksi siitä,
että hänen oli parasta mennä naimisiin.

"Mistä osasta Yhdysvaltoja te olette kotoisin?" kysyi hän.


"Chicagostako vai Wyomingista vai jostakin sieltäpäin. Muistakaa,
ettette ole hiiskunut minulle mitään itsestänne. En tiedä muuta kuin
että te olette miss Joan Lackland kotoisin ties mistä."

"Saatte mennä kauemmaksi länteen, jos tahdotte löytää minun


kotiseutuni."

"Ahaa — malttakaahan! Nevada?"

Tyttö pudisti päätään.


"Kalifornia?"

"Vielä kauemmaksi länteen!"

"Sehän on mahdotonta, ellen ole kokonaan unohtanut


maantietoani."

"Politiikan te näytte unohtaneen", nauroi Joan. "Ettekö muista,


että on olemassa jotakin mitä sanotaan alusmaiksi?"

"Filippiinit!" huudahti Sheldon voitonriemuisesta

"Ei, vaan Hawaii. Siellä olen syntynyt. Se on kaunis maa. Taivas,


minullahan on jo melkein koti-ikävä! Eipä siksi, etten olisi ennen ollut
poissa sieltä. Olin New Yorkissa romahduksen sattuessa. Mutta se on
minusta ihanin paikka maailmassa — Hawaii nimittäin."

"Mutta mitä taivaan nimessä teillä sitten on tekemistä tässä Herran


hylkäämässä paikassa?" kysyi Sheldon. "Tännehän tulevat vain
hullut", lisäsi hän katkerasti.

"Mutta ei kai Nielsen ollut mikään hullu?" kysyi tyttö. "Minun


ymmärtääkseni hän kokosi täällä kolme miljoonaa."

"Tuo on aivan totta, valitettavasti, sillä juuri sen takia minä olen
täällä."

"Niin minäkin", virkkoi tyttö. "Isä kuuli hänestä puhuttavan


Marquesas-saarilla, ja niin me lähdimme matkaan. Mutta isä-raukka
ei koskaan päässyt tänne asti."

"Hän — isänne — siis kuoli?" kysyi Sheldon hiljaa.


Joan nyökäytti päätään; hänen silmänsä kostuivat ja saivat
lempeän ilmeen.

"Voinhan oikeastaan aloittaa alusta." Hän kohotti ylpeästi päätään,


ikäänkuin olisi tällä liikkeellä karkoittanut surumielisyytensä, — aivan
niinkuin sopi odottaakin naiselta, jolla oli Baden-Powell-hattu ja
pitkäpiippuinen revolveri. "Olen syntynyt Hilossa Hawaii-saarella,
joka on suurin ja paras koko ryhmästä. Sain saman kasvatuksen kuin
useimmat muut Hawaiin tytöt. He viettävät ulkoilmaelämää ja
osaavat ratsastaa ja uida, ennenkuin tietävät, mitä kuusi kertaa
kuusi on. Mitä minuun itseeni tulee, en voi muistaa, milloin ensi
kerran nousin hevosen selkään tai milloin opin uimaan. Ainakaan en
silloin vielä osannut aakkosia. Isä omisti karjatiloja Hawaiilla ja
Mauilla — aika suuria saarien oloihin nähden. Hokuna yksin käsitti
kaksisataatuhatta acrea. Se sijaitsi Mauna Kean ja Mauna Loan
välillä, ja siellä minä opin ampumaan kauriita ja metsän eläimiä.
Molokailla on isoja, täplikkäitä hirviä. Von oli Hokunan tilanhoitaja.
Hänellä oli kaksi tytärtä, jotka olivat jotakuinkin minun ikäisiäni. Ja
minä vietin aina kuuman vuodenajan siellä — kerran olin siellä koko
vuoden. Me kolme tyttöä elimme kuin intiaanit. Emmehän me tosin
saaneet metsistyä aivan kokonaan, mutta kyllä me panimme
parastamme metsistyäksemme niin paljon kuin mahdollista. Ainahan
meillä oli siellä kotiopettajattaria ja läksyjä ja ompelemista ja
taloustehtäviä ja kaikkea muuta sellaista, mutta pelkäänpä, että
meitä useimmiten täytyi houkutella työhön lupaamalla meille hevosia
ja ajeluretkiä.

"Von oli ollut sotaväessä, ja isä oli vanha merikarhu, ja molemmat


vaativat ankaraa kuria. Mutta Vonin tytöillä ei ollut äitiä eikä minulla
myöskään — ja ukothan olivat miehiä. He hemmoittelivat meitä
aivan kauheasti. Näettekö, heillä ei ollut vaimoja, ja siksi he aina
seurustelivat meidän kanssamme, kun olimme lopettaneet työmme.
Meidän piti oppia kaikki, mikä koski talon hoitoa, kahta vertaa
paremmin kuin palvelijoitten — he olivat alkuasukkaita — jotta
kerran kykenisimme ottamaan ohjakset käsiimme. Ja meidän piti
aina sekoittaa heidän cocktailinsa, se toimitus oli liian pyhä, jotta sitä
olisi voinut uskoa palvelijalle. Me emme koskaan saaneet tehdä
mitään, mistä emme olisi suoriutuneet omin neuvoin. Tietysti
cowboyt aina ottivat kiinni ja satuloivat meidän hevosemme, mutta
meidän täytyi itse osata mennä hevoshakaan ja ottaa hevoset…"

"Kuinka se tapahtui?" kysyi Sheldon.

"Me otimme ne kiinni lassolla. Ja isä ja Von opettivat meitä


satuloimaan ja olivat hyvin ankaria arvosteluissaan. Samoin oli
revolveriemme ja pyssyjemme laita. Palvelijat puhdistivat ja voitelivat
ne aina, mutta meidän täytyi oppia, miten se oli tehtävä,
voidaksemme valvoa, että he tekivät sen huolellisesti. Alussa sattui
usein, että joltakulta meistä otettiin pyssy viikoksi pois; vain pienen
ruostetahran takia. Meidän piti oppia sytyttämään valkea
rankkasateessa, vieläpä märistä puista, kun retkillämme pystytimme
teltan yöksi, jaa se oli vaikeinta kaikesta — lukuunottamatta
kielioppia luullakseni. Kyllä me opimme enemmän isältä ja Vonilta
kuin opettajattariltamme. Isä opetti meille ranskaa ja Von saksaa. Me
opimme molemmat kielet jotakuinkin hyvin ja yksinomaan hevosen
selässä tai asustaessamme teltassamme.

"Kylmänä vuodenaikana tytöillä oli tapana tulla Hiloon minua


tervehtimään. Siellä isällä oli kaksi taloa, toinen niistä meren
rannalla. Tai sitten me kaikki kolme matkustimme maatilallemme
Punaan, ja siellä oli kanootteja ja veneitä ja siellä kalastettiin ja
uitiin. Isä oli myöskin Hawaiin kuninkaallisen purjehdusseuran jäsen,
ja hän otti meidät mukaan kilpapurjehduksille ja pitkille retkille.
Katsokaas, isä ei koskaan lakannut rakastamasta merta. Ollessani
neljätoista vuotta vanha minä hoidin isäni taloutta, ja palvelijat olivat
kokonaan minun käskettävinäni. Olen hyvin ylpeä tuosta ajasta. Ja
kun olin täyttänyt kuusitoista, lähetettiin meidät kaikki kolme tyttöä
Kaliforniaan, Millin naisopistoon, jossa kaikki oli hyvin hienoa ja
tukehduttavaa. Kuinka me ikävöimmekään kotiin! Emme tulleet
ensinkään hyviksi ystäviksi muiden tyttöjen kanssa, jotka nimittivät
meitä ihmissyöjänaluiksi sen vuoksi, että olimme kotoisin Sandwich-
saarilta, ja tekivät vastenmielisiä viittauksia sinnepäin, että meidän
esi-isämme muka olivat herkutelleet kapteeni Cookin ruumiilla. Koko
juttuhan on epähistoriallinen, ja sitäpaitsihan meidän esi-isämme
eivät edes eläneet Hawaiilla.

"Kolme vuotta olin Millin opistossa — silloin tällöin kävin tietysti


kotona — ja kaksi vuotta New Yorkissa. Sitten isä menetti
omaisuutensa, muuan sokeriviljelys Maui'lla vei hänet vararikkoon.
Insinöörien tiedonannot eivät olleet pitäneet paikkaansa. Sitäpaitsi
isä oli rakentanut rautatien, jota sanottiin 'Lacklandin hullutukseksi'
— mutta uskokaa pois, kyllä se lopulta tulee kannattavaksi. Mutta
nyt sekin osaltaan vaikutti romahdukseen, Pelaulau Ditch antoi
lopullisen sysäyksen. Mutta sittenkään ei olisi tapahtunut mitään,
ellei olisi tullut tuota suurta paniikkia Wall Streetillä. Minun rakas,
hyvä isäukkoni! Hän ei hiiskunut minulle sanaakaan. Mutta minä luin
sanomalehdestä vararikosta ja lähdin heti kotiin. Siihen asti ihmiset
olivat minulle toitotelleet, että avioliitto oli ainoa onni, jonka nainen
voi saavuttaa tässä elämässä. Romantiikalle siinä siis ei ollut sijaa.
Mutta isän vararikko vei minut suoraa tietä romantiikan maailmaan."

"Milloin tuo tapahtui?" kysyi Sheldon.


"Viime vuonna — suuren pörssipaniikin vuonna."

"Odottakaahan!" Sheldon mietti jotakin mielessään hyvin vakavan


näköisenä. "Kuusitoista ja viisi, siihen yksi tekee
kaksikymmentäkaksi. Te olette syntynyt vuonna 1887?"

"Niin olenkin, mutta tuo ei ollut kohteliasta."

"Olen todella pahoillani", sanoi Sheldon, "mutta tuo kysymys tuli


aivan itsestään."

"Ettekö te koskaan osaa sanoa mitään miellyttävää? Vai onko tuo


teidän englantilaisten tavallinen tapa?" Tytön harmaisiin silmiin tuli
veitikkamainen ilme ja hänen huulensa vapisivat hetkisen. "Minä
suosittelen teille, mr Sheldon, luettavaksi Gertrude Athertonin kirjaa
Amerikkalaiset vaimot ja englantilaiset aviomiehet."

"Kiitos, olen lukenut sen. Se on minulla tuolla." Hän osoitti hyvin


varustettua kirjahyllyään. "Mutta pelkään, että se on jotenkin
puolueellinen."

"Kaikki, mikä ei ole englantilaista, on tietysti puolueellista", vastasi


tyttö. "Minä en ole koskaan pitänyt englantilaisista. Viimeinen, jonka
opin tuntemaan, oli eräs työnjohtaja. Isän piti panna hänet viralta."

"Ei yksi kiuru kesää tee."

"Mutta siitä englantilaisesta oli meille ikävyyksiä aivan


loppumattomiin — no niin! Ja olkaa nyt kiltti älkääkä tehkö minua
vielä sietämättömämmäksi kuin jo olen."

"Koetan olla varuillani."


"Mitä siihen tulee, niin —" Tyttö keikautti päätään taaksepäin,
avasi suunsa lopettaakseen aloittamansa nuhdesaarnan, mutta
muutti mieltään. "No niin, minä jatkan kertomustani. Isälle ei
oikeastaan jäänyt mitään, ja hän päätti palata merelle. Hän ei ollut
koskaan lakannut rakastamasta sitä, ja minä puolittain luulen, että
hän iloitsi siitä, että kävi niinkuin kävi. Hän oli iloinen kuin nuori
poika, pää täynnä tuumia ja valmisteluja aamusta iltaan. Hänellä oli
tapana valvoa puoliyöhön ja keskustella minun kanssani kaikesta.
Senjälkeen nimittäin kuin olin hänelle sanonut, että olin varmasti
päättänyt seurata häntä.

"Hän oli aloittanut uransa Etelämerellä — pyydystänyt helmiä ja


helmiäisiä — ja uskoi varmasti, että sieltä vieläkin voisi haalia kokoon
rikkauksia. Kookosviljelys häntä erikoisesti houkutteli, ja kunnes
plantaasi alkaisi tuottaa hedelmiä hän aikoi harjoittaa kauppaa,
helmenpyyntiä ja ehkä jotain muutakin. Hän möi huvipurtensa ja osti
kuunarin nimeltä 'Miele', ja niin me lähdimme matkaan. Minä pidin
isästä huolta ja opiskelin merenkulkuoppia. Isä oli oma laivurinsa.
Perämies oli tanskalainen, mr Ericsen, miehistö japanilaisia ja
hawaiilaisia. Me kuljimme ensin edestakaisin Linjasaarten seutuvilla,
kunnes se alkoi liiaksi koskea isään. Kaikki oli toisin kuin ennen.
Saaret oli vallattu ja jaettu eri valtojen kesken, suuret yhtiöt olivat
asettuneet sinne ja haalineet itselleen maat, kauppaoikeudet,
kalastusoikeudet, sanalla sanoen kaiken.

"Sitten me purjehdimme Marquesas-saarille. Siellä oli kaunista,


mutta alkuasukkaat olivat melkein sukupuuttoon kuolleet. Isä oli
aivan vimmoissaan kuullessaan, että ranskalaiset olivat määränneet
vientitullin kopralle — hänestä se oli keskiaikaista — mutta maahan
hän oli ihastunut. Siellä oli Nukanivalla viidentoistatuhannen acren
laajuinen laakso, joka kolmelta puolelta ympäröi oivallista
ankkuripaikkaa. Siihen hän rakastui ja osti sen kahdellatoistasadalla
Chilen dollarilla. Mutta Ranskalle maksettavat verot olivat aivan
peloittavat — siksipä maa olikin niin halpaa — ja, mikä oli pahinta
kaikesta, meidän oli mahdotonta saada työväkeä. Kanakit eivät
tahtoneet tehdä mitään, ja virkamiehet tuntuivat istuvan yökaudet
tuumimassa, mitä uusia vastuksia he voisivat keksiä meidän
tiellemme.

"Kuudessa kuukaudessa isä sai siitä kyllikseen. Tilanne oli


toivoton. 'Lähtekäämme Salomonin-saarille', hän sanoi, 'että
saamme nähdä, kuinka Englanti hallitsee. Ja ellei meillä sielläkään
ole menestymisen mahdollisuuksia, niin jatkamme matkaa
Bismarckin-saaristoon. Lyönpä vetoa siitä, ettei sivistys vielä ole
ehtinyt valloittaa Amiraliteetti-saaria. Kaikki oli valmiina, tavarat
laivaan lastattuina, uusi miehistö — marquesaslaisia ja tahitilaisia —
paikoillaan. Olimme juuri lähtemäisillämme Tahitiin, sillä 'Miele' oli
hiukan korjauksen ja uudistusten tarpeessa, kun isä-raukkani äkkiä
sairastui ja kuoli."

"Ja te jäitte aivan yksin maailmaan?"

Joan nyökäytti päätään.

"Hyvin, hyvin yksin. Minulla ei ollut veljiä eikä sisaria, ja isän kaikki
omaiset olivat saaneet surmansa eräässä hirmumyrskyssä
Kansasissa. Isä oli silloin ollut aivan pieni poika. Olisinhan minä
tietysti voinut palata Vonin luo. Sinne olen milloin tahansa tervetullut
kuin omaan kotiini. Mutta miksi olisin mennyt sinne? Sitäpaitsihan isä
oli uskonut minulle suunnitelmansa, ja minusta tuntui siltä, kuin se
olisi velvoittanut minut toteuttamaan ne. Se oli minusta suuri
tehtävä. Ja minun teki mieli toteuttaa ne. Ja — niin, täällä minä nyt
olen.
"Älkää koskaan menkö Tahitille, sen neuvon annan teille. Paikka
on hurmaava ja alkuasukkaat mukavia. Mutta valkoihoiset! Varkaita,
rosvoja, valehtelijoita jok'ikinen! Rehellisiä miehiä ei ole niin monta,
että tarvittaisiin viisi sormea niiden laskemiseen. Se seikka, että minä
olin nainen, teki kaiken heille vain yksinkertaisemmaksi. He
rosvosivat minulta kaiken omaisuuteni senkin seitsemänlaisten
tekosyitten nojalla ja valehtelivat ilmankin tekosyytä, joko se sitten
oli tarpeellista tai ei. Mr Ericsen-raukan he saivat lahjotuksi. Hän
antautui rosvojen palvelukseen ja todisti kaikki heidän laskunsa
oikeiksi, vaikka ne olisivat olleet tuhannen prosenttia liian suuret.
Kun he puijasivat minulta kymmenen frangia, niin niistä tuli kolme
hänen osalleen. Kun maksoin viidentoistasadan frangin laskun, niin
se tuotti hänelle viisisataa. Kaiken tämän sain tietysti kuulla
jäljestäpäin. Mutta 'Miele' oli vanha alus, korjaukset olivat tarpeen, ja
minä sain maksaa seitsenkertaisen hinnan.

"En tietysti koskaan saa tietää, kuinka paljon Ericsen ansaitsi. Hän
oli asettunut asumaan maihin, hienosti kalustettuun taloon.
Laivanrakentajat olivat luovuttaneet sen hänelle vuokratta. Hedelmiä,
vihanneksia, kalaa, lihaa ja jäitä tuotiin hänelle joka päivä, eikä
hänen tarvinnut maksaa mitään. Kauppiaat suorittivat hänelle osan
sovitusta palkasta siinä muodossa. Ja koko ajan hän kyynelsilmin
valitteli, että minä olin joutunut niin kurjan kohtelun uhriksi. Ei, minä
en ollut tullut ammattivarkaitten pesään, olin vain tullut Tahitille.

"Mutta kun varkaat sitten joutuivat riitaan keskenään, niin aloin


saada vihiä asiain tilasta. Eräs noista petkutetuista petkuttajista tuli
pimeän tultua minun luokseni ja kertoi tosiasioita, näytti numeroita
ja vakuuttavia todistuksia. Tiesin, että oikeuteen vetoaminen olisi
vienyt minulta loputkin omaisuudestani. Tuomarit ottivat vastaan
lahjoja niinkuin kaikki muutkin. Mutta aivan toimettomana en
sentään antanut kaiken tapahtua. Eräänä pimeänä yönä menin
Ericsenin asuntoon. Minulla oli sama revolveri, joka minulla on
täälläkin, ja pakotin hänet pysymään vuoteessaan sen aikaa, kun
tein kotitarkastuksen. Hiukan yli yhdeksäntoistatuhatta frangia vein
sieltä mennessäni. Hän ei koskaan valittanut poliisille eikä palannut
laivaan. Muut rosvot vain nauroivat minulle ja tekivät minusta
pilkkaa. Siellä oli pari amerikkalaista, ja he neuvoivat minua olemaan
ryhtymättä oikeudenkäyntiin, ellen tahtonut jättää laivaanikin
rosvoille.

"Sitten minä hankin saksalaisen perämiehen Uudesta-Seelannista.


Hänellä oli kapteenin todistukset ja häntä puhuteltiin sillä nimellä,
mutta minä ymmärsin merenkulkua paremmin kuin hän ja
oikeastaan minä itse olinkin kapteenina. Menetin kuitenkin laivani,
mutta sillä asialla ei ollut mitään tekemistä minun kykyni kanssa.
Olimme ajelehtineet neljä päivää rasvatyynellä ulapalla. Sitten tuli
luoteismyrsky, ja se ajoi meidät rantaan suojanpuolelle. Yritimme
purjehtien päästä selville vesille, mutta silloin tahitilaisten
laivanrakentatajien kurja työ tuli ilmi. Menetimme heti
halkaisijapuomin ja kaikki keulataakit. Ainoa pelastuksen keino oli
kääntyä takaisin ja kulkea Floridan ja Ysabelin välisen salmen kautta.
Ja kun olimme hämärissä onnellisesti päässeet siitä ja kartta osoitti
vähintään neljätoista syltä vettä, niin äkkiä törmäsimme
koralliriuttaan. Vanha 'Miele' raukka sai vain yhden kolauksen ja
pääsi sitten irti, mutta sekin oli sille liikaa, ja me ehdimme parahiksi
laskeutua veneeseen, ennenkuin se upposi. Saksalainen perämies
hukkui. Koko yön ajelehdimme merellä ja seuraavana aamuna
keksimme tämän paikan."

"Ja nyt kai te aiotte palata Vonin luo?" kysyi Sheldon.


"En suinkaan. Isä oli aikonut tulla Salomonin-saarille. Minä etsin
sopivan paikan ja hankin itselleni pienen plantaasin. Tiedättekö,
mistä täältäpäin voisi saada hyvää maata halvalla?"

"Kautta pyhän Yrjänän, te olette omituista joukkoa, te yankeet,


todella omituista", sanoi Sheldon. "Tuollaista hurjapäisyyttä en olisi
unissanikaan voinut kuvitella mahdolliseksi."

"Sanokaa mieluummin seikkailuintoa", oikaisi Joan.

"Olette oikeassa — seikkailuintoa juuri. Jos te olisitte astunut


maihin Malaitalle ettekä Guadalcanarille, niin te ja teidän jalosukuiset
tahitilaisenne olisitte jo aikoja sitten joutuneet ihmissyöjien kai-
kaiksi."

Joania värisytti kauhusta.

"Totta puhuen", hän tunnusti, "meitä peloitti kauheasti astua


maihin Guadalcanarille. Minä olin lukenut 'Merenkulku-oppaasta',
että alkuasukkaat ovat epäluotettavia ja nurjamielisiä valkoihoisille.
Minun tekee mieli lähteä Malaitalle jonakuna päivänä. Onko siellä
plantaaseja?"

"Ei ainoatakaan. Eikä yhtään valkoihoista kauppiasta myöskään."

"Sitten minä lähden sinne joskus pestauslaivalla",

"Mahdotonta!" huudahti Sheldon. "Se paikka ei ole naiselle


sopiva."

"Minäpä lähden sittenkin", vastasi Joan.

"Mutta nainen, jolla on vähänkään omanarvontuntoa, ei…"


"Älkäähän jatkako", varoitti tyttö. "Jonakuna päivänä minä lähden
sinne, ja silloin te ehkä saatte katua rumia sanojanne."
VI.

Myrsky.

Sheldon ei koskaan aikaisemmin ollut joutunut läheisiin tekemisiin


nuoren amerikattaren kanssa ja olisi varmaan tuuminut, mahtoivatko
he kaikki olla Joan Lacklandin kaltaisia, ellei olisi ollut kyllin viisas
tajutakseen, ettei tämä suinkaan ollut mikään tyyppi. Tytön vilkkaus
ja vaihtelevat mielialat hämmästyttivät häntä, ja Joanin
elämänkatsomus oli niin täydellisesti erilainen kuin naisen
elämänkatsomuksen tuli Sheldonin käsityksen mukaan olla, että he
useinkin joutuivat keskenään ilmiriitaan. Sheldon ei koskaan voinut
olla edeltäpäin varma siitä, mitä Joan seuraavana hetkenä sanoisi tai
tekisi. Vain yhden seikan hän tiesi, sen nimittäin, että mitä tahansa
hän teki tai sanoi, niin se aivan varmasti oli jotakin odottamatonta ja
ennalta arvaamatonta. Hänen olemuksessaan tuntui olevan jotakin
miltei hysteeristä. Hän oli äkkipikainen ja kuohahtava ja luotti liian
paljon itseensä ja liian vähän Sheldoniin, mikä ei laisinkaan ollut
sopusoinnussa tämän käsityksen kanssa siitä, miten naisen tuli
käyttäytyä miehen ollessa lähettyvillä. Joan piti itseään aivan hänen
vertaisenaan, Ja se kiusasi Sheldonia. Ajoittain tämä oli puolittain
itsetiedottomasti suutuksissaan tytön röyhkeästä ja
ennenkuulumattomasta tunkeutumisesta tänne hänen luokseen.
Hänhän oli noussut suoraan ulvovan luoteistuulen myllertämästä
merestä vast'ikään pidettyään revolveria Ericsenin nenän alla ja
polynesialaisten jättiläistensä turvissa asettunut asumaan Berandelle
niinkuin mikä haaksirikkoutunut merimies tahansa. Kaikki tämä sopi
oivallisesti yhteen Baden-Powell-hatun ja pitkän 38 kaliberin
revolverin kanssa.

Mutta hänen ulkomuotonsa ei vastannut tätä käytöstä. Jos hän


olisi ollut lyhyttukkainen ja leveäleukainen, rakenteeltaan karkea ja
ahavoitunut ja joka suhteessa mahdollisimman epämiellyttävä, niin
ei olisi ollut mitään hätää. Mutta kaiken päällisiksi hän oli
auttamattoman ja viehättävän naisellinen. Hänen hiuksensa melkein
kiusasivat Sheldonia, niin harvinaisen kauniit ne olivat. Ja hän oli niin
solakka ja miellyttävä tuo nainen — tai ehkä oikeammin sanoen tyttö
— että Sheldonin sydäntä särki nähdä hänen terävin, asiantuntevin
katsein ja käskevällä äänellä ohjaavan valaanpyyntivenettä kuohujen
läpi. Hän saattoi mielikuvituksessaan nähdä hänet ottamassa
suopungilla kiinni hevosta, ja tuo ajatus pöyristytti häntä. Ja lisäksi
Joan oli niin monipuolinen. Hänen kirjallisuuden- ja
taiteentuntemuksensa hämmästytti Sheldonia, mutta samalla tämä ei
voinut tukahduttaa syvälle mieleensä juurtunutta tunnetta, että
tytöllä, jolla oli tietoja näiltä aloilta, ei ollut oikeutta omata
kokemuksia taklauksista, ankkurin laskemisesta ja purjehduksesta
Etelämerellä. Nämä ajatukset mielessään hän yhtä hyvin olisi voinut
vaikkapa kiroilla. Ja kun tällainen tyttö itsepäisesti väitti lähtevänsä
pestausretkelle Malaitan rannikkoa pitkin, niin hän unohti sen
kunnioituksen, jonka oli omalle itselleen velkaa.

Sheldon ei voinut olla yhä uudelleen kiinnittämättä huomiota


hänen naisellisuuteensa. Hän soitti pianoa paljon paremmin ja
musikaalisemmin kuin Sheldonin sisaret kotona Englannissa — tuota
soittokonetta, jonka Hughie-raukka sankarillisesti, mistään
vaikeuksista välittämättä, oli hankkinut tänne "pysyäkseen
kunnossa." Ja kun Joan soitteli kitaraa ja lauloi kirkassointuisia,
sametinpehmeitä hawaiilaisia lauluja, niin Sheldon istui ja kuunteli
kuten lumottuna. Silloin Joan oli nainen kiireestä kantapäähän, ja
hänen naisellisuutensa tenhovoima sai Sheldonin unohtamaan kaikki
päivän kiusalliset kohtaukset, ison revolverin, Baden-Powell-hatun ja
kaiken muun. Mutta mitä oikeutta — niin kuiskasi seuraava selvä
ajatus hänen korvaansa — tällaisella tytöllä oli kuljeksia maita ja
meriä kuin mies ja riemuita siitä, että seikkailut eivät olleet
maapallolta kadonneet? Naiset, jotka olivat seikkailuilla, olivat
seikkailijattaria, ja sen nimen kaiku ei ollut hyvä. Ja sitäpaitsi
Sheldon itse ei harrastanut seikkailuja. Ne eivät olleet häntä
viehättäneet sen jälkeen kuin hän oli poika — vaikka vaikeaksipa
hänen olisi käynyt selittää, mikä hänet oli saanut lähtemään
Englannista Salomonin-saarille, ellei juuri seikkailuhalu.

Sheldon ei suinkaan ollut tyytyväinen. Hyvää tapaa loukkaava


tilanne oli liikaa hänen vanhoilliselle luonteelleen, jonka kasvatus oli
tehnyt vieläkin vanhoillisemmaksi. Berande, yksinäisen valkoisen
miehen koti, ei sopinut Joan Lacklandin oleskelupaikaksi. Hän mietti
miettimistään tämän pulman ratkaisua ja puhui asiasta Joaninkin
kanssa, mutta turhaan. Harmillista, että Austraaliasta tuleva
höyrylaivakin oli odotettaessa vasta kolmen viikon kuluttua.

"Yksi asia nyt ainakin on varma, ja se on, että te tahtoisitte saada


minut pois täältä", sanoi tyttö. "Minä miehitän huomenna veneeni ja
lähden Tulagiin."
"Mutta olenhan sanonut teille, että se on mahdotonta", huudahti
Sheldon. "Siellähän ei ole ketään, jonka luo te menisitte. Sikäläinen
asiamies on matkustanut Austraaliaan. Paikalla oli vain yksi valkoinen
mies, kolmas apulainen, entinen merimies, tavallinen merimies, joka
hoitaa Salomonin-saarten hallitusta, puhumattakaan sadasta
neekeristä, jotka ovat siellä vankeina. Ja lisäksi tuo mies on sellainen
hupsu, että hän voisi tuomita teidät viiden punnan sakkoihin siitä,
että ette ensiksi tullut Tulagiin, joka on saariryhmämme varsinainen
satama. Hän ei ole miellyttävä mies, ja minä toistan, että se on
mahdotonta."

"Entä Guvutu sitten?" ehdotti Joan.

Sheldon pudisti päätään.

"Siellä ei ole mitään muuta kuin kuumetta ja viisi valkoista miestä,


jotka juovat itsensä kuoliaaksi. Minä en koskaan antaisi teidän lähteä
sinne."

"Oi kiitos", sanoi tyttö rauhallisesti. "Luulen melkein, että voin


lähteä jo tänään. — Viaburi! Mene Noa-Noan luo ja käske hänen
tulla tänne."

Noa-Noa oli hänen paras miehensä, "Mielen" ylipuosmanni.

"Minne te sitten aiotte lähteä?" kysyi Sheldon ihmeissään. —


"Viaburi, odota!"

"Guvutuun — nyt heti", oli vastaus.

"Mutta minä en salli sitä."


"Siksi minä juuri lähdenkin. Te sanoitte tuon saman kerran
aikaisemmin, ja teidän kieltoanne minä en voi kärsiä."

"Mitä?" Tytön äkillinen suuttumus sai hänet aivan ymmälle. "Jos


olen jotenkin loukannut teitä…"

"Viaburi, hae Noa-Noa tänne", käski Joan uudelleen.

Musta poika lähti liikkeelle aikoen totella.

"Viaburi! Odota, taikka isken kallosi mäsäksi. — Ja nyt minä


vaadin, että te selitätte minulle kaiken, miss Lackland. Mitä minä
olen sanonut tai tehnyt ansaitakseni tämän?"

"Te olette uskaltanut — ollut kyllin röyhkeä…"

Hän oli niin kiihtynyt, ettei voinut jatkaa.

Sheldon oli aivan epätoivoissaan.

"Tunnustan, että olen aivan päästäni pyörällä", sanoi hän. "Kun te


edes voisitte selvin sanoin ilmaista…"

"Yhtä selvin sanoin kuin te annoitte minun tietää, ettette antaisi


minulle lupaa lähteä Guvutuun?"

"Missä suhteessa se sitten oli väärin?"

"Teillä ei ole oikeutta — ei yhdelläkään ihmisellä ole oikeutta —


antaa minulle lupaa tehdä sitä tai tätä. Minä olen liian vanha
tarvitakseni holhoojaa enkä suinkaan purjehtinut Salomonin-saarille
sen vuoksi, että olisin kaivannut suojelijaa."

"Kunnon mies on jokaisen naisen suojelija."


"Mutta minäpä en olekaan mikään 'jokainen nainen' — siinäpä se
onkin. Olkaa hyvä ja antakaa minun lähettää palvelijanne hakemaan
Noa-Noa tänne. Minä käsken hänen laskea veneen vesille. Vai
pitääkö minun mennä itse häntä noutamaan?"

He olivat molemmat nousseet paikoiltaan. Joan hehkuvin poskin ja


silmät suuttumuksesta säihkyen. Sheldon hämmästyksissään,
neuvottomana ja huolestuneena. Musta palvelija seisoi kuin
kuvapatsas välittämättä vähääkään näiden käsittämättömien
valkoihoisten sananvaihdosta. Hän uneksi rauhallinen ilme silmissään
muutamasta Malaitan viidakkorinteillä sijaitsevasta
bushmannikylästä, jonka ruohomajoista sininen savu suikerrellen
nousi ilmaan erottautuen lähestyvän sadekuuron muodostamaa
harmaata taustaa vasten.

"Mutta te ette voi menetellä niin järjettömästi", aloitti Sheldon.

"Joko te nyt taas alatte!" huudahti Joan.

"Minä en tarkoittanut mitään sellaista, ja te tiedätte sen." Sheldon


puhui hitaasti ja vakavasti. "Ja mitä tuohon toiseen asiaan tulee,
siihen nimittäin, että minä en anna teille lupaa, niin sehän oli vain
puheentapa. Tietysti minä en ole teidän holhoojanne. Tiedättehän,
että voitte lähteä Guvutuun, jos mielenne tekee" — "tai vaikka
hiiteen", oli hän vähällä lisätä. "Mutta minua surettaisi, jos tekisitte
sen, siinä kaikki. Olen hyvin pahoillani siitä, että olen loukannut teitä.
Pitäkää mielessänne, että olen englantilainen."

Joan hymyili ja istuutui jälleen.

"Ehkä olen ollut liian kiivas", myönsi hän. "Katsokaahan, minä en


voi kärsiä pakkoa. Jospa tietäisitte, kuinka olen saanut taistella
vapaudestani. Ja kun joku teistä miehistä, jotka itse olette
korottaneet itsenne luomakunnan kruunuiksi, sanoo minulle, mitä
saan ja mitä en saa tehdä, niin se saa minut kiihdyksiin. Se on
minulle arka kohta. — Viaburi, pysy kyökissä. Ei tarvitse hakea Noa-
Noaa! — Ja mr Sheldon, sanokaapa nyt minulle, mitä minun on
tehtävä. Te ette tahdo, että jään tänne, eikä minulla näytä olevan
mahdollisuutta lähteä täältä minnekään."

"Nyt teette minulle vääryyttä. Olihan oikea onnenpotkaus minulle,


että satuitte kärsimään haaksirikon juuri täällä. Olin hyvin yksin ja
hyvin sairas. En todellakaan tiedä, olisinko ensinkään jaksanut
kestää, ellette te olisi sattunut tulemaan. Mutta siitä ei nyt ole
kysymys. Jos ajattelisin vain itseäni, omaa etuani, niin en tahtoisi
mitenkään antaa teidän lähteä. Mutta minä en ajattele itseäni, vaan
teitä. Tämä teidän täälläolonne ei — sitä ei voi pitää oikein sopivana,
kuten ymmärrätte. Jos minä olisin naimisissa, jos täällä olisi joku
toinen valkoihoinen nainen … Mutta asiain näin ollen…"

Joan nosti kätensä ylös epätoivoa teeskennellen.

"Minä en voi seurata teidän ajatuksenjuoksuanne", sanoi hän.


"Toisena hetkenä te sanotte, että minun pitää lähteä tieheni, ja
toisena, ettei minulla ole paikkaa minne mennä ja että te ette anna
minun lähteä. Mitä tyttö-raukan siis on tehtävä?"

"Sehän juuri on pulma", sanoi Sheldon neuvottomana.

"Tämä tilanne häiritsee siis teidän rauhaanne?"

"Yksinomaan teidän tähtenne."


"Antakaa minun silloin rauhoittaa tunteitanne ja sanoa teille, että
se ei häiritsisi minua hituistakaan, ellette te nostaisi siitä niin pahaa
melua. Minä en koskaan huoli olla suutuksissani sen johdosta, mille
ei mitään voi. Työläs on potkia tutkainta vastaan. Tarkastakaamme
nyt asemaa! Te olette täällä ja minä olen täällä. Olette itse sanonut,
etten voi lähteä täältä minnekään. On päivänselvää, ettette tekään
voi lähteä tiehenne ja jättää minua tänne yksin koko plantaasin ja
kahdensadan villatukkaisen ihmissyöjän kanssa. Siksi te jäätte
paikallenne ja minä jään myös. Se on aivan yksinkertaista. Ja
samalla se on seikkailua. Edelleen, teidän ei tarvitse olla huolissanne
itsenne takia. Minä en ole naimahaluinen. Tulin Salomonin-saarille
saadakseni plantaasin, en miestä."

Sheldon punastui, mutta ei sanonut mitään.

"Minä tiedän, mitä te ajattelette", nauroi tyttö iloisesti. "Te


ajattelette, että jos minä olisin mies, niin te vääntäisitte minulta
niskat nurin. Ja sen minä olen ansainnutkin. Olen hyvin pahoillani.
Minun ei pitäisi alituisesti loukata teidän tunteitanne."

"Pelkään, että usein annan teille aihetta siihen", sanoi Sheldon


tuntien helpotusta huomatessaan myrskyn olevan tyyntymässä.

"Nyt minä keksin jotakin!" huudahti Joan samassa. "Lainatkaa


minulle muutamia palvelijoitanne täksi päiväksi. Minä rakennan
itselleni ruohomajan pihamaan perimmäiseen nurkkaan — paalujen
varaan tietysti. Voin muuttaa sinne tänä iltana. Siellä minun tulee
hyvä ja turvallinen olla. Tahitilaiset saavat vartioida taloa aivan kuin
olisimme laivalla. Ja sitten minä opiskelen kookospalmunviljelystä.
Korvaukseksi pidän huolta keittiöstänne ja taloudestanne ja annan
teille säädyllistä ruokaa syödäksenne. Ja loppujen lopuksi en kallista
korvaani teidän vastaväitteillenne. Tiedän kaiken, mitä aiotte sanoa
ja ehdottaa — että minä asettuisin teidän bangaloonne ja te
rakentaisitte ruohomajan itsellenne. Mutta siihen minä en suostu.
Teidän on paras alistua kaikkeen. Muussa tapauksessa, ellette te
suostu, menen joen poikki, teidän hallintopiirinne ulkopuolelle, ja
rakennan sinne kylän itselleni ja merimiehilleni — he kai saavat
sitten purjehtia Guvutuun hankkimaan elintarpeita. Ja nyt teidän
pitää opettaa minua pelaamaan biljardia."
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like