Conditional random fields are a form of ๐Ÿ—ณ๏ธ Markov Random Fields that models the conditional distribution . Our graph contains variables and , and the distribution is

with partition function

This is similar to a standard Markov random field, but it now depends on .

We commonly assume the factors have form

where describes the compatibility between and . Sometimes, the factor may take in the entire and use it to compare . We do this because is given as input, and thereโ€™s no need to model since weโ€™re only looking for .