Skip to content
Pablo Rodriguez

Jupyter Notebooks

Jupyter Notebook is the most widely used tool by machine learning and data science practitioners today. It serves as the default environment for coding, experimenting, and testing ideas in the field.

  • Difficulty: Very easy, designed for guaranteed success
  • Requirements: No coding needed - just run provided code
  • Scoring: No marks or grades involved
  • Process: Open and run code one line at a time from top to bottom
  • Purpose: Gain deeper understanding of how machine learning code works
  • Time: Complete relatively quickly by running line-by-line

Benefits of Optional Labs:

  • See machine learning code in action
  • Understand implementation details
  • Build familiarity with common patterns
  • No pressure environment for learning
  • Introduction: Starting next week
  • Purpose: Opportunity to write machine learning code yourself
  • Progression: Build on concepts from optional labs

Two Types of Cells

Markdown Cells:

  • Contain formatted text and explanations
  • Describe what the code does
  • Can be edited if desired

Code Cells:

  • Contain executable Python code
  • Run with Shift+Enter
  • Display results below the cell
  1. Select a cell: Click on it
  2. Run a cell: Press Shift+Enter
  3. Edit text: Click on markdown cells to modify
  4. Read and predict: Try to understand what code will do before running it
  • Read the code: Try to understand what it will do
  • Make predictions: Guess the expected output
  • Run the code: Press Shift+Enter to see actual results
  • Experiment: Feel free to edit and modify the code
  • Explore: Change values and see what happens

The optional labs provide hands-on experience with:

  • Common Python code patterns
  • Machine learning implementations
  • Data visualization
  • Algorithm behavior

The first optional lab demonstrates:

  • Basic Python syntax
  • How to define functions (like straight line functions)
  • Interactive parameter adjustment
  • Visualization of results

Spending time with Jupyter notebooks builds familiarity with the professional machine learning workflow. Many practitioners spend significant time in these environments, making this experience valuable for real-world applications.

Understanding Jupyter notebooks prepares you for the transition from learning concepts to implementing practical machine learning solutions, setting the foundation for more advanced topics in subsequent videos.