0% found this document useful (0 votes)
7 views10 pages

Assignment

The document discusses various aspects of machine learning, including model selection based on accuracy and complexity, dimensionality reduction techniques, handling missing values, customer segmentation algorithms, and the workings of IBM Watson services. It also covers the architecture of DeepQA, the AutoAI process, cognitive computing technologies, and the machine learning workflow. Additionally, it explains the bias-variance tradeoff, types of AI, and the structure of artificial neural networks.

Uploaded by

Shanti Makhija
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
0% found this document useful (0 votes)
7 views10 pages

Assignment

The document discusses various aspects of machine learning, including model selection based on accuracy and complexity, dimensionality reduction techniques, handling missing values, customer segmentation algorithms, and the workings of IBM Watson services. It also covers the architecture of DeepQA, the AutoAI process, cognitive computing technologies, and the machine learning workflow. Additionally, it explains the bias-variance tradeoff, types of AI, and the structure of artificial neural networks.

Uploaded by

Shanti Makhija
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

ASSIGNMENT

1. You have two models:

Model A: 92% accuracy, complex


Model B: 89% accuracy, simple and interpretable

a) Which model would you deploy and why?

I would choose the model based on the situation.


Model A has higher accuracy, but it is complex.
Model B has slightly lower accuracy but is easy to understand.

If explainability is important, I would choose Model B.


If accuracy is very important and small mistakes are costly, I would choose Model A.

b) Does business context matter?

Yes, business context is very important.


Different businesses have different needs.

For example:

• In healthcare, explainable models are preferred.


• In marketing, higher accuracy may be more important.

So, model choice depends on business goals.

c) When is lower accuracy acceptable?

Lower accuracy is acceptable when:

• The difference in accuracy is small.


• The model is simple and easy to explain.
• The cost of errors is low.
• Faster prediction is needed.

2. A dataset has 10,000 features but only 500 samples.

a) What problems can arise?

This can cause:

• Overfitting
• High computation time
• Poor performance on new data
The model may memorize data instead of learning patterns.

b) Which techniques can reduce dimensionality?

We can use:

• PCA (Principal Component Analysis)


• Feature Selection
• Removing less important features

These methods reduce the number of features and improve performance.

c) PCA vs Feature Selection – which to choose?

PCA creates new features from old ones.


Feature selection chooses important original features.

If interpretation is important, use feature selection.


If reducing dimensions is the main goal, use PCA.

3. A healthcare dataset has missing values in patient records.

a) Should you drop or impute missing values?

If missing values are few, we can drop them.


If many values are missing, we should impute (fill) them.

In healthcare, it is better to impute to avoid losing important data.

b) When is mean imputation a bad idea?

Mean imputation is bad when:

• Data is not normally distributed


• There are many outliers
• Missing data is not random

It can reduce data accuracy.

c) Can missing values carry information?

Yes.
Sometimes missing values show useful information.
For example, if a medical test is missing, it may mean the test was not needed.
4. An e-commerce company wants to segment customers based on purchase behavior.

a) Which algorithm would you choose: K-Means or Hierarchical clustering and why?

I would choose K-Means for large datasets because it is fast and simple.
Hierarchical clustering is better for small datasets.

For e-commerce data, K-Means is usually better.

b) How will you decide the number of clusters?

We can use:

• Elbow Method
• Silhouette Score
• Business understanding

These methods help choose the best number of clusters.

c) Is labeling required in this problem?

No.
Customer segmentation is an unsupervised learning problem.
It does not need labeled data.

5. You deployed a KNN model, but prediction time is very slow.

a) Why is KNN slow at inference?

KNN is slow because it compares a new data point with all training data during prediction.
This takes more time for large datasets.

b) How can you optimize it?

We can:

• Reduce dataset size


• Use PCA
• Use KD-Tree
• Reduce value of K

These methods make prediction faster.

c) Which alternative algorithm can you use?

We can use:
• Logistic Regression
• Decision Tree
• Support Vector Machine

These models are faster during prediction.

6. Explain about Watson services and capabilities.

IBM Watson is an AI platform developed by IBM that provides a wide range of AI services to build smart
applications. It uses machine learning, natural language processing, and deep learning to analyze data and
extract insights.

Key Watson services and capabilities include:

• Watson Assistant: Builds chatbots and virtual agents that can understand human conversation and
respond naturally. Useful in customer service.

• Watson Natural Language Understanding (NLU): Analyzes text to identify sentiment, emotion,
keywords, entities (like people, locations), and categories. Helps businesses understand customer
feedback and documents

• Watson Discovery: An AI-powered search engine that can mine large amounts of documents and
data to find answers and insights quickly.

• Watson Speech to Text & Text to Speech: Converts spoken language into written text and vice
versa, enabling voice-enabled applications

• Visual Recognition: Identifies objects, faces, and scenes in images or videos. Used in security,
retail, and healthcare.

