You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Browse to http://localhost:8000 and you should see the Jupyterlite interface.
27
27
28
28
## Development 2
29
29
30
-
1. Run the docker task, and make the jupyter-lite-build.tgz.
30
+
1. Run `docker run -it --rm -e TARGET_DIR=/dist -v "$(pwd)":/dist $(docker build -q .)` producing the jupyter-lite-build.tgz.
31
31
1. Unzip it into the ./notebooks
32
32
1.`rm -rf public/notebooks` in Quepid
33
33
1. Make sure Quepid's docker-compose.override.yml has a line similar to `- /Users/epugh/Documents/projects/quepid-jupyterlite/notebooks:/srv/app/public/notebooks`
"source": "# Fleiss' Kappa \nTo understand how much your raters what? Scott, need some text!\n\nPlease copy this example and customize it for your own purposes!",
"source": "# Initialize a list to hold the tuples of (doc_id, rating, count)\nratings_data = []\n\n# Iterate through each query-doc pair\nfor pair in data['query_doc_pairs']:\n # Initialize a dictionary to count the ratings for this pair\n ratings_count = defaultdict(int)\n\n # Extract judgements and count the ratings\n for judgement in pair['judgements']:\n rating = judgement['rating']\n ratings_count[rating] += 1\n\n # Append the counts to the ratings_data list\n for rating, count in ratings_count.items():\n ratings_data.append((pair['doc_id'], rating, count))\n",
97
+
"metadata": {
98
+
"trusted": true
99
+
},
100
+
"execution_count": 6,
101
+
"outputs": [],
102
+
"id": "9a8561fd-2dbf-477e-9ac1-4df6d5ebdc91"
103
+
},
104
+
{
105
+
"cell_type": "markdown",
106
+
"source": "## Step 3: Aggregate Raters' Data",
107
+
"metadata": {},
108
+
"id": "caf5632b-132a-4e1b-80fe-c8c5ab7f2f3a"
109
+
},
110
+
{
111
+
"cell_type": "code",
112
+
"source": "# Convert ratings_data to a DataFrame\ndf = pd.DataFrame(ratings_data, columns=['doc_id', 'rating', 'count'])\n\n# Use crosstab to create a contingency table\ndata_crosstab = pd.crosstab(index=df['doc_id'], columns=df['rating'], values=df['count'], aggfunc='sum')\n\n# Drop any rows missing judgements\ndata_crosstab = data_crosstab.dropna(how='any')\n\n# Convert the DataFrame to the format expected by aggregate_raters\ndata_for_aggregation = data_crosstab.values\n\n# Aggregate the raters' data\ntable, _ = aggregate_raters(data_for_aggregation)",
0 commit comments