# Types of Graphical Models in Machine Learning

## Graphical Models in Machine Learning:

Graphical model refers to a graph to represent relationships among a set of variables. By a set of nodes and edges, we design these models to connect those nodes. Define a graph G by the following equation:

G = (V, E)

Where V is a finite set of vertices or nodes

E ⊆ V x V is a finite set of edges, links or arcs.

A graphical model encodes conditional independence assumptions between variables. It represents random variables as nodes or vertices. Conditional Independence assumptions as missing arcs.

**Example: **

**1. Road Maps:** It represents crossings and streets by nodes and edges.

**2. Electrical Circuits:** It represents electronic components and edges by nodes and edges.

**3. Computer Networks:** It represents computers and connections by nodes and edges.

**4. World Wide Web:** It represents web pages and links by nodes and edges.

**5. Flowcharts:** It represents boxes and arrows by nodes and edges.

__Types of Graphical Models:__

There are mainly two types of graphical models:

### 1. Uni-directed Graphical Models:

An uni-directed graph is one in which edges have no orientation. The edge (a, b) is identical to the edge (b, a), they are not ordered pairs, but sets (u, v) or 2-multi sets of vertices. The largest number of edges in an uni-directed graph without a self-loop is n(n-1)/2.

A graph G is indirect if “A, B” V: (A, B) “E ⟹ (B, A)” E

Identify the two ordered pairs (A, B) and (B, A) and represent by only one uni-directed edge. These graphical models are also called Markov network. A Markov random field also known as a Markov network. It is a model over an uni-directed graph. These models are useful in modeling a variety of phenomena, where one can’t describe a directional to the interaction between variables.

### 2. Directed or Bayesian Networks:

A directed graph or digraph is an ordered pair D = (V, A) with

1. Va set whose elements are called vertices or nodes

2. Aa set of ordered pairs of vertices called arcs, directed edges or arrows.

Consider an edge (A. B) and direct it from A towards B. Directed Graphical models are also called **Bayesian Networks or Bayes nets (BN)**. A Bayesian network is a directed conditional independence graph of a probability distribution. It is along with the family of unconditional probabilities of the factorization brought by the graph.

A Bayesian Network or Bayes nets is a probabilistic graphical model. It represents a set of random variables and their conditional dependencies via a **directed acyclic graph (DAG)**.