Ccs337 Cs Unit IV
Ccs337 Cs Unit IV
PART-A
• Generative models capture the joint probability p(X, Y), or just p(X) if there are
no labels.
predictive text services, facial recognition software, fraud detection and supply
chain management solutions.
o Autoregressive models
o Bayesian networks
o Diffusion models
• Cost optimization
• Handling of missing data
• Trial and error is another type of heuristic in which people use a number of
different strategies to solve something until they find what works. Examples
of this type of heuristic are evident in everyday life.
• People use trial and error when playing video games, finding the fastest
driving route to work, or learning to ride a bike (or any new skill).
One often hears the warning, “correlation does not imply causation”. By
“correlation” we mean a different kind of dependence between events or functions—
statistical dependence.
There are four types of dependencies in casual inference they are as follows:
➢ Unconditionally Independent
➢ Unconditionally Dependent
➢ Conditionally Independent
➢ Conditional dependence
PART-B
Generative models are machine learning models that create new data similar
to the data they were trained on. They are a type of artificial intelligence (AI) that
use neural networks to learn patterns in data and generate new content.
Discriminative models
classifiers that attempt to identify the relationships between features and labels
and then assign class labels to new data based on the conditional probability of
those labels.
• For example, a discriminative model trained to differentiate between images of
fish and birds can guess whether images are more likely to be fish or birds.
Image recognition, a type of classification in machine learning, is a common
application for discriminative models.
• While generative models and discriminative models have distinct differences,
they often work together, such as in a generative adversarial network (GAN).
• In general Generative models can generate new data instances and
Discriminative models discriminate between different kinds of data instances.
• Generative models capture the joint probability p(X, Y), or just p(X) if there are
no labels.
• Refer figure 4.1 for the difference between Discriminative and Generative models
Clustering models
• Clustering models are used in unsupervised learning tasks to group records within
a data set into clusters. They can identify similar items and also learn what
separates those items from other groups in the dataset.
• Clustering models lack prior knowledge of the items in the dataset, including
knowledge of how many groups there might be. A market researcher might use a
clustering model to identify buyer personas within their target demographics.
Predictive models
• Predictive models process historical data to make predictions about future events
using machine learning and statistical analysis. They are often used to help
business leaders make data-driven decisions. Predictive models also power
predictive text services, facial recognition software, fraud detection and supply
chain management solutions.
o Autoregressive models
o Bayesian networks
o Diffusion models
• This model is based on ML and deep neural networks. In it, two unstable neural
networks -- a generator and a discriminator -- compete against each other to
provide more accurate predictions and realistic data.
aim to represent data more effectively, whereas the decoders regenerate the
original data set more efficiently. Popular applications of VAEs include anomaly
detection for predictive maintenance, signal processing and security
analytics applications.
Autoregressive models
• Autoregressive models predict future values based on historical values and can
easily handle a variety of time-series patterns. These models predict the future
values of a sequence based on a linear combination of the sequence's past
values.
• Autoregressive models are widely used in forecasting and time series analysis,
such as stock prices and index values. Other use cases include modeling and
forecasting weather patterns, forecasting demand for products using past sales
data and studying health outcomes and crime rates.
Bayesian networks
Diffusion models
Generative models offer the following advantages, which make them valuable in
various applications:
Generative models provide several advantages, but they also have the following
drawbacks:
• Computational requirements. Generative AI systems often require a large
amount of data and computational power, which some organizations might find
prohibitively expensive and time-consuming.
• Quality of generated outputs. Generated outputs from generative models
might not always be accurate or free of errors. This could be caused by several
and animals adapt their behavior based on past events, either by reinforcement or
association.
In the context of cognitive science and artificial intelligence, conditioning can be
divided into two primary types:
1. Bayesian Inference:
• Bayesian inference models suggest that the human mind operates based on
principles of probabilistic reasoning.
• Individuals update their beliefs and make decisions by combining prior
knowledge or beliefs with new evidence, following Bayes' theorem.
• This allows for flexible and adaptive decision-making, where beliefs can be
revised as new information becomes available.
• Example of Bayesian inference with a prior distribution, a posterior
distribution, and a likelihood function as shown in the figure 4.3. The
prediction error is the difference between the prior expectation and the peak
of the likelihood function (i.e., reality). Uncertainty is the variance of the
prior. Noise is the variance of the likelihood function.
Types of Heuristics
Availability
• The availability heuristic involves making decisions based upon how easy it
is to bring something to mind. When you are trying to make a decision, you
might quickly remember a number of relevant examples.
• For example, imagine you are planning to fly somewhere on vacation. As you
are preparing for your trip, you might start to think of a number of recent
airline accidents. You might feel like air travel is too dangerous and decide
to travel by car instead. Because those examples of air disasters came to
mind so easily, the availability heuristic leads you to think that plane crashes
are more common than they really are.
Familiarity
• The familiarity heuristic refers to how people tend to have more favorable
opinions of things, people, or places they've experienced before as opposed
to new ones. In fact, given two options, people may choose something they're
more familiar with even if the new option provides more benefits.5
Representativeness
Affect
Anchoring
The anchoring bias involves the tendency to be overly influenced by the first
bit of information we hear or learn.8 This can make it more difficult to
consider other factors and lead to poor choices. For example, anchoring bias
can influence how much you are willing to pay for something, causing you
to jump at the first offer without shopping around for a better deal.
Scarcity
• Trial and error is another type of heuristic in which people use a number of
different strategies to solve something until they find what works. Examples
of this type of heuristic are evident in everyday life.
• People use trial and error when playing video games, finding the fastest
driving route to work, or learning to ride a bike (or any new skill).
3. Dual-Process Theory
• Dual-process theory proposes that there are two distinct cognitive systems
involved in decision-making and reasoning.
• If they are related, or dependent, the relation is only very weak and liable to be
ignored in our mental models.
• Causal structure is local in the sense that many events that are related are not
related directly:
• They are connected only through causal chains of several steps, a series of
intermediate and more local dependencies.
• And the basic dependencies are directed: when we say that A causes B, it means
something different than saying that B causes A.
• The causal influence flows only one way along a causal relation—we expect that
manipulating the cause will change the effect, but not vice versa—
but information can flow both ways—learning about either event will give us
information about the other.
• What does it mean to believe that A depends causally on B?
• Viewing cognition through the lens of probabilistic programs, the most basic
notions of causal dependence are in terms of the structure of the program and
the flow of evaluation (or “control”) in its execution.
• Expression A causally depends on expression B if it is necessary to evaluate B
in order to evaluate A. (More precisely, expression A depends on expression B if
it is ever necessary to evaluate B in order to evaluate A.)
Example
• For instance, in this program A depends on B but not on C (the final expression
depends on both A and C):
• Note that causal dependence order is weaker than a notion of ordering in time—
one expression might happen to be evaluated before another in time (for
instance C before A), but without the second expression requiring the first. (This
notion of causal dependence is related to the notion of flow dependence in the
programming language literature.)
• For example, consider a simpler variant of our medical diagnosis scenario:
Output:
• The causal dependence structure is not always immediately clear from examining a
program, particularly where there are complex functions calls.
• Another way to detect (or according to some philosophers, such as Jim Woodward,
to define) causal dependence is more operational, in terms of “difference making”:
If we manipulate A, does B tend to change? By manipulate here we don’t mean an
• Instead we mean actually edit, or intervene on, the program in order to make an
expression have a particular value independent of its (former) causes.
Output:
Statistical Dependence
o One often hears the warning, “correlation does not imply causation”. By
“correlation” we mean a different kind of dependence between events or
functions—statistical dependence.
o A and B are statistically dependent, if learning information about A tells us
something about B, and vice versa.
o In the language of webppl: using condition to make an assumption about A
changes the value expected for B.
o Statistical dependence is a symmetric relation between events referring to
how information flows between them when we observe or reason about them.
(If conditioning on A changes B, then conditioning on B also changes A.
Why?)
o The fact that we need to be warned against confusing statistical and causal
dependence suggests they are related, and indeed, they are.
o In general, if A causes B, then A and B will be statistically dependent. (One
might even say the two notions are “causally related”, in the sense that
causal dependencies give rise to statistical dependencies.)
o Diagnosing statistical dependence using condition is similar to diagnosing
causal dependence through intervention.
o Condition on various values of the possible statistical dependent, here A, and
see whether it changes the distribution on the target, here B:
Output:
There are four types of dependencies in casual inference they are as follows:
i. Unconditionally Independent
Unconditionally Independent
Unconditionally Dependent
o When two variables, X and Y, are unconditionally dependent, it means they have
a direct relationship without considering any other variables.
o Example:
Conditionally Independent
Conditional dependence
Example:
Truth Table
Data Analysis
Data analysis is the process of examining data to find patterns and trends,
and to draw conclusions. It can help organizations make better decisions, improve
efficiency, and predict future events.
➢ Statistical Inference:
• Inference models of cognition often rely on statistical techniques to test
hypotheses and draw conclusions about the underlying cognitive
mechanisms.
• Common statistical methods used in this context include regression
analysis, analysis of variance (ANOVA), structural equation modeling, and
Bayesian inference.
• These techniques allow researchers to examine the relationships between
variables, test the significance of effects, and evaluate the fit of theoretical
models to the observed data.
➢ Model Evaluation and Comparison:
• Researchers may compare different inference models of cognition by
evaluating their ability to explain the observed data.
• This may involve measures of model fit, such as R-squared, Akaike
Information Criterion (AIC), or Bayesian Information Criterion (BIC), to
assess the trade-off between model complexity and explanatory power.
• Comparing the performance of competing models can help identify the most
suitable theoretical frameworks for understanding cognitive processes.
➢ Validation and Generalization:
• To ensure the reliability and generalizability of the inference models,
researchers often conduct validation studies, such as cross-validation or out-
of-sample testing.
• This helps assess the model's ability to make accurate predictions or
inferences on new, unseen data, rather than just fitting the original dataset.
• Successful validation can increase confidence in the model's ability to
capture the underlying cognitive mechanisms.
➢ Sensitivity Analysis and Robustness:
• Researchers may perform sensitivity analyses to understand how
changes in the model's parameters or assumptions affect the inferences
drawn.
• This can help identify the critical factors that drive the model's behavior
and assess the robustness of the conclusions.
• Robust inference models are less sensitive to minor variations in the data
or modeling assumptions, making them more reliable for practical
applications.
Some of the key algorithms and techniques used in inference models of cognition:
1. Bayesian Inference:
• Bayesian inference is a powerful framework for modeling cognitive processes,
as it allows for the integration of prior knowledge and new evidence to update
beliefs. - Algorithms such as Markov Chain Monte Carlo (MCMC) methods,
variational inference, and belief propagation are commonly used to perform
Bayesian inference in cognitive models. - These algorithms enable the
computation of posterior probabilities and the exploration of complex, high-
dimensional parameter spaces.
2. Neural Networks and Deep Learning:
• Neural networks and deep learning models have become increasingly popular
in cognitive science, as they can capture complex, nonlinear relationships
between variables.
• Algorithms like backpropagation, convolutional neural networks, and
recurrent neural networks have been applied to model various cognitive
processes, such as perception, language processing, and decision-making.
• These models can learn representations from data and make inferences in a
flexible and data driven manner.
3. Probabilistic Graphical Models:
• Probabilistic graphical models, such as Bayesian networks and Markov
random fields, provide a framework for representing and reasoning about the
dependencies between variables in cognitive models.
• Algorithms like belief propagation, junction tree, and variational inference
are used to perform inference and learning in these graphical models.
• Graphical models can capture causal relationships, handle uncertainty, and
provide interpretable representations of cognitive processes.
4. Reinforcement Learning:
• Reinforcement learning algorithms, such as Q-learning, policy gradients, and
temporal difference learning, have been used to model how individuals learn
and make decisions through trial-and-error interactions with their
environment.
• These algorithms can capture the dynamic, goal-oriented nature of cognitive
processes and explain how individuals adapt their behavior based on
feedback and rewards.
5. Symbolic Reasoning:
• Symbolic reasoning approaches, such as logic-based systems and rule-based
models, have been used to represent and reason about cognitve pirocesses
in a more explicit, rule-driven manner.
• Algorithms like theorem proving, constraint satisfaction, and logic
programming have been applied in this context to model high-level cognitive
abilities, such as problem-solving, planning, and reasoning.
6. Hybrid Approaches:
• Many modern inference models of cognition combine multiple algorithms and
techniques, leveraging the strengths of different approaches.
• For example, hybrid models may integrate Bayesian inference with neural
networks or combine symbolic reasoning with reinforcement learning.
• These hybrid approaches can capture the richness and complexity of human
cognition, drawing on the complementary strengths of various computational
frameworks.