Glossário

Modelo oculto de Markov (HMM)

Descobre os modelos de Markov ocultos (HMMs), os seus princípios, aplicações no reconhecimento da fala, bioinformática e IA, e como inferem estados ocultos.

Treina os modelos YOLO simplesmente
com Ultralytics HUB

Aprende mais

A Hidden Markov Model (HMM) is a statistical model used to describe systems that transition between states over time. In HMMs, the sequence of states the system passes through is not directly observable (it's "hidden"), but it can be inferred from a sequence of observable outputs or emissions produced by each state. HMMs are particularly powerful for modeling sequential data and time series analysis across various domains within Artificial Intelligence (AI) and Machine Learning (ML). They belong to a class of models known as probabilistic graphical models, providing a framework to handle uncertainty in dynamic systems.

Conceitos fundamentais

HMMs are defined by two main stochastic (random) processes:

  1. Hidden States: An underlying, unobservable Markov chain of states. The system transitions between these hidden states according to specific probabilities. The core assumption is the Markov property: the probability of transitioning to the next state depends only on the current state, not on the sequence of states that preceded it.
  2. Observable Emissions: Each hidden state generates an observable output or emission based on a certain probability distribution. These emissions are the data we actually observe.

O modelo é caracterizado por:

  • States: A finite set of hidden states.
  • Observations: A finite set of possible emissions or observations.
  • Transition Probabilities: The probabilities of moving from one hidden state to another.
  • Emission Probabilities: The probabilities of observing a particular emission given the system is in a specific hidden state.
  • Initial State Distribution: The probabilities of the system starting in each hidden state.

Como funcionam os modelos de Markov ocultos

Working with HMMs typically involves addressing three fundamental problems, often tackled using specific algorithms detailed in tutorials like Rabiner's:

  1. Evaluation Problem: Given an HMM and a sequence of observations, what is the probability that the observations were generated by the model? (Solved using the Forward algorithm).
  2. Decoding Problem: Given an HMM and a sequence of observations, what is the most likely sequence of hidden states that produced these observations? (Solved using the Viterbi algorithm).
  3. Learning Problem: Given a sequence of observations (or multiple sequences), how can we adjust the HMM parameters (transition and emission probabilities) to best account for the observed data? (Often solved using the Baum-Welch algorithm, an instance of the Expectation-Maximization algorithm). This is crucial for model training.

Aplicações no mundo real

Os HMMs têm sido aplicados com sucesso em vários domínios:

  • Speech Recognition: This is a classic application. Hidden states can represent phonemes (basic units of sound), while observations are acoustic features extracted from the speech signal. The HMM decodes the most likely sequence of phonemes given the audio, forming the basis for recognizing words. Tools like CMU Sphinx historically relied heavily on HMMs.
  • Bioinformatics: HMMs are widely used for sequence analysis. For example, in gene finding, hidden states might represent coding regions, non-coding regions, or specific gene structures (like start codons, exons, introns). The observations are the DNA base pairs (A, C, G, T). The model helps identify gene locations within a long DNA sequence. Software like HMMER uses profile HMMs for protein sequence analysis, comparing sequences against databases like the NCBI Gene database.
  • Natural Language Processing (NLP): Used for tasks like part-of-speech tagging, where hidden states are grammatical tags (noun, verb, adjective) and observations are the words in a sentence. Also applied in Named Entity Recognition (NER).
  • Computer Vision (CV): Applied in gesture recognition, activity recognition from video, and sometimes historically in object tracking, though often superseded by methods like Kalman Filters or deep learning approaches.
  • Finance: Modeling market regimes (e.g., bull vs. bear markets) as hidden states based on observable financial indicators.
  • Medical Image Analysis: Analyzing sequences of medical images or signals over time.

Comparação com conceitos relacionados

É importante distinguir os HMMs de outros modelos de sequência:

While newer deep learning methods often achieve state-of-the-art results, HMMs remain valuable for their interpretability (explicit states and probabilities) and effectiveness, especially when training data is limited or domain knowledge can be incorporated into the model structure. Understanding foundational concepts like HMMs provides valuable context in the broader ML landscape, even when using platforms like Ultralytics HUB which primarily facilitate the development and deployment of DL models like YOLOv8 or YOLO11.

Lê tudo