Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision b36b51d687c5562713267577a305d01fa87e3302 authored by Rick Gerkin on 30 March 2023, 18:35:06 UTC, committed by Rick Gerkin on 30 March 2023, 18:35:06 UTC
Import fix
1 parent c03b494
  • Files
  • Changes
  • d9d541d
  • /
  • lee_et_al_2023
  • /
  • notebooks
  • /
  • Figure2F.ipynb
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:b36b51d687c5562713267577a305d01fa87e3302
directory badge
swh:1:dir:03269d5d4808e7f4ddd27b0456d3748b8e3d1f82
content badge
swh:1:cnt:84dc03ae4bf5b8e51184a489d0372a29ba04911a

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Figure2F.ipynb
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "392bd175",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Stock imports\n",
    "%load_ext autoreload\n",
    "%autoreload 2\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "\n",
    "from lee_et_al_2023.src import analysis\n",
    "from lee_et_al_2023.src import base\n",
    "from lee_et_al_2023.src import data_loaders\n",
    "base.set_visual_settings()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "18c593dd",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/rick/code/ratatouille/qian_et_al_2023/src/data_loaders.py:77: FutureWarning: The default value of numeric_only in DataFrameGroupBy.mean is deprecated. In a future version, numeric_only will default to False. Either specify numeric_only or select only columns which should be valid for the function.\n",
      "  panel = humans.groupby('RedJade Code').mean().loc[mol_codes, base.MONELL_CLASS_LIST]\n"
     ]
    }
   ],
   "source": [
    "models, humans, panel, subjects = data_loaders.get_clean()\n",
    "extended_models = data_loaders.load_extended_predictions(panel.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4057a825",
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [],
   "source": [
    "corrs = analysis.fast_process(humans, extended_models)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "904aa230",
   "metadata": {},
   "outputs": [],
   "source": [
    "corrs.median()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ed15000c",
   "metadata": {},
   "source": [
    "(The rest of the plotting code for this subfigure is done in R.)"
   ]
  }
 ],
 "metadata": {
  "jupytext": {
   "cell_metadata_filter": "-all",
   "formats": "auto:light,ipynb",
   "notebook_metadata_filter": "-all"
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API