IBM Watson V3 Application Development- certification guide
1. Basic concepts of Cognition:
Cognition, the “act of thinking,” is the mental process of acquiring understanding through
thought and personal or shared experiences. Brain-based skills are part of every human
action and are essential in carrying out any task, from the simplest to the most difficult.
Tasks include human senses (hearing, touch, smell, sight, taste, and even extra-sensory
perception), learning, remembering, motor skills, language, empathy, social skills, and
problem solving capabilities.
As stated, cognition is the process of acquiring knowledge through thoughts, experiences,
and senses. Cognitive processing helps us understand and interact with the world around
us from the basic to the complex.
Artificial Intelligence (AI)
The study and development of AI systems aim at building computer systems able to
perform tasks that normally require human intelligence. AI-based machines are intended
to perceive their environment and take actions that optimize their level of success. Today’s
AI can be considered weak, in that it is designed to perform narrow and specific tasks. The
goal of many researchers is to create strong AI that learns like a human and can solve
human-type problems.
AI research uses techniques from many fields, such as computer science, philosophy,
linguistics, economics, speech recognition, and psychology, which are manifested in
applications, such as control systems, natural language processing, facial recognition,
speech recognition, analytics, pattern matching, data mining, and logistics.
Cognitive computing
Humans are inherently capable of a set of skills that help us learn, discover, and make
decisions:
Humans can apply common sense, morals, and reason through dilemmas.
Humans can think of new ideas and make generalizations when essential clues and
pieces of information are missing.
But humans are restricted by the amount of time spent to learn, process, and absorb
new information, and limited by the unconscious biases we all possess that influence
the decisions we make.
Key Elements of cognitive systems:
An important concept to understand is that the first key element of cognitive systems is to
expand the boundaries of human cognition rather than replace or replicate the way the
human brain works.The idea is to develop cognitive computing which uses evidence based learning from
previous experience rather than trying to match queries with information available.
The second key element is to have a more natural interaction between computersand humans.
Speech recognition, for example, enables the human to interact with the computer by
using voice commands
A third key element of cognitive systems is the use of learning, specifically machine
learning.
Cognitive system works by understand,reason,learn and interact.
Understand: Cognitive systems understand imagery, language, and other unstructured
data like humans. Cognitive system operationalize virtually all data (structured and
2. unstructured) like humans do.
Reason: Cognitive systems can reason, grasp underlying concepts, form hypotheses, and
infer and extract ideas.
Learn: With each data point, interaction, and outcome, the cognitive systems develop and
increase expertise, and continue to learn, adapt, and improve their expertise.
Interact: With abilities to see, talk, and hear, cognitive systems interact with humans in a
natural way.
Artificial neural networks are computational models inspired by biological neural
networks, and are used to approximate functions that are generally unknown.
Particularly, they are inspired by the behaviour of neurons and the electrical signals they
convey between input (such as from the eyes or nerve endings in the hand), processing,
and output from the brain (such as reacting to light, touch, or heat).
Explainthe role of synapse andneuron
Understandweightsandbias
List variousapproachestoneural nets
Explainforwardandbackwardpropagation
Explaingradientdescent
Reference video:
https://www.youtube.com/watch?v=bxe2T-V8XRs
https://www.youtube.com/watch?v=UJwK6jAStmg
https://www.youtube.com/watch?v=5u0jaA3qAGk
3. https://www.youtube.com/watch?v=GlcnxUlrtek
Mainmachinelearningconcepts:
1. Supervisedlearning:
2. Classification
3. Regression/Prediction
4. Semi-supervisedlearning
5. Unsupervisedlearning:
6. Artificial neural network
7. Associationrule learning
8. Hierarchical clustering
9. Clusteranalysis
10. OutlierDetection
11. Reinforcementlearning
Define Precision, Recall,and Accuracy
SUBTASK(S):
Precision:Precisionisthe percentageof documentslabelledaspositive thatare actuallypositive.
Formula:True Positives/(TruePositives+False Positives)
Recall:Recall isthe percentof documentslabelledaspositive were successfullyretrieved.Formula:True
Positives/(True Positives+False Negatives)
Accuracy:Accuracyis the fractionof documentsrelevanttoa querythatwere successfullyretrieved.
Formula:(True Positives+True Negatives)/Total DocumentCount
refences:https://en.wikipedia.org/wiki/Precision_and_recall https://www.quora.com/What-is-the-best-
way-to-understand-the-termsprecision-and-recall
Watson APIs: Build with Watson
You can enable cognitive computing features in your applications by using IBM Watson
Language, Vision, Speech, and Data APIs. Watson APIs are delivered through IBM Bluemix,
which is the cloud platformas a service (PaaS) developed by IBM.
The following Watson APIs are currently available:
Language:
4. – Conversation
– Document Conversion
– Natural Language Classifier
– Natural Language Understanding
– Personality Insights
– Retrieve and Rank
– Tone Analyzer
Speech:
– Speech to Text
– Text to Speech
Vision:
– Visual Recognition
Data Insights:
– Discovery
– Discovery News
Natural Language Classifier
The IBM Watson™ Natural Language Classifier service uses machine learning algorithms to return the top matching predefined classes for short text input. You create and train
a classifier to connect predefined classes to example texts so that the service can apply those classes to new inputs.
What to use the service for
5. Natural Language Classifier can help your application understand the language of short texts and make predictions about how to handle them. A classifier learns from your
example data and then can return information for texts that it is not trained on.
Example data with command to Create and train a
classifier and Classify text
https://console.bluemix.net/docs/services/natural-language-classifier/getting-started.html#natural-
language-classifier
Tone Analyzer
The IBM Watson™ Tone Analyzer service uses linguistic analysis to detect emotional and language tones in written text. The service can analyze tone at both the document
and sentence levels. You can use the service to understand how your written communications are perceived and then to improve the tone of your communications. Businesses
can use the service to learn the tone of their customers' communications and to respond to each customer appropriately, or to understand and improve their customer
conversations.
https://www.ibm.com/watson/developercloud/tone-
analyzer/api/v3/?cm_mc_uid=11224914768315121904015&cm_mc_sid_50200000=1512229241&cm_
mc_sid_52640000=1512229241#introduction
IBM W atson Conversation service
With the IBM Watson™ Conversation service, you can build a solution that understands natural-language input and uses machine learning to respond to customers in a way
that simulates a conversation between humans.
How to use the service
This diagram shows the overall architecture of a complete solution:
Users interact with your application through the user interface that you implement. For example, a simple chat window or a mobile app, or even a robot with a
voice interface.
The application sends the user input to the Conversation service.
6. The application connects to a workspace, which is a container for your dialog flow and training data.
The service interprets the user input, directs the flow of the conversation and gathers information that it needs.
You can connect additional Watson services to analyze user input, such as Tone Analyzer or Speech to Text.
The application can interact with your back-end systems based on the user's intent and additional information. For example, answer question, open tickets, update
account information, or place orders. There is no limit to what you can do.
Implementation
Here's how you will implement your conversation:
Configure a workspace. With the easy-to-use graphical environment, set up the training data and dialog for your conversation.
The training data consists of the following artifacts:
Intents: Goals that you anticipate your users will have when they interact with the service. Define one intent for each goal that can be identified in a
user's input. For example, you might define an intent named store_hours that answers questions about store hours. For each intent, you add sample
utterances that reflect the input customers might use to ask for the information they need, such as, What time do you open?
Entities: An entity represents a term or object that provides context for an intent. For example, an entity might be a city name that helps your dialog
to distinguish which store the user wants to know store hours for.
As you add training data, a natural language classifier is automatically added to the workspace, and is trained to understand the types of requests
that you have indicated the service should listen for and respond to.
Use the dialog tool to build a dialog flow that incorporates your intents and entities. The dialog flow is represented graphically in the tool as a tree.
You can add a branch to process each of the intents that you want the service to handle. You can then add branch nodes that handle the many
possible permutations of a request based on other factors, such as the entities found in the user input or information that is passed to the service
from your application or another external service.
Deploy your workspace. Deploy the configured workspace to users by connecting it to a front-end user interface, social media, or a messaging channel.
Planning your intents and entities
https://console.bluemix.net/docs/services/conversation/intents-entities.html#planning-your-entities
Android application for text to speech conversation
https://www.ibm.com/blogs/bluemix/2016/11/android-app-to-watson-text-to-speech-in-minutes/
IBM Watson™ Language Translator
With the IBM Watson™ Language Translator service, you can create an application that identifies the language of input text and uses a domain-specific linguistic model to
translate the text into another language.
To translate industry-specific jargon or other types of specialized terminology, you can customize the linguistic model to optimize it for your needs.
Note: The IBM Watson™ Language Translation service was rebranded as the Language Translator service. The Language Translator service pr ovides the same capabilities as
the Language Translation service, but with simpler pricing. For information about migrating applications from the Language Translation service to the Language Translator
service, see the Migrating from Language Translation documentation.
How to use the service
Use the service to identify the language of text, and to translate text from one language to another. For example, pass an Eng lish word, such as Hello, and the service can
identify it as English. Or translate the English greeting into its Spanish equivalent, Hola.
To teach the service to perform domain-specific translations, you can make the following enhancements to one of the linguistic models that is provided with the service:
7. Add your own glossary of terms or phrases in a source and target language. The glossary can supplement standard translations or be identified as the only terms
to use.
Upload a large body of text in your target language to serve as a language sample. The service can evaluate the sample and use what it learns to improve the
quality of its translation.
Note: The IBM Watson™ Language Translation service was rebranded as the Language Translator service. The Language Translator service provides the same capabilities as
the Language Translation service, but with simpler pricing. For information about migrating applications from the Language Translation service to the Language Translator
service, see the Migrating from Language Translation documentation.
Quick links
Try out a working demo .
View the list of SDKs .
Interact with the API through the API Explorer .
Supported languages
The linguistic models that are provided with the service can perform translations between the following languages:
News: Targeted at news articles and transcripts. Translate English to and from Arabic, Brazilian Portuguese, French, German, Italian, Japanese, Korean, and
Spanish. You can also translate Spanish to and from French.
Conversational: Targeted at conversational colloquialisms. Translate English to and from Arabic, Brazilian Portuguese, French, Italian, and Spanish.
Patents: Targeted at technical and legal terminology. Translate Brazilian Portuguese, Chinese, Korean, and Spanish to English.
IBM Watson Personality insights
The IBM Watson™ Personality Insights service provides an Application Programming Interface (API) for deriving insights from social media, enterprise data, or
other digital communications. The service uses linguistic analytics to infer individuals' intrinsic personality characteristics from digital communications such as
email, text messages, tweets, and forum posts.
The service infers, from potentially noisy social media, portraits of individuals that reflect their personality characteristics. It can also determine individuals'
consumption preferences, which indicate their likelihood to prefer various products, services, and activities.
The IBM Watson™ Personality Insights service provides an Application Programming Interface (API) for deriving insights from social media, enterprise data, or other digital
communications. The service uses linguistic analytics to infer individuals' intrinsic personality characteristics from digital communications such as email, text messages, tweets,
and forum posts.
The service infers, from potentially noisy social media, portraits of individuals that reflect their personality characteristics. It can also determine individuals' consumption
preferences, which indicate their likelihood to prefer various products, services, and activities.
Personality characteristics
The Personality Insights service infers personality characteristics based on three primary models:
Big Five personality characteristics represent the most widely used model for generally describing how a person engages with the world. The model includes five
primary dimensions: Agreeableness, Conscientiousness,Extraversion, Emotional range, and Openness. Each dimension has six facets that further characterize an
individual according to the dimension.
Needs describe which aspects of a product will resonate with a person. The model includes twelve characteristic
needs: Excitement, Harmony, Curiosity, Ideal, Closeness, Self-expression, Liberty, Love, Practicality, Stability, Challenge, and Structure.
Values describe motivating factors that influence a person's decision making. The model includes five values: Self-transcendence / Helping others, Conservation /
Tradition, Hedonism / Taking pleasure in life, Self-enhancement / Achieving success, and Open to change / Excitement.
8. Benefits of the service
As a core service of the IBM Watson platform, the Personality Insights service can provide insights that help businesses
Understand their customers at a deeper level by learning their clients' preferences, improving customer satisfaction, and strengthening client relations.
Improve client acquisition, retention, and engagement.
Guide highly personalized engagements and interactions to better tailor their products, services, campaigns, and communications for individual clients.
Use case:
https://console.bluemix.net/docs/services/personality-insights/usecases.html#usecases
Retrieve andRank:
The IBM® Retrieve and Rank service combines two information-retrieval components in a single service: the power of Apache Solr and a sophisticated machine-learning
capability. This combination provides users with more relevant results by automatically reranking them based on machine-learning algorithms.
How to use the service
Technologies
The purpose of the Retrieve and Rank service is to help you find documents that are more relevant than those that you might g et with standard information-retrieval techniques.
9. Retrieve: Retrieve is based on Apache Solr . It supports nearly all of the default Solr APIs and improves error handling and resilience. You can start your
solution by first using only the retrieve features and then add the ranking component.
Rank: The rank component (ranker) creates a machine-learning model that is trained on your data. You call the ranker in your runtime queries to use this model to
boost the relevance of your results with queries that the model has not previously seen.
Primary uses
The core users of the Retrieve and Rank service are customer-facing professionals, such as support staff, contact center agents, field technicians, and other professionals.
These users must quickly find relevant results from large numbers of documents.
Customer support: Find quick answers for customers from your growing set of answer documents.
Field technicians: Resolve technical issues on-site.
Professional services: Find the right people with the right skills for key engagements.
Speech To Text
The IBM® Speech to Text service provides Application Programming Interfaces (APIs) that let you add speech transcription capabilities to your applications. To transcribe the
human voice accurately, the service leverages machine intelligence to combine information about grammar and language structure with knowledge of the composition of the
audio signal. The service continuously returns and retroactively updates a transcription as more speech is heard.
A WebSocket interface for establishing persistent, full-duplex connections with the service.
An HTTP REST interface that supports both sessionless and session-based calls to the service.
An asynchronous HTTP interface that provides non-blocking calls to the service.
Input features
The service's interfaces share many common input features for transcribing speech to text:
Audio formats: You can transcribe Ogg or Web Media (WebM) audio with the Opus or Vorbis codec, MP3 or MPEG, Waveform Audio File Format (WAV), Free
Lossless Audio Codec (FLAC), Linear 16-bit Pulse-Code Modulation (PCM), mu-law (or u-law) audio, and basic audio.
Languages and models: For most languages, you can use transcribe audio by using broadband or narrowband models. Use broadband for audio that is sampled at a
minimum rate of 16 kHz; use narrowband for audio that is sampled at a minimum rate of 8 kHz.
Audio transmission: You can pass as much as 100 MB of audio to the service as a continuous stream of data chunks or as a one-shot delivery, passing all of the
data at one time. With streaming, the service enforces various timeouts to preserve resources.
Output features
The interfaces also support the following output features:
Speaker labels: You can recognize different speakers from audio in US English, Spanish, or Japanese. The transcription labels each speaker' s contributions to a
multi-participant conversation. (Beta functionality.)
Keyword spotting: You can identify spoken phrases that match specified keyword strings with a user-defined level of confidence. This is especially useful when
individual phrases from the audio are more important than the full transcription, for example, for a customer support system to determine how to route user
requests. (Beta functionality.)
Maximum alternatives and interim results: You can request alternative and interim transcription results. The former provide different possible transcriptions; the latter
represent interim hypotheses as a transcription progresses. In both cases, the service indicates final results in which it has the greatest confidence.
Word alternatives, word confidence, and word timestamps: You can request alternative words that are acoustically similar to the words of a transcript, confidence levels
for each of the words, and timestamps for the start and end of each word. (Word alternatives are beta functionality.)
Profanity filtering: You can censor profanity from US English transcriptions to sanitize a transcript.
Smart formatting: You can convert dates, times, numbers, phone numbers, and currency values in final transcripts of US English audio into more readable,
conventional forms. (Beta functionality.)
https://www.ibm.com/blogs/watson/2016/07/getting-robots-listen-using-watsons-speech-text-service/
10. Visual recognition
The IBM Watson™ Visual Recognition service uses deep learning algorithms to analyze images
for scenes, objects, faces, and other content. The response includes keywords that provide
information about the content.
How it works:
About
Last Updated: 2017-10-27Edit in GitHub
Beta Similarity Search and collections closed: As of September 8, 2017, the beta period for Similarity Search is closed. For more information, see Visual Recognition API – Similarity
Search Update .
The IBM Watson™ Visual Recognition service uses deep learning algorithms to analyze images for scenes, objects, faces, and other content. The response includes keywords
that provide information about the content.
A set of built-in classes provides highly accurate results without training. You can train custom classifiers to create specialized classes.
How to use the service
The following image shows the process of creating and using the classifier:
12. Use cases
The Visual Recognition service can be used for diverse applications and industries, such as:
Manufacturing: Use images from a manufacturing setting to make sure products are being
positioned correctly on an assembly line
Visual Auditing: Look for visual compliance or deterioration in a fleet of trucks, planes, or
windmills out in the field, train custom classifiers to understand what defects look like
Insurance: Rapidly process claims by using images to classify claims into different categories.
Social listening: Use images from your product line or your logo to track buzz about your
company on social media
Social commerce: Use an image of a plated dish to find out which restaurant serves it and find
reviews, use a travel photo to find vacation suggestions based on similar experiences
Retail: Take a photo of a favorite outfit to find stores with those clothes in stock or on sale, use a
travel image to find retail suggestions in that area
Education: Create image-based applications to educate about taxonomies
Watson demonstrations
Your Celebrity Match application
This demonstration uses Watson Personality Insights and Insights for Twitter services:
https://your-celebrity-match.mybluemix.net
Enter your Twitter handle to see your personality traits, rated, and see which celebrities have
personalities that are most similar to and different from yours.
Audio Analysis application
This demonstration uses the Concepts feature of Watson Natural Language Understanding
service coupled with the Speech to Text service in order to provide analysis of the concepts
that appear in YouTube videos:
https://audio-analysis-starter-kit.mybluemix.net/
Chatbot
Demonstration using Retrieve and Rank, Audio to text and conversation service