Skip to content

Adding Markov Model #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

Adding Markov Model #5

wants to merge 4 commits into from

Conversation

PhilippSchmelter
Copy link
Collaborator

Closes #4

This pull request introduces a Markov model to simulate household load timestamps, along with significant updates to the codebase for preprocessing, transition matrix computation, and visualization. The most important changes include adding bucketing functionality, implementing parallelized transition matrix computation, and enhancing plotting capabilities for transition matrices.

Markov Model Enhancements

  • Added Markov model to simulate timestamps: A new feature was added to simulate household load timestamps using a Markov model. This is documented in the CHANGELOG.md file.

Preprocessing Updates

  • Bucket assignment and timestamp parsing: Introduced the Bucket class and the add_bucket_columns function in src/preprocessing/bucketing.py to classify timestamps into buckets based on month, weekend/weekday, and quarter-hour intervals. This enables efficient grouping for Markov model computations.

Transition Matrix Computation

  • Parallelized transition matrix computation: Implemented the build_transition_matrices_parallel function in src/markov/transmats.py to compute transition matrices for each bucket in parallel, improving performance for large datasets. It also includes Laplace smoothing for probability calculations.

Visualization Enhancements

  • Transition matrix plotting: Added the plot_transition_matrix function in src/markov/plothelper.py to visualize transition matrices with detailed titles and color-coded probabilities. This aids in understanding the transitions between states.

Main Script Updates

  • Integrated new features into src/main.py: Updated the main script to load and preprocess data, compute transition matrices, save results, and visualize selected matrices using the new functionalities. [1] [2]

@PhilippSchmelter PhilippSchmelter self-assigned this May 20, 2025
@PhilippSchmelter PhilippSchmelter added the enhancement New feature or request label May 20, 2025
@PhilippSchmelter PhilippSchmelter deleted the ps/#4-markovModel branch June 3, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding markov model
1 participant