Java Deep Learning Essentials 1st Edition Sugomori Yusuke instant download
Java Deep Learning Essentials 1st Edition Sugomori Yusuke instant download
https://textbookfull.com/product/java-deep-learning-
essentials-1st-edition-sugomori-yusuke/
https://textbookfull.com/product/r-deep-learning-essentials-1st-
edition-wiley/
https://textbookfull.com/product/programming-pytorch-for-deep-
learning-creating-and-deploying-deep-learning-applications-1st-
edition-ian-pointer/
https://textbookfull.com/product/deep-learning-pipeline-building-
a-deep-learning-model-with-tensorflow-1st-edition-hisham-el-amir/
https://textbookfull.com/product/deep-learning-on-windows-
building-deep-learning-computer-vision-systems-on-microsoft-
windows-1st-edition-thimira-amaratunga/
Deep Learning with Python 1st Edition François Chollet
https://textbookfull.com/product/deep-learning-with-python-1st-
edition-francois-chollet/
https://textbookfull.com/product/deep-learning-in-biometrics-1st-
edition-mayank-vatsa/
https://textbookfull.com/product/deep-learning-with-r-1st-
edition-francois-chollet/
https://textbookfull.com/product/deep-learning-with-pytorch-1st-
edition-eli-stevens/
https://textbookfull.com/product/learning-java-through-games-1st-
edition-stanchev-lubomir/
[1]
Java Deep Learning Essentials
Yusuke Sugomori
BIRMINGHAM - MUMBAI
Java Deep Learning Essentials
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-78528-219-5
www.packtpub.com
Credits
Reviewers Proofreader
Wei Di Safis Editing
Vikram Kalabi
Indexer
Commissioning Editor Mariammal Chettiyar
Kartikey Pandey
Graphics
Acquisition Editor Abhinash Sahu
Manish Nainani
Production Coordinator
Content Development Editor Arvindkumar Gupta
Rohit Singh
Cover Work
Technical Editor Arvindkumar Gupta
Vivek Arora
Copy Editor
Ameesha Smith Green
About the Author
In 2013, Sugomori joined Dentsu, the largest advertising company in Japan based on
nonconsolidated gross profit in 2014, where he carried out a wide variety of digital
advertising, smartphone app development, and big data analysis. He was also
featured as one of eight "new generation" creators by the Japanese magazine Web
Designing.
Wei Di is a data scientist. She is passionate about creating smart and scalable
analytics and data mining solutions that can impact millions of individuals and
empower successful businesses.
Her interests also cover wide areas including artificial intelligence, machine learning,
and computer vision. She was previously associated with the eBay Human Language
Technology team and eBay Research Labs, with a focus on image understanding for
large scale applications and joint learning from both visual and text information.
Prior to that, she was with Ancestry.com working on large-scale data mining and
machine learning models in the areas of record linkage, search relevance, and
ranking. She received her PhD from Purdue University in 2011 with focuses on data
mining and image classification.
At www.PacktPub.com, you can also read a collection of free technical articles, sign
up for a range of free newsletters and receive exclusive discounts and offers on Packt
books and eBooks.
TM
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital
book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
• Fully searchable across every book published by Packt
• Copy and paste, print, and bookmark content
• On demand and accessible via a web browser
Table of Contents
Preface v
Chapter 1: Deep Learning Overview 1
Transition of AI 2
Definition of AI 2
AI booms in the past 3
Machine learning evolves 8
What even machine learning cannot do 11
Things dividing a machine and human 13
AI and deep learning 14
Summary 22
Chapter 2: Algorithms for Machine Learning – Preparing for
Deep Learning 23
Getting started 23
The need for training in machine learning 24
Supervised and unsupervised learning 27
Support Vector Machine (SVM) 28
Hidden Markov Model (HMM) 31
Neural networks 32
Logistic regression 33
Reinforcement learning 33
Machine learning application flow 34
Theories and algorithms of neural networks 40
Perceptrons (single-layer neural networks) 40
Logistic regression 48
Multi-class logistic regression 51
Multi-layer perceptrons (multi-layer neural networks) 57
Summary 66
[i]
Table of Contents
[ ii ]
Table of Contents
[ iii ]
Preface
With an increasing interest in AI around the world, deep learning has attracted a
great deal of public attention. Every day, deep learning algorithms are used across
different industries. Deep learning has provided a revolutionary step to actualize
AI. While it is a revolutionary technique, deep learning is often thought to be
complicated, and so it is often kept from much being known of its contents. Theories
and concepts based on deep learning are not complex or difficult. In this book,
we'll take a step-by-step approach to learn theories and equations for the correct
understanding of deep learning. You will find implementations from scratch, with
detailed explanations of the cautionary notes for practical use cases.
Chapter 2, Algorithms for Machine Learning - Preparing for Deep Learning, implements
machine learning algorithms related to deep learning.
Chapter 3, Deep Belief Nets and Stacked Denoising Autoencoders, dives into Deep Belief
Nets and Stacked Denoising Autoencoders algorithms.
Chapter 4, Dropout and Convolutional Neural Networks, discovers more deep learning
algorithms with Dropout and Convolutional Neural Networks.
Chapter 5, Exploring Java Deep Learning Libraries – DL4J, ND4J, and More, gains an
insight into the deep learning library, DL4J, and its practical uses.
Chapter 6, Approaches to Practical Applications – Recurrent Neural Networks and More, lets
you devise strategies to use deep learning algorithms and libraries in the real world.
[v]
Preface
Chapter 7, Other Important Deep Learning Libraries, explores deep learning further with
Theano, TensorFlow, and Caffe.
Chapter 8, What's Next?, explores recent deep learning movements and events, and
looks into useful deep learning resources.
Since this book covers the core concepts of and approaches to both machine learning
and deep learning, no previous experience in machine learning is required.
Also, we will implement deep learning algorithms with very simple codes, so
elementary Java developers will also find this book useful for developing both
their Java skills and deep learning skills.
Conventions
In this book, you will find a number of text styles that distinguish between different
kinds of information. Here are some examples of these styles and an explanation of
their meaning.
Code words in text, database table names, folder names, filenames, file extensions,
pathnames, dummy URLs, user input, and Twitter handles are shown as follows:
"Let's take a look at CNNMnistExample.java in the package of convolution."
[ vi ]
Preface
New terms and important words are shown in bold. Words that you see on the
screen, for example, in menus or dialog boxes, appear in the text like this: "If you're
using IntelliJ, you can import the project from File | New | Project from existing
sources."
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about
this book—what you liked or disliked. Reader feedback is important for us as it helps
us develop titles that you will really get the most out of.
If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book, see our author guide at www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.
[ vii ]
Preface
1. Log in or register to our website using your e-mail address and password.
2. Hover the mouse pointer on the SUPPORT tab at the top.
3. Click on Code Downloads & Errata.
4. Enter the name of the book in the Search box.
5. Select the book for which you're looking to download the code files.
6. Choose from the drop-down menu where you purchased this book from.
7. Click on Code Download.
You can also download the code files by clicking on the Code Files button on the
book's webpage at the Packt Publishing website. This page can be accessed by
entering the book's name in the Search box. Please note that you need to be logged in
to your Packt account.
Once the file is downloaded, please make sure that you unzip or extract the folder
using the latest version of:
The code bundle for the book is also hosted on GitHub at https://github.com/
PacktPublishing/Java-Deep-Learning-Essentials. We also have other code
bundles from our rich catalog of books and videos available at https://github.
com/PacktPublishing/. Check them out!
[ viii ]
Preface
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes
do happen. If you find a mistake in one of our books—maybe a mistake in the text or
the code—we would be grateful if you could report this to us. By doing so, you can
save other readers from frustration and help us improve subsequent versions of this
book. If you find any errata, please report them by visiting http://www.packtpub.
com/submit-errata, selecting your book, clicking on the Errata Submission Form
link, and entering the details of your errata. Once your errata are verified, your
submission will be accepted and the errata will be uploaded to our website or added
to any list of existing errata under the Errata section of that title.
Piracy
Piracy of copyrighted material on the Internet is an ongoing problem across all
media. At Packt, we take the protection of our copyright and licenses very seriously.
If you come across any illegal copies of our works in any form on the Internet, please
provide us with the location address or website name immediately so that we can
pursue a remedy.
We appreciate your help in protecting our authors and our ability to bring you
valuable content.
Questions
If you have a problem with any aspect of this book, you can contact us at
[email protected], and we will do our best to address the problem.
[ ix ]
Deep Learning Overview
Artificial Intelligence (AI) is a word that you might start to see more often these
days. AI has become a hot topic not only in academic society, but also in the field of
business. Large tech companies such as Google and Facebook have actively bought
AI-related start-ups. Mergers and acquisitions in these AI areas have been especially
active, with big money flowing into AI. The Japanese IT/mobile carrier company
Softbank released a robot called Pepper in June 2014, which understands human
feelings, and a year later they have started to sell Pepper to general consumers. This
is a good movement for the field of AI, without a doubt.
The idea of AI has been with us for decades. So, why has AI suddenly became a
hot field? One of the factors that has driven recent AI-related movements, and is
almost always used with the word AI, is deep learning. After deep learning made
a vivid debut and its technological capabilities began to grow exponentially, people
started to think that finally AI would become a reality. It sounds like deep learning is
definitely something we need to know. So, what exactly is it?
To answer the previous questions, in this chapter we'll look at why and how AI
has become popular by following its history and fields of studies. The topics covered
will be:
If you already know what deep learning is or if you would like to find out about the
specific algorithm of the deep learning/implementation technique, you can skip this
chapter and jump directly to Chapter 2, Algorithms for Machine Learning – Preparing for
Deep Learning.
[1]
Deep Learning Overview
Transition of AI
So, why is it now that deep learning is in the spotlight? You might raise this question,
especially if you are familiar with machine learning, because deep learning is not that
different to any other machine learning algorithm (don't worry if you don't know
this, as we'll go through it later in the book). In fact, we can say that deep learning is
the adaptation of neural networks, one of the algorithms of machine learning, which
mimics the structure of a human brain. However, what deep learning can achieve
is much more significant and different to any other machine learning algorithm,
including neural networks. If you see what processes and research deep learning has
gone through, you will have a better understanding of deep learning itself. So, let's go
through the transition of AI. You can just skim through this while sipping your coffee.
Definition of AI
All of a sudden, AI has become a hot topic in the world; however, as it turns out,
actual AI doesn't exist yet. Of course, research is making progress in creating actual
AI, but it will take more time to achieve it. Pleased or not, the human brain—which
could be called "intelligence"—is structured in an extremely complicated way and
you can't easily replicate it.
But wait a moment - we see many advertisements for products with the phrase by
AI or using AI all over them. Are they fraudulent? Actually, they are! Surprised?
You might see words like recommendation system by AI or products driven by AI, but
the word AI used here doesn't indicate the actual meaning of AI. Strictly speaking,
the word AI is used with a much broader meaning. The research into AI and the AI
techniques accumulated in the past have achieved only some parts of AI, but now
people are using the word AI for those parts too.
Let's look at a few examples. Roughly divided, there are three different categories
recognized as AI in general:
People use the word AI for these categories and, needless to say, new technology
that utilizes deep learning is also called AI. Yet, these technologies are different
both in structure and in what they can do. So, which should we specifically call AI?
Unfortunately, people have different opinions about that question and the answer
cannot be objectively explained. Academically, a term has been set as either strong
AI or weak AI depending on the level that a machine can achieve. However, in this
book, to avoid confusion, AI is used to mean (Not yet achieved) human-like intelligence
that is hard to distinguish from the actual human brain. The field of AI is being drastically
developed, and the possibility of AI becoming reality is exponentially higher when
driven by deep learning. This field is booming now more than ever in history. How
long this boom will continue depends on future research.
However, the latest boom has a significant difference from the past booms. Yes,
that is deep learning. Deep learning has achieved what the past techniques could
not achieve. What is that? Simply put, a machine itself is able to find out the feature
quantity from the given data, and learn. With this achievement, we can see the
great possibility of AI becoming a reality, because until now a machine couldn't
understand a new concept by itself and a human needed to input a certain feature
quantity in advance using past techniques created in the AI field.
It doesn't look like a huge difference if you just read this fact, but there's a world
of difference. There has been a long path taken before reaching the stage where a
machine can measure feature quantity by itself. People were finally able to take a
big step forward when a machine could obtain intelligence driven by deep learning.
So, what's the big difference between the past techniques and deep learning? Let's
briefly look back into the past AI field to get a better sense of the difference.
[3]
Deep Learning Overview
The first AI boom came in the late 1950s. Back then, the mainstream research and
development of a search program was based on fixed rules—needless to say, they
were human-defined. The search was, simply put, dividing cases. In this search, if we
wanted a machine to perform any process, we had to write out every possible pattern
we might need for the process. A machine can calculate much faster than a human can.
It doesn't matter how enormous the patterns are, a machine can easily handle them. A
machine will keep searching a million times and eventually will find the best answer.
However, even if a machine can calculate at high speed, if it is just searching for an
answer randomly and blindly it will take a massive amount of time. Yes, don't forget
that constraint condition, "time." Therefore, further studies were conducted on how to
make the search more efficient. The most popular search methods among the studies
were depth-first search (DFS) and breadth-first search (BFS).
Out of every possible pattern you can think of, search for the most efficient path
and make the best possible choice among them within a realistic time frame. By
doing this, you should get the best answer each time. Based on this hypothesis,
two searching or traversing algorithms for a tree of graph data structures were
developed: DFS and BFS. Both start at the root of a graph or tree, and DFS explores
as far as possible along each branch before backtracking, whereas BFS explores
the neighbor nodes first before moving to the next level neighbors. Here are some
example diagrams that show the difference between DFS and BFS:
These search algorithms could achieve certain results in a specific field, especially
fields like Chess and Shogi. This board game field is one of the areas that a machine
excels in. If it is given an input of massive amounts of win/lose patterns, past game
data, and all the permitted moves of a piece in advance, a machine can evaluate the
board position and decide the best possible next move from a very large range
of patterns.
[4]
Chapter 1
For those of you who are interested in this field, let's look into how a machine plays
chess in more detail. Let's say a machine makes the first move as "white," and there
are 20 possible moves for both "white" and "black" for the next move. Remember the
tree-like model in the preceding diagram. From the top of the tree at the start of the
game, there are 20 branches underneath as white's next possible move. Under one
of these 20 branches, there's another 20 branches underneath as black's next possible
movement, and so on. In this case, the tree has 20 x 20 = 400 branches for black,
depending on how white moves, 400 x 20 = 8,000 branches for white, 8,000 x 20 =
160,000 branches again for black, and... feel free to calculate this if you like.
A machine generates this tree and evaluates every possible board position from
these branches, deciding the best arrangement in a second. How deep it goes (how
many levels of the tree it generates and evaluates) is controlled by the speed of the
machine. Of course, each different piece's movement should also be considered
and embedded in a program, so the chess program is not as simple as previously
thought, but we won't go into detail about this in this book. As you can see, it's not
surprising that a machine can beat a human at Chess. A machine can evaluate and
calculate massive amounts of patterns at the same time, in a much shorter time than
a human could. It's not a new story that a machine has beaten a Chess champion; a
machine has won a game over a human. Because of stories like this, people expected
that AI would become a true story.
Unfortunately, reality is not that easy. We then found out that there was a big wall
in front of us preventing us from applying the search algorithm to reality. Reality
is, as you know, complicated. A machine is good at processing things at high speed
based on a given set of rules, but it cannot find out how to act and what rules to
apply by itself when only a task is given. Humans unconsciously evaluate, discard
many things/options that are not related to them, and make a choice from millions
of things (patterns) in the real world whenever they act. A machine cannot make
these unconscious decisions like humans can. If we create a machine that can
appropriately consider a phenomenon that happens in the real world, we can assume
two possibilities:
• A machine tries to accomplish its task or purpose without taking into account
secondarily occurring incidents and possibilities
• A machine tries to accomplish its task or purpose without taking into account
irrelevant incidents and possibilities
Both of these machines would still freeze and be lost in processing before they
accomplished their purpose when humans give them a task; in particular, the latter
machine would immediately freeze before even taking its first action. This is because
these elements are almost infinite and a machine can't sort them out within a realistic
time if it tries to think/search these infinite patterns. This issue is recognized as one
of the important challenges in the AI field, and it's called the frame problem.
[5]
Deep Learning Overview
A machine can achieve great success in the field of Chess or Shogi because the
searching space, the space a machine should be processing within, is limited (set in
a certain frame) in advance. You can't write out an enormous amount of patterns,
so you can't define what the best solution is. Even if you are forced to limit the
number of patterns or to define an optimal solution, you can't get the result within an
economical time frame for use due to the enormous amounts of calculation needed.
After all, the research at that time would only make a machine follow detailed rules
set by a human. As such, although this search method could succeed in a specific
area, it is far from achieving actual AI. Therefore, the first AI boom cooled down
rapidly with disappointment.
The first AI boom was swept away; however, on the side, the research into AI
continued. The second AI boom came in the 1980s. This time, the movement of
so-called Knowledge Representation (KR) was booming. KR intended to describe
knowledge that a machine could easily understand. If all the knowledge in the world
was integrated into a machine and a machine could understand this knowledge, it
should be able to provide the right answer even if it is given a complex task. Based
on this assumption, various methods were developed for designing knowledge for
a machine to understand better. For example, the structured forms on a web page—
the semantic web—is one example of an approach that tried to design in order for a
machine to understand information easier. An example of how the semantic web is
described with KR is shown here:
[6]
Chapter 1
Making a machine gain knowledge is not like a human ordering a machine what to
do one-sidedly, but more like a machine being able to respond to what humans ask
and then answer. One of the simple examples of how this is applied to the actual
world is positive-negative analysis, one of the topics of sentiment analysis. If you
input data that defines a tone of positive or negative for every word in a sentence
(called "a dictionary") into a machine beforehand, a machine can compare the
sentence and the dictionary to find out whether the sentence is positive or negative.
By integrating knowledge into a machine, a machine becomes the almighty. This idea
itself is not bad for achieving AI; however, there were two high walls ahead of us
in achieving it. First, as you may have noticed, inputting all real-world knowledge
requires an almost infinite amount of work now that the Internet is more commonly
used and we can obtain enormous amounts of open data from the Web. Back then,
it wasn't realistic to collect millions of pieces of data and then analyze and input that
knowledge into a machine. Actually, this work of databasing all the world's data has
continued and is known as Cyc (http://www.cyc.com/). Cyc's ultimate purpose
is to build an inference engine based on the database of this knowledge, called
knowledge base. Here is an example of KR using the Cyc project:
[7]
Deep Learning Overview
Second, it's not that a machine understands the actual meaning of the knowledge.
Even if the knowledge is structured and systemized, a machine understands it as
a mark and never understands the concept. After all, the knowledge is input by
a human and what a machine does is just compare the data and assume meaning
based on the dictionary. For example, if you know the concept of "apple" and "green"
and are taught "green apple = apple + green", then you can understand that "a green
apple is a green colored apple" at first sight, whereas a machine can't. This is called
the symbol grounding problem and is considered one of the biggest problems in the
AI field, as well as the frame problem.
The idea was not bad—it did improve AI—however, this approach won't achieve
AI in reality as it's not able to create AI. Thus, the second AI boom cooled down
imperceptibly, and with a loss of expectation from AI, the number of people who
talked about AI decreased. When it came to the question of "Are we really able to
achieve AI?" the number of people who answered "no" increased gradually.
[8]
Chapter 1
We could say that, ultimately, every question in the world can be replaced with
a question that can be answered with yes or no. For example, the question "What
color do you like?" can be considered almost the same as asking "Do you like red?
Do you like green? Do you like blue? Do you like yellow?..." In machine learning,
using the ability to calculate and the capacity to process at high speed as a weapon,
a machine utilizes a substantial amount of training data, replaces complex questions
with yes/no questions, and finds out the regularity with which data is yes, and
which data is no (in other words, it learns). Then, with that learning, a machine
assumes whether the newly-given data is yes or no and provides an answer. To sum
up, machine learning can give an answer by recognizing and sorting out patterns
from the data provided and then classifying that data into the possible appropriate
pattern (predicting) when it faces unknown data as a question.
In fact, this approach is not doing something especially difficult. Humans also
unconsciously classify data into patterns. For example, if you meet a man/woman
who's perfectly your type at a party, you might be desperate to know whether
the man/woman in front of you has similar feelings towards you. In your head,
you would compare his/her way of talking, looks, expressions, or gestures to past
experience (that is, data) and assume whether you will go on a date! This is the same
as a presumption based on pattern recognition.
Machine learning is a method that can process this pattern recognition not by
humans but by a machine in a mechanical manner. So, how can a machine recognize
patterns and classify them? The standard of classification by machine learning is a
presumption based on a numerical formula called the probabilistic statistical model.
This approach has been studied based on various mathematical models.
Learning, in other words, is tuning the parameters of a model and, once the
learning is done, building a model with one adjusted parameter. The machine then
categorizes unknown data into the most possible pattern (that is, the pattern that fits
best). Categorizing data mathematically has great merit. While it is almost impossible
for a human to process multi-dimensional data or multiple-patterned data, machine
learning can process the categorization with almost the same numerical formulas.
A machine just needs to add a vector or the number of dimensions of a matrix.
(Internally, when it classifies multi-dimensions, it's not done by a classified line or a
classified curve but by a hyperplane.)
[9]
Deep Learning Overview
Machine learning is utilized in various parts of the business world as well. In the
field of natural language processing, the prediction conversion in the input method
editor (IME) could soon be on your mind. The fields of image recognition, voice
recognition, image search, and voice search in the search engine are good examples.
Of course, it's not limited to these fields. It is also applied to a wide range of fields
from marketing targeting, such as the sales prediction of specific products or the
optimization of advertisements, or designing store shelf or space planning based on
predicting human behavior, to predicting the movements of the financial market. It
can be said that the most used method of data mining in the business world is now
machine learning. Yes, machine learning is that powerful. At present, if you hear
the word "AI," it's usually the case that the word simply indicates a process done by
machine learning.
[ 10 ]
Chapter 1
Unfortunately, however, even machine learning cannot make AI. From the
perspective of "can it actually achieve AI?" machine learning has a big weak point.
There is one big difference in the process of learning between machine learning
and human learning. You might have noticed the difference, but let's see. Machine
learning is the technique of pattern classification and prediction based on input data.
If so, what exactly is that input data? Can it use any data? Of course… it can't. It's
obvious that it can't correctly predict based on irrelevant data. For a machine to learn
correctly, it needs to have appropriate data, but then a problem occurs. A machine is
not able to sort out what is appropriate data and what is not. Only if it has the right
data can machine learning find a pattern. No matter how easy or difficult a question
is, it's humans that need to find the right data.
Let's think about this question: "Is the object in front of you a human or a cat?" For
a human, the answer is all too obvious. It's not difficult at all to distinguish them.
Now, let's do the same thing with machine learning. First, we need to prepare the
format that a machine can read, in other words, we need to prepare the image data of
a human and a cat respectively. This isn't anything special. The problem is the next
step. You probably just want to use the image data for inputting, but this doesn't
work. As mentioned earlier, a machine can't find out what to learn from data by
itself. Things a machine should learn need to be processed from the original image
data and created by a human. Let's say, in this example, we might need to use data
that can define the differences such as face colors, facial part position, the facial
outlines of a human and a cat, and so on, as input data. These values, given as inputs
that humans need to find out, are called the features.
[ 11 ]
Deep Learning Overview
Machine learning can't do feature engineering. This is the weakest point of machine
learning. Features are, namely, variables in the model of machine learning. As this
value shows the feature of the object quantitatively, a machine can appropriately
handle pattern recognition. In other words, how you set the value of identities will
make a huge difference in terms of the precision of prediction. Potentially, there are
two types of limitations with machine learning:
• An algorithm can only work well on data with the assumption of the training
data - with data that has different distribution. In many cases, the learned
model does not generalize well.
• Even the well-trained model lacks the ability to make a smart meta-decision.
Therefore, in most cases, machine learning can be very successful in a very
narrow direction.
Let's look at a simple example so that you can easily imagine how identities have a
big influence on the prediction precision of a model. Imagine there is a corporation
that wants to promote a package of asset management based on the amount of assets.
The corporation would like to recommend an appropriate product, but as it can't ask
a personal question, it needs to predict how many assets a customer might have and
prepare in advance. In this case, what type of potential customers shall we consider
as an identity? We can assume many factors such as their height, weight, age,
address, and so on as an identity, but clearly age or residence seem more relevant
than height or weight. You probably won't get a good result if you try machine
learning based on height or weight, as it predicts based on irrelevant data, meaning
it's just a random prediction.
As such, machine learning can provide an appropriate answer against the question
only after the machine reads an appropriate identity. But, unfortunately, the machine
can't judge what the appropriate identity is, and the precision of machine learning
depends on this feature engineering!
Machine learning has various methods, but the problem of being unable to do
feature engineering is seen across all of these. Various methods have been developed
and people compete against their precision rates, but after we have achieved
precision to a certain extent, people decide whether a method of machine learning is
good or bad based on how great a feature they can find. This is no longer a difference
in algorithms, but more like a human's intuition or taste, or the fine-tuning of
parameters, and this can't be said to be innovative at all. Various methods have been
developed, but after all, the hardest thing is to think of the best identity and a human
has to do that part anyway.
[ 12 ]
Random documents with unrelated
content Scribd suggests to you:
CHAPTER VI.
The shock nearly overwhelmed Dora. The double blow was too
much for her, and when the landlady came into the room a short
time afterwards she found the girl insensible on the floor. When she
returned to consciousness she could not believe she had read the
paper aright. She took it up again and went carefully over the
passage with aching eyes. The solid ground seemed to be melting
away under her feet, and all the material things around her were
visionary, unreal, far away. The landlady at length made her talk,
and with talk came tears, and with tears relief. She pointed out the
paragraph to the woman, and told her she must go at once to the
hospital and see about the whole affair. It was too horrible, she said,
to think that her grandfather should be killed and her lover nearly
killed in this enterprise, whatever it was, they were engaged upon.
The woman was of a kindly and compassionate nature, and offered
to accompany the girl. This offer Dora gladly accepted, and the two
set out. They ascertained at the hospital that Lavirotte was going on
favourably, but that they could not see him until next day. They went
and saw the body of the old man at the mortuary, and, finding out
that nothing could be done, returned to Charterhouse Square,
greatly depressed and saddened; for the kindly woman shared the
girl's grief, and felt for her desolate condition. Next day, when Dora
called at the hospital she was admitted. She found Lavirotte
haggard, and worn, and wild-looking, but far less seriously injured
than the newspaper report had led her to expect. It was not a place
for a demonstrative meeting, and she had been cautioned not to
excite the injured man. After the first words of the meeting she
asked him all the particulars of what had occurred at the tower. He
told her as briefly as he could. Then for the first time she learned
that her grandfather and her lover had been seeking for a treasure
in that lonely place in Porter Street. He told her how the old man
had been firmly persuaded a vast hoard had been hidden beneath
the tower before the Great Fire, and had remained there ever since.
While he, Lavirotte, was away at his lodgings, looking for letters, the
old man had found the top of the vault, had pierced the vault, and
descended into it. Then, no doubt, the shock of finding the work of
years useless had been too great for him, and he had succumbed.
He related how he, being then in a very weak condition from
wearing anxiety and the want of food and rest, had returned to the
tower, descended into the vault, and found himself unable to
reascend. Then later on came the crash, his own insensibility, and
finally the rescue the afternoon before. In grief and pity she listened
to him, and when he had finished she could think of nothing to say
but that she hoped he would soon get strong again, and that she
would do anything she could for him, and come to see him as often
as they would let her. Then he went on to explain how this terrible
disappointment at not finding the treasure would not only leave him
almost penniless, but would prevent him doing the service he had
intended for O'Donnell and Kempston. He told her he had not replied
to the letter he found from Eugene at his lodgings, because he
hoped that in a day or two he might be able to communicate the
glorious news that the period of their affluence was at hand. Now all
this was changed. The whole aspect of his career was altered, and
the first thing she would have to do for him was to telegraph to
Eugene, saying that all hope of succour was now at an end. It would
be a cruel, a terrible, perhaps literally a fatal blow to the elder
O'Donnell, but that could not now be helped. He dictated to her the
telegram, and she wrote it down. He also dictated a note she was to
write to Mr. Kempston. Then he said: "They tell me I shall not be
long here; but how it is to be with me when I get about again I
cannot say. Misfortune seems to have marked me out as one upon
whom she was to try all her arts." She said tenderly, advancing her
hand to his: "Don't say that, Dominique." "Forgive me, Dora, darling.
I was not thinking of you. I was speaking of only the business aspect
of things. We shall be as poor as ever now." "But we were never
rich, and yet we were--fond of each other, and very happy." "Ay,
darling, very fond of each other, and very happy, and will be always,"
he added, pressing the hand he had in his. "I was thinking only of
you in the matter. When I had this dream of wealth upon me, I used
to picture to myself what we should do when we became rich; how
you should have all that art and luxury could produce." "I have never
wished for wealth or luxury, Dominique," she whispered. "I know I
shall be as happy as I ever hoped to be, more happy than I ever
deserved, with you. Let us think no more of that treasure. It has
brought no good to us up to this. Why should we allow it to cause us
sorrow now?" "Ay, ay," he said. "We must make the best of it now.
Bad will be the best of it, but it might have been worse. You know I
have a little money, and with it I shall be able to continue at the
singing until I am good enough for the boards. Then I shall be able
to earn enough for us both, Dora." "Very little will be enough," she
whispered, again pressing his hand. He returned the pressure, and
said: "Thank you, darling. They will not let you stay much longer
now. I am sorry I am not able to be up; but I suppose they will do
everything necessary about your grandfather. I want you to go to my
landlord. He has some money of mine. Tell him to arrange all about
the funeral. You tell me there is no man in the house where you
lodge, and the few men I know in London, I know scarcely
sufficiently well to ask a favour of them. Stop," he said; "there is
Grafton. I might ask him. He was very friendly to me when I was in
London before. I remember where he lived. Go to him and tell him
all, and give him the money. That will be better." He gave her
Grafton's address, and after a little while she took her leave. She
sought the artist and found him at home. He had two rooms in
Charlotte Street--one a bedroom; the other served as studio and
sitting-room. When Dora called, he was not alone. Having renewed
his acquaintance with Cassidy, he had invited the dandy to his place.
Cassidy and he were now having coffee. Grafton hurried Cassidy into
the bedroom, which was separated from the sitting-room by folding
doors. Dora was shown up, and explained the circumstances of the
case. Grafton said he would be delighted to do anything he could for
Lavirotte and Miss Harrington. Unfortunately there was a difficulty in
the way. It was utterly impossible for him to leave his studio that
afternoon or night, as he was at work on a block which would take
him till five o'clock in the morning to finish, and he had just that
moment received a telegram from the illustrated paper on which he
worked, ordering him north to the scene of a great colliery accident
the first thing in the morning. He was deeply grieved. He would try if
he could possibly do anything. Stop! A friend of his was in the
house. He would go and ask him if he could manage to do what was
required. He went out by the door leading to the landing, and from
that landing through another door into the bedroom where Cassidy
was. Cassidy flushed with surprise and pleasure when he saw a
chance of his getting mixed up with the Lavirotte affair. He told
Grafton he would ask them to give him a holiday to-morrow, and
between this afternoon and to-morrow there would be plenty of time
to arrange everything about Lionel Crawford, as, no doubt, the
inquest was held that day. Then Grafton brought Cassidy in and
introduced him to Dora, and said that he would act in every way as
though he were Grafton himself. Dora expressed her great gratitude.
"You know," Cassidy said, "I shall go and see Mr. Lavirotte as soon
as possible, and I have no doubt he will be glad to see me, for I
come from the neighbourhood in which he lived, and know
Glengowra thoroughly." Here the overwhelming desire to rise in
importance in the eyes of Dora, pleasantly or otherwise, mastered
him, and he said: "Perhaps you have seen the special edition of The
Evening Record?" She said yes; that she had there first seen an
account of the terrible affair. "It was I," said he, bowing and smiling,
"who gave the information respecting the mysterious occurrence at
Glengowra, of which you, doubtless, know." By this time he was, of
course, aware he was talking to the girl to whom Lavirotte had made
love when formerly in London. "I do not know anything about it,"
she whispered faintly. "I am exceedingly obliged to both of you." She
said good-bye and went. When she was gone, Cassidy said:
"Strange she doesn't know anything about the Glengowra affair. I
don't think it right she should be kept in ignorance of it. However,
Grafton, you haven't a minute to lose now. I'll be off down east and
see what's to be done. I assure you nothing could give me greater
pleasure than to act for you in this affair."
CHAPTER VIII.
Updated editions will replace the previous one—the old editions will
be renamed.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.
Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.
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.
textbookfull.com