Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.81 KB

README.md

File metadata and controls

36 lines (24 loc) · 1.81 KB

Refactored Lecture Code - CS50AI Lecture 2, Uncertainty


This repository contains a refactored version of the source code used in Lecture 2 (Uncertainty) of the CS50AI course. The original code relied on an outdated version of the pomegranate library, which raised errors and could not be easily updated to work with modern environments.

To address this issue, I have refactored the code to use pgmpy and hmmlearn, two well-documented, up-to-date, and cross-platform libraries for probabilistic inference and Hidden Markov Models (HMMs).

I have kept the structure and comments as close as possible to the original code while ensuring clarity and simplicity. I hope this is helpful for anyone currently learning CS50AI.

Resources

(Note: The first commit in this repository contains the original, unmodified code as a reference.)

Installation

To run the refactored code, install the required dependencies:

pip install pgmpy hmmlearn

Usage

Run the refactored scripts as you would with the original course materials:

python [folder]/filename.py

Ensure that your Python environment is set up properly and that you have all required dependencies installed.

Note

  • Contributions and feedback are welcome!