• AutoAI: Automatically prepares data, selects the best algorithms, and builds optimized machine
learning models with minimal human input.

• Watson Knowledge Studio: Enables training Watson on domain-specific language to improve


accuracy for specialized fields like medicine or law.

Applications: Watson services are used in healthcare for diagnosis assistance, in finance for fraud
detection, in customer service for chatbots, and many more fields.

7. Give complete description of DeepQA architecture in Watson and explain its processing pipeline.

DeepQA is the architecture behind IBM Watson’s question-answering ability, designed to compete in
Jeopardy! and beyond.
Architecture components:

• Question Analysis Module: Parses and understands the natural language question to identify focus,
type, and keywords.

• Hypothesis Generation: Produces many possible answers (hypotheses) for the question.

• Evidence Retrieval: Searches a vast amount of data (documents, databases, web) to find evidence
supporting each hypothesis.

• Hypothesis Scoring: Evaluates and scores each hypothesis based on how well evidence supports it,
using machine learning models.

• Answer Ranking & Merging: Ranks hypotheses and combines similar answers to choose the best
one.

Processing Pipeline Steps:

1. Input: The user asks a question in natural language.


2. Parsing: Break down the question into understandable parts.
3. Candidate Generation: Generate multiple candidate answers.
4. Evidence Search: Retrieve evidence for each candidate answer.
5. Scoring: Each candidate is scored on confidence based on evidence.
6. Ranking: The best answer(s) with highest scores are selected.
7. Output: The system responds with the answer and supporting evidence.

This pipeline allows Watson to answer complex questions quickly and accurately by combining language
understanding, search, and statistical reasoning.

8. Explain how AutoAI works.

AutoAI is IBM Watson’s automated machine learning tool designed to help build machine learning models
faster and easier.

How AutoAI works:

• Data Ingestion: AutoAI takes the raw data input from the user.
• Data Preprocessing: It cleans the data by handling missing values, encoding categorical variables,
and scaling features.
• Feature Engineering: Creates new meaningful features and selects the most relevant ones
automatically.
• Model Selection: Tests many machine learning algorithms such as decision trees, logistic
regression, and neural networks.
• Hyperparameter Optimization: Tunes the parameters of models (like depth of trees) to improve
accuracy.
• Pipeline Creation: Combines all these steps into a single pipeline that can be deployed directly.
• Model Ranking: Evaluates models based on metrics and ranks them so users can pick the best
model.

Benefits:

• Saves time and expertise needed for model building.


• Improves model performance by testing many combinations automatically.
• Makes AI accessible to non-experts.

9. Briefly describe all the core technologies of cognitive computing.

Cognitive computing simulates human thought processes in a computerized model and helps machines
interact with humans naturally. Core technologies include:

• Natural Language Processing (NLP): Enables computers to read, understand, and generate human
language. Used in chatbots and language translation.
• Machine Learning (ML): Algorithms that learn from data to identify patterns and make decisions
without explicit programming.
• Computer Vision: Ability of machines to interpret and analyze visual data such as images and
videos. Used in facial recognition, autonomous cars.
• Speech Recognition: Converts spoken language into text, enabling voice commands and assistants
like Siri or Alexa.
• Knowledge Representation: Structuring data into graphs or ontologies so machines can use it to
reason and infer new information.
• Reasoning and Decision Making: Allows systems to make inferences and decisions based on data,
often using logic and probabilistic methods.

These technologies together help build systems that can perceive, reason, learn, and interact in human-like
ways.

10. Describe the whole step-by-step process followed in NLP.

Natural Language Processing (NLP) allows computers to understand and work with human language. The
main steps are:

1. Data Collection: Collect text data from sources like websites, social media, or documents.
2. Text Preprocessing: Clean the data by removing punctuation, special characters, and stop words
(common words like ‘the’, ‘is’).
3. Tokenization: Break text into smaller units like words or sentences.
4. Normalization: Convert words to their base or root form using stemming or lemmatization (e.g.,
‘running’ to ‘run’).
5. Part-of-Speech Tagging: Label each word with its grammatical role (noun, verb, adjective).
6. Named Entity Recognition (NER): Identify important entities like names, dates, locations in text.
7. Parsing: Analyze sentence structure to understand relationships between words.
8. Sentiment Analysis: Determine the emotion or opinion expressed in the text.
9. Feature Extraction: Convert text into numerical features using methods like Bag of Words or TF-
IDF for machine learning models.
10. Model Building: Use ML or deep learning algorithms to perform tasks like translation,
classification, or summarization.

This systematic process allows computers to understand and generate human language meaningfully.

11. Explain the ML workflow from data collection to deployment.

The machine learning workflow involves several key steps:

