Skip to content

Conversation

@Prathameshk2024
Copy link
Contributor

  • This R program implements the Viterbi Algorithm — a dynamic programming method used in Hidden Markov Models (HMMs) to find the most probable sequence of hidden states that could have produced a given sequence of observed events.

  • It works in three main steps:

  • Initialization: Calculates initial probabilities for each state using start and emission probabilities.

  • Recursion: Iteratively updates probabilities for each observation by considering all possible previous states.

  • Backtracking: Reconstructs the most likely state sequence from the stored backpointers.

  • Use case: Speech recognition, weather prediction, bioinformatics (e.g., gene sequence analysis).

  • Time Complexity: O(N × T)

  • Space Complexity: O(N × T)

Copilot AI review requested due to automatic review settings October 20, 2025 17:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds an implementation of the Viterbi Algorithm for Hidden Markov Model (HMM) decoding. The algorithm finds the most probable sequence of hidden states given observed events using dynamic programming.

Key Changes

  • Implements the core Viterbi algorithm with initialization, recursion, and backtracking steps
  • Provides a complete working example using a weather prediction scenario
  • Includes comprehensive documentation explaining the algorithm, complexity, and usage

Copilot AI review requested due to automatic review settings October 20, 2025 17:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings October 20, 2025 18:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Copilot AI review requested due to automatic review settings October 20, 2025 18:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@siriak
Copy link
Member

siriak commented Oct 25, 2025

It's already implemented here quantitative_finance/hidden_markov_model.r under a different name. Please correct if they are different

@siriak siriak closed this Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants