Skip to content

Commit

Permalink
update notebooks with latest changes, rm notebooks with no code
Browse files Browse the repository at this point in the history
  • Loading branch information
qualiaMachine committed Nov 27, 2024
1 parent d14e8d3 commit 9aee108
Show file tree
Hide file tree
Showing 11 changed files with 272 additions and 657 deletions.
112 changes: 56 additions & 56 deletions code/3-model-fairness-deep-dive.ipynb

Large diffs are not rendered by default.

279 changes: 0 additions & 279 deletions code/5a-explainable-AI-method-overview.ipynb

This file was deleted.

148 changes: 0 additions & 148 deletions code/5b-deep-dive-into-methods.ipynb

This file was deleted.

52 changes: 26 additions & 26 deletions code/5c-probes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"cells": [
{
"cell_type": "markdown",
"id": "d098f24e",
"id": "8f22377e",
"metadata": {},
"source": [
"# Explainability methods: linear probe"
]
},
{
"cell_type": "markdown",
"id": "b870b01b",
"id": "3f7a541d",
"metadata": {},
"source": [
":::::::::::::::::::::::::::::::::::::: questions \n",
Expand All @@ -29,7 +29,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d5244974",
"id": "bdd101f9",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
"id": "b9b6474b",
"id": "b01bfbad",
"metadata": {},
"source": [
"Now, let's set the random seed to ensure reproducibility. Setting random seeds is like setting a starting point for your machine learning adventure. It ensures that every time you train your model, it starts from the same place, using the same random numbers, making your results consistent and comparable."
Expand All @@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8a61c064",
"id": "3bfcd804",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -70,7 +70,7 @@
},
{
"cell_type": "markdown",
"id": "069a82ba",
"id": "d80250f6",
"metadata": {},
"source": [
"##### Loading the Dataset\n",
Expand All @@ -81,7 +81,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "fe8ca9a8",
"id": "8eb08128",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -108,7 +108,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "bb2f2751",
"id": "fd768987",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -117,7 +117,7 @@
},
{
"cell_type": "markdown",
"id": "fc2bd075",
"id": "9c63eb60",
"metadata": {},
"source": [
"##### Loading the Model\n",
Expand All @@ -132,7 +132,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "efde1f9d",
"id": "6fc272aa",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -155,7 +155,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "9825c2a2",
"id": "46aad0a5",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -165,7 +165,7 @@
},
{
"cell_type": "markdown",
"id": "7859a2c2",
"id": "7a5f2539",
"metadata": {},
"source": [
"Let's see what the model's architecture looks like. How many layers does it have?"
Expand All @@ -174,7 +174,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3f4c2beb",
"id": "53e9764a",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -183,7 +183,7 @@
},
{
"cell_type": "markdown",
"id": "02d3317f",
"id": "c895dae9",
"metadata": {},
"source": [
"Let's see if your answer matches the actual number of layers in the model."
Expand All @@ -192,7 +192,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7474a7a2",
"id": "69e55967",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -202,7 +202,7 @@
},
{
"cell_type": "markdown",
"id": "38c22a12",
"id": "cdef0b95",
"metadata": {},
"source": [
"##### Setting up the Probe\n",
Expand All @@ -215,7 +215,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8205c177",
"id": "56f142de",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -260,7 +260,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ec07bb2e",
"id": "cc2a7a6b",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -306,7 +306,7 @@
},
{
"cell_type": "markdown",
"id": "e132be2c",
"id": "ade6219c",
"metadata": {},
"source": [
"Now, it's finally time to define our probe! We set this up as a class, where the probe itself is an object of this class. \n",
Expand All @@ -318,7 +318,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "78a2d7f4",
"id": "0ce14e70",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -470,7 +470,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d367d0f4",
"id": "c1a7d0dd",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -480,7 +480,7 @@
},
{
"cell_type": "markdown",
"id": "5baabd5a",
"id": "b7b861b5",
"metadata": {},
"source": [
"##### Analysing the model using Probes\n",
Expand All @@ -492,7 +492,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "027d56ad",
"id": "e8b16cb4",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -529,7 +529,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ea3b0248",
"id": "65c7f01d",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -544,7 +544,7 @@
},
{
"cell_type": "markdown",
"id": "47b8508b",
"id": "78c7faca",
"metadata": {},
"source": [
"Which layer has the best accuracy? What does this tell us about the model?\n",
Expand All @@ -557,7 +557,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "85d8720c",
"id": "b1bc5534",
"metadata": {},
"outputs": [],
"source": [
Expand Down
Loading

0 comments on commit 9aee108

Please sign in to comment.