1. Data Collection: Gather relevant and high-quality data from sources such as databases, sensors, or
web scraping.
2. Data Preprocessing: Clean the data by handling missing values, removing duplicates, and
normalizing features.
3. Feature Engineering: Select important features or create new features to improve model learning.
4. Model Selection: Choose suitable ML algorithms (e.g., decision trees, SVM, neural networks)
based on the problem.
5. Model Training: Use training data to let the model learn patterns and relationships.
6. Model Evaluation: Test the model on unseen data (validation/test set) using metrics like accuracy,
precision, recall.
7. Hyperparameter Tuning: Adjust model parameters to improve performance.
8. Model Deployment: Integrate the trained model into production systems to make real-world
predictions.
9. Monitoring and Maintenance: Continuously monitor model performance and update it as data
changes.

This workflow ensures that ML models are reliable, accurate, and usable in real applications.

12. Explain the bias-variance tradeoff.

Bias-variance tradeoff is an important concept in machine learning that helps us understand how well a
model will perform on new data.

• Bias is the error caused by simplifying assumptions in the model.


o When bias is high, the model is too simple and cannot capture the true patterns in the data.
o This leads to underfitting, where the model performs poorly both on training and new data
because it misses important relationships.
• Variance is the error caused by the model being too sensitive to small fluctuations or noise in the
training data.
o When variance is high, the model fits the training data very well but does not generalize to
new data.
o This leads to overfitting, where the model learns the noise instead of the actual pattern.

The tradeoff:

• If the model is too simple → high bias, low variance → underfitting.


• If the model is too complex → low bias, high variance → overfitting.

Goal:

• Find the balance between bias and variance so the model generalizes well to new data, with minimal
total error.

Visual analogy:

• Imagine aiming at a target:


o High bias means all shots are far from the target (systematic error).
o High variance means shots are spread out and inconsistent (random error).
o Good model means shots are close and grouped near the target.

13. Explain different types of Artificial Intelligence based on capabilities:

Artificial Intelligence (AI) can be classified into three types based on what they can do:

a) Narrow AI (Weak AI):

• Designed to perform one specific task very well, like voice assistants (Siri, Alexa), spam filters, or
chess-playing programs.
• It cannot do anything beyond its specific task or adapt to new problems without reprogramming.
• Examples: Image recognition, language translation, recommendation systems.
• This is the AI we use today.

b) General AI (Strong AI):

• A hypothetical AI system with human-level intelligence.


• It can understand, learn, and apply knowledge across any task, similar to a human brain.
• Can think abstractly, reason, plan, and solve problems in many different domains.
• Still under research, no real General AI exists yet.

c) Super AI:
• A future AI that is more intelligent than humans in every way.
• It would surpass human cognitive abilities in creativity, problem-solving, emotions, and social
intelligence.
• Often a topic in science fiction and ethics discussions.
• Could potentially transform the world in ways we can’t fully predict.

14. Define Artificial Neural Network. Explain its basic structure with diagram.

Artificial Neural Network (ANN) is a type of machine learning model inspired by the human brain. It
helps computers recognize patterns and make decisions.

Definition:
An ANN consists of many simple units called neurons, connected together in layers. These neurons work
together to process information and learn from data.

Basic structure:

• Input Layer:
o Receives the raw data (features). Each neuron in this layer corresponds to one input feature.
• Hidden Layers:
o One or more layers between input and output.
o Each neuron receives inputs from the previous layer, processes them, and sends outputs to
the next layer.
o Hidden layers help the network learn complex patterns by combining inputs in different
ways.
• Output Layer:
o Produces the final result, such as a class label or prediction value.

How it works:

• Each neuron takes inputs, multiplies each by a weight, adds a bias, and passes the result through an
activation function to produce an output.
• The network learns by adjusting weights and biases during training to reduce prediction errors.

Diagram:
A simple ANN diagram shows:

• Circles (neurons) arranged in layers (input, hidden, output).


• Arrows showing connections with weights between neurons.

15. Explain the components of a neuron:

Each neuron in an artificial neural network has four main components:

a) Inputs:
• These are values or signals received from outside or from other neurons.
• For example, in image recognition, inputs could be pixel values.

b) Weights:

• Each input is multiplied by a weight.


• Weights determine how important an input is to the neuron's output.
• During training, the network adjusts weights to improve accuracy.

c) Bias:

• A constant value added to the weighted sum of inputs.


• It allows the neuron to shift the activation function to the left or right.
• Helps the model fit data better by providing more flexibility.

d) Activation Function:

• Applies a mathematical function to the sum of weighted inputs plus bias.


• Decides if the neuron should be activated (send a signal forward).
• Adds non-linearity to the network, enabling it to learn complex patterns.
• Common functions:
o Sigmoid: Outputs value between 0 and 1.
o ReLU (Rectified Linear Unit): Outputs zero if input is negative; else outputs input itself.
o Tanh: Outputs values between -1 and 1.

You might also like