Questions tagged [markov-random-fields]

A markov random field (MRF) is an undirected graphical model.

Conditional Random Fields are special cases of Markov Random Fields.

See also

17 questions
4
votes
3 answers

Creating a 2D Gaussian random field from a given 2D variance

I've been trying to create a 2D map of blobs of matter (Gaussian random field) using a variance I have calculated. This variance is a 2D array. I have tried using numpy.random.normal since it allows for a 2D input of the variance, but it doesn't…
ThunderFlash
  • 412
  • 5
  • 20
4
votes
3 answers

Conditional Random Field (CRF) implementation / library

I am looking for a free C++ conditional random field (CRF) implementation but not for text processing. There are bunch of cool implementations: CRFsuite (for text processing) CRF++ (for text processing) JGMT (Matlab - MEX not…
mask
  • 539
  • 1
  • 5
  • 18
3
votes
2 answers

Error when trying to evaluate Markov Random Fields using mgcv::gam "mismatch between nb/polys supplied area names and data area names"

I tried to implement this great blog post by Gavin Simpson using data downloaded from the cancensus package, but I get the following error when trying to evaluate the gam: Error in smooth.construct.mrf.smooth.spec(object, dk$data, dk$knots) : …
Zoltan
  • 760
  • 4
  • 15
2
votes
1 answer

Probability as input to Markov random field (MRF): how to refine the cmex code?

I am very new with MRF and not that much good at programming. I have obtained probability map from semantic segmentation using a CNN, I have to optimize the segmentation by using Markov Random Fields (MRF). I download the code provided by Shai…
S.EB
  • 1,966
  • 4
  • 29
  • 54
2
votes
1 answer

Is there any practical tutorial for Conditional random fields (CRF) and Markov random fields (MRF)?

I have started reading on MRF and CRF in a short-term duration; however, I have a lot of difficulty in understanding the concepts. Can anyone suggest some online resources for theoretical and basic understanding? I have a lot of difficulty in…
S.EB
  • 1,966
  • 4
  • 29
  • 54
1
vote
2 answers

When I try to implement MarkovModel using pgmpy, is there a way to fix KeyError?

I'm trying to implement Markov Random Field. Among them, I would like to obtain a value of phi(A|B = 0, C = 1). However, with the evidence option, KeyError: 'B' occurs. I don't know why this happens. Below is the code. from pgmpy.inference import…
prior
  • 13
  • 3
1
vote
0 answers

Markov random field vs Markov Logic Network

I am new in statistic area please could you help Please, could anyone give me a clear difference between Markov random field and Markov Logic network? what is the difference? I know that MRF is an undirect type of graphical model. but what is the…
SFS
  • 31
  • 6
1
vote
0 answers

How to refine the Graphcut cmex code based on a specific energy functions?

I download the following graph-cut code: https://github.com/shaibagon/GCMex I compiled the mex files, and ran it for pre-defined image in the code (which is rgb image) I wanna optimize the image segmentation results, I have probability map of the…
1
vote
1 answer

why is the exact inference of the MRF in the grid graph impossible

The question is as written in the title There is a 3x3 grid graph at the above image. We can convert it into junction tree. Then it is possible to use message-passing(product-sum algorithm) for the inference(estimating likelihood/posterior etc). So…
1
vote
1 answer

Sequence learning using Conditional Random Fields?

I am new to sequential learning (& machine learning) & am trying to understand how to use conditional random fields to solve my problem. I have a dataset which is a sequential log of when & where did an end user of my application worked. For…
0
votes
0 answers

solving simple MRF problem with graph-cut

I'm trying to solve this simple question with graph cut: I draw the graph and I get that that all pixel label sould be 1 while 000 is minimizing E, what did I missed?
0
votes
1 answer

How to predict gam random field markov model to grid?

I am working on a similar problem as the example in the mgcv package. I have created a similar model and would like to predict to grid level instead of the districts identified in the training data. Is this possible? If so, how? I have created a…
user3047435
  • 151
  • 4
  • 13
0
votes
2 answers

Gibbs sampling gives small probabilities

As part of our final design project, we have to design a Gibbs sampler to denoise an image. We have chosen to use the Metropolis Algorithm instead of a regular Gibbs sampler. A rough sketch of the algorithm is as follows, all pixels are 0-255…
0
votes
1 answer

Why is inference in Markov Random Fields hard?

I'm studying Markov Random Fields, and, apparently, inference in MRF is hard / computationally expensive. Specifically, Kevin Murphy's book Machine Learning: A Probabilistic Perspective says the following: "In the first term, we fix y to its…
Mark
  • 409
  • 2
  • 6
  • 17
0
votes
1 answer

Fully Connected Pairwise Graphical Models

Can a fully connected, pairwise graphical model estimate an arbitrary joint distribution on N binary variables?
Aerole
  • 105
  • 2
  • 10
1
2