\(n\)-D
AI 101
What is \(n\)-D?
- Or longer, \(n\)-dimensional
Why do we care?
Recall Star Wars over which I claimed:
- Linear regression can be cool.
- But it is not intelligent, probably.
- Perhaps, if it appears intelligence the site of the intelligence is actually the human user, not the computer.
We are intelligent. Let’s try again.
Recall Release Dates
| Episode | Year |
|---|---|
| 4 | 1977 |
| 5 | 1980 |
| 6 | 1983 |
| Episode | Year |
|---|---|
| 1 | 1999 |
| 2 | 2002 |
| 3 | 2005 |
| Episode | Year |
|---|---|
| 7 | 2015 |
| 8 | 2017 |
| 9 | 2019 |
Thinking Model
- Perhaps instead of thinking of films (1 dimension) vs year (1 dimension)…
- Consider “trilogy-wise”
- In which trilogy is some film (a dimension)
- Which film within a trilogy is some film (another dimension)
| Episode | Trilogy # | # in Trilogy |
|---|---|---|
| 1 | 2 | 1 |
| 2 | 2 | 2 |
| 3 | 2 | 3 |
| 4 | 1 | 1 |
| 5 | 1 | 2 |
| 6 | 1 | 3 |
| 7 | 3 | 1 |
| 8 | 3 | 2 |
| 9 | 3 | 3 |
| Episode | Trilogy Year | Year in Trilogy |
|---|---|---|
| 1 | 1999 | 0 |
| 2 | 1999 | 3 |
| 3 | 1999 | 6 |
| 4 | 1977 | 0 |
| 5 | 1977 | 3 |
| 6 | 1977 | 6 |
| 7 | 2015 | 0 |
| 8 | 2015 | 2 |
| 9 | 2015 | 4 |
Set up
- We will visually examine the Star Wars releases in \(n\)-D.
- We will make some informed estimate of the release date of next trilogy
- In the post-lab, you will comment on the comparative merits of an \(n\)-D approach to the naive linear approach.
Plotting in \(n\)-D
- There is one difficulty.
- Computer monitors have only two dimensions, right?
Wrong!
- Just because something is represented in a dimension like up, down, or… out?
- We can also use shape, color, size, or more subtle manners.
Citations
- I am stealing my slides from my scientific computing course
- I needed one more dimension so I found Star Wars “in-universe” years expressed as (B)BY
- It’s from Reddit… just regard that as accurate I guess.
Extended example
- You can copy paste this data, as is, into a Colab code cell.
- And try things out!
Data
In order these are:
- Episode Number (
eps) - Trilogy Number (
tri) - Number in Trilogy (
num) - In-universe year (
bby)
Matplotlib
- We quickly recall how to include
matplotlibto see charts!
- Or you can just ask Gemini!
2D
- Try out a few 2D plots, here is one example.
- We can specify these as the
xandydimension. - A la grade school mathematics
- We can specify these as the
- Wow - that is not that exciting.
- What is this showing?
3D
- Third dimension via
s=for size. - Also, I start putting things on their own lines - you may find this easier to read.
4D
- For the fourth dimension, we can use color.
- Often we using colors we also include a legend as a “color bar”.
Other values
- We can also include release year, year within trilogy (
ywt), and box office in millions.
Your Task
- Take some time and effort plotting the Star Wars films in different ways.
- Look for patterns.
- Take notes.
- Perform your work in a
Lab03Colab notebook in your AI folder.
After some time exploring, answer some questions. Before introducing the questions, I would like you to answer them as follows:
- Add a text cell (NOT a code cell) with 2-3 sentences of explanation.
- Think of around 100 words.
- If you can’t think of 100 words, you didn’t think hard enough about your explanation.
- Add a code cell of a 4-dimensional (or higher) plot supporting your explanation.
- Add a text cell after the code block explaining how you choose what values to make within your plot.
Note
I am specifying a precise way I expect to receive see these questions. Think about why I am doing that and why it may be helpful to following these instructions!
- What year do you expect Episode 10 to be released?
- What year do you expect Episode 0 to be released?
- How much profit do you expect Episode 10 to make at the box office?
- How much profit do you expect Episode 0 to make at the box office?
- Do relationships between Star Wars films appear linear in two dimensions?
- Do relationships between Star Wars films make more or less sense when considering additional dimensions?
- Does selecting dimensions when predicting future events require intelligence?



