---
author:
- Fitting with AI
date: "by [Eugeniy E. Mikhailov](http://physics.wm.edu/~evmik/) and
  [Greg Bentsen](https://physics.wm.edu/~gbentsen/)"
title: Coding Lab 5
---

## Logistics and Agenda

Homework 3 due Monday Sept 21 at 11:59pm

\

Agenda

-   This week:  AI tools, data reduction & fitting
-   Next week:  root-finding, numerical integration

\

Today

-   AI fitting exercise (20 min)
-   Coding time (30 min)

## In-Class Assessment

Recall from the syllabus:

> | Your final grade for the course will be determined from the
>   following grading weight distribution:
> | - Quizzes: 10%
> | - Homeworks: 15% **+5% (in class assessment)**
> | - Midterm projects: 20% + 20%
> | - Final project: 15% take home + 15% in class

\

We will start doing these assessments every Friday coding lab, starting
today.

We cannot talk to everyone at once, so we will pick randomly until we
have gone through the whole roster.

Be prepared to discuss **your most recent homework submission**.

**No AI tools** are allowed during this assessment.

\

We may ask you some of the following questions:

::: incremental
-   Explain these lines of your code
-   Explain why you chose to implement your code this way
-   Modify your code slightly
-   Explain your validation procedures
-   Change a parameter and predict the outcome before re-running
:::

## Example AI Workflow

Here we will work through a complete cycle of the AI workflow:

1.  Explain existing code
2.  Critique existing code
3.  Plan modifications
4.  Implement modifications
5.  Verification
6.  Interpretation and Validation

At every step we will exercise scientific judgment to ensure the results
are sound.
