Skip to content

Update markdown instructions for Penguin classification exercise (1) #66

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

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions exercises/01_penguin_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,23 @@
"### Task 1: look at the data\n",
"In the following code block, we import the ``load_penguins`` function from the ``palmerpenguins`` package.\n",
"\n",
"- Call this function, which returns a single object, and assign it to the variable ``data``.\n",
" - Print ``data`` and recognise that ``load_penguins`` has returned a ``pandas.DataFrame``.\n",
"- Consider which features it might make sense to use in order to classify the species of the penguins.\n",
" - You can print the column titles using ``pd.DataFrame.keys()``\n",
" - You can also obtain useful information using ``pd.DataFrame.Series.describe()``"
"- Call this function, which returns a single object in the form of a ``pandas.DataFrame``, and assign it to the variable ``data``.\n",
" - Print ``data`` and recognise that ``load_penguins`` has returned the dataframe.\n",
"- Analyse which features it might make sense to use in order to classify the species of the penguins.\n",
" - You can print the column names using ``pd.DataFrame.keys()``\n",
" - You can also obtain useful statical information on the dataset using ``pd.DataFrame.Series.describe()``"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

statistical

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think 'Consider' is probably fine here, but either is fine.

]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"from palmerpenguins import load_penguins"
"from palmerpenguins import load_penguins\n",
"\n",
"# Load the penguin data\n",
"penguins = load_penguins()\n"
]
},
{
Expand Down Expand Up @@ -402,7 +405,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
Expand All @@ -416,7 +419,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.12.4"
}
},
"nbformat": 4,
Expand Down
63 changes: 56 additions & 7 deletions slides/slides.qmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Introduction to Machine Learning with PyTorch"
subtitle: "NCAS & ICCS Summer Schools 2023"
title: "Introduction to Neural Networks with PyTorch"
subtitle: "ICCS Summer School 2024"
format:
revealjs:
embed-resources: true
Expand All @@ -12,12 +12,12 @@ format:
theme: [dark, custom.scss]
render-on-save: true
authors:
- name: Jack Atkinson
orcid: 0000-0001-5001-4812
- name: Matt Archer
orcid: 0009-0002-7043-6769
affiliations: ICCS/Cambridge
- name: Jim Denholm
affiliations: Cambridge
orcid: 0000-0002-2389-3134
- name: Surbhi Goel
affiliations: ICCS/Cambridge
orcid: 0009-0005-0237-756X
revealjs-plugins:
- attribution
---
Expand Down Expand Up @@ -61,6 +61,17 @@ Helping Today:

# Part 1: Neural-network basics -- and fun applications.

## Machine learning

- Machine learns underlying patterns and relations in given data to produce an output.

- Machine learning is accomplished by learning a mathematical function that can represent the data.


## Types of Machine learning

- Learning can be supervised, unsupervised, semi-supervised, self-supervised, reinforcement etc. depending on the task in hand.


## Stochastic gradient descent (SGD)

Expand Down Expand Up @@ -253,6 +264,10 @@ Image source: [3Blue1Brown](https://www.3blue1brown.com/topics/neural-networks)
:::


## The Learning process summarised

![](ModelLearning.png)

# Python and PyTorch {.smaller}

- In this workshop-lecture-thing, we will implement some straightforward neural networks in PyTorch, and use them for different classification and regression problems.
Expand All @@ -261,6 +276,40 @@ Image source: [3Blue1Brown](https://www.3blue1brown.com/topics/neural-networks)
- See the PyTorch website: [https://pytorch.org/](https://pytorch.org/)



## Getting to the Exercise
*Github Repository Cloning*

- Navigate to
[https://tinyurl.com/ml-iccs-24](https://tinyurl.com/ml-iccs-24)
- Go to terminal and type in the below command
- `git clone https://github.com/Cambridge-ICCS/practical-ml-with-pytorch`

## Using online platform
*Using Colab*

`https://tinyurl.com/4arrjjt5`

*Using Jupyter Notebook*

- Download the repo from the [https://tinyurl.com/ml-iccs-24](https://tinyurl.com/ml-iccs-24)
- `cd <path_to_your_repo>`
- `jupyter notebook`

## Creating virtual environement
*Installing with venv*

- `python3 -m venv venv`
- `source venv/bin/activate`

*Installing with conda*

- `conda create -n ml-workshop "python>=3.9.10"`
- `conda activate ml-workshop`
- `cd practical-ml-with-PyTorch`
- `pip install . `


# Exercises


Expand Down
Loading