# 5.2 Using markov random fields for election prediction  (Page 4/5)

 Page 4 / 5
$Z\left(\theta \right)=\sum _{\xi }\text{exp}\left\{\sum _{i=1}^{D},{\theta }_{i},{\mu }_{i},\left({\xi }_{j}\right)\right\}$

Note that the sum over $\xi$ in the partition function refers to the sum over all possible $\xi$ , not just the $\xi$ that have been observed. This fact makes computation of the partition function intractable and we must approximate it. Following a sampling-based learning technique, we conclude [link] :

$\text{ln}Z\left(\theta \right)\approx \text{ln}\left(\frac{1}{T},\sum _{t=1}^{T},\text{exp},\left\{\sum _{i=1}^{D},\left({\theta }_{i}-{\theta }_{i}^{0}\right),{\mu }_{i},\left({\xi }_{t}\right)\right\}\right)+\text{ln}Z\left({\theta }^{0}\right)$

Where ${\theta }^{0}$ is some set of parameters from which T samples are drawn (20 in our case). Since $\text{ln}Z\left({\theta }^{0}\right)$ is a constant, we can leave it out of the optimization's objective function and we solve the MLE problem via gradient ascent.

$\nabla {\theta }_{i}^{t-1}=\sum _{j=1}^{13}{\mu }_{i}\left({\xi }_{j}\right)-\frac{13{\sum }_{t=1}^{T}\left({\mu }_{i},\left({\xi }_{t}\right),\text{exp},\left\{{\sum }_{r=1}^{D},\left({\theta }_{r}^{t-1}-{\theta }_{r}^{t-2}\right),{\mu }_{r},\left({\xi }_{t}\right)\right\}\right)}{{\sum }_{t=1}^{T}\text{exp}\left\{{\sum }_{r=1}^{D},\left({\theta }_{r}^{t-1}-{\theta }_{r}^{t-2}\right),{\mu }_{r},\left({\xi }_{t}\right)\right\}}$
${\theta }^{t}={\theta }^{t-1}+s*\nabla {\theta }^{t-1}$

Where $s$ is some small step size. We update ${\theta }^{0}$ on each iteration to be ${\theta }^{t-2}$ . This is due to the fact that the partition function approximation is only reasonable in a neighborhood of ${\theta }^{0}$ [link] . It follows that the $\xi$ 's which are indexed by t are drawn from a model with parameters ${\theta }^{t-2}$ , while the $\xi$ 's indexed by j still represent the historical data.

## Correcting for lack of data

Due to the small number of historical observations (13) and the large number of possible combinations for any edge ( $60\text{states}*60\text{states}=3,600$ combinations), we must come up with a more concise way to learn the relationships between counties. To that end, we look not at the absolute voting percentages of counties but rather the difference in voting percentage between each pair of neighboring counties. This method has the added bonus of circumventing the problem of overall change that has affected every county. Unfortunately, there are still 119 possible differences that could occur (-59,-58,...,0,...58,59) and only 13 elections to determine the frequency with which each difference occurs. Therefore, we place each difference into a cluster, e.g. [-9,-6]. We use 11 clusters total and since the differences between counties are fairly consistent between years, the 13 observations should be sufficient for an approximation of the marginal probabilities for each edge. These approximation techniques do not affect the way we solve the problem via gradient ascent. However, once gradient ascent is finished we must convert our small $\theta$ into standard long form (as displayed in Section 2.1).

## Performing map inference

Due to our approximation techniques in the learning process, we are confronted with a problem when attempting to predict the 2012 election. Since the entire model is based off relativity, any outcome for a particular county is equally likely as long as the rest of the model shifts with it. In order to ensure we do not get extremely low or high results, we must fix some subset of the counties as a starting point for the model. In order to do this, we utilize linear regression techniques (as discussed in the next section). Once the model is partially filled in, we solve the binary program stated above with our learned $\theta$ (in standard long form) via Gurobi Optimizer.

## Multivariate regression

Multivariate Linear Regression is commonly used in social sciences as a means of predicting future outcomes based off of known data. It will provide us with a comparison as well as a starting off point for our Markov Random Field model. Our model will have Incumbent Party Vote % as the dependent variable. That is, if a Democratic president is currently in office, then we will be predicting the voting %'s earned by this year's Democratic Candidate.

where we get a research paper on Nano chemistry....?
what are the products of Nano chemistry?
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
Preparation and Applications of Nanomaterial for Drug Delivery
revolt
da
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
Got questions? Join the online conversation and get instant answers! By Rohini Ajay By Sandhills MLT By OpenStax By Sandhills MLT By Melinda Salzer By Marion Cabalfin By OpenStax By Yasser Ibrahim By OpenStax By Robert Morris