-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
2,640 additions
and
1,192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\n", | ||
"import pandas as pd\n", | ||
"import pickle\n", | ||
"\n", | ||
"import matplotlib as mpl\n", | ||
"# print(mpl.rcParams.items)\n", | ||
"mpl.use('Agg')\n", | ||
"mpl.rcParams['text.usetex'] = False\n", | ||
"mpl.rcParams['mathtext.rm'] = 'serif'\n", | ||
"mpl.rcParams['font.family'] = 'serif'\n", | ||
"mpl.rcParams['font.serif'] = ['Times New Roman']\n", | ||
"# mpl.rcParams['font.family'] = ['Times New Roman']\n", | ||
"mpl.rcParams['axes.titlesize'] = 25\n", | ||
"mpl.rcParams['axes.labelsize'] = 20\n", | ||
"mpl.rcParams['xtick.labelsize'] = 15\n", | ||
"mpl.rcParams['ytick.labelsize'] = 15\n", | ||
"mpl.rcParams['savefig.dpi'] = 250\n", | ||
"mpl.rcParams['figure.dpi'] = 250\n", | ||
"mpl.rcParams['savefig.format'] = 'pdf'\n", | ||
"mpl.rcParams['savefig.bbox'] = 'tight'\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"%matplotlib inline" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"def truncate_colormap(cmap, minval=0.0, maxval=1.0, n=100):\n", | ||
" new_cmap = mpl.colors.LinearSegmentedColormap.from_list(\n", | ||
" 'trunc({n},{a:.2f},{b:.2f})'.format(n=cmap.name, a=minval, b=maxval),\n", | ||
" cmap(np.linspace(minval, maxval, n)))\n", | ||
" return new_cmap\n", | ||
"\n", | ||
"cmap = plt.get_cmap('hot_r')\n", | ||
"fave_cmap = truncate_colormap(cmap, 0.35, 1.0)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"metric_dictionary = {'TBDT':{'FoM': 1, 'LogLoss': 1, 'Brier': 1},\n", | ||
" 'TKNN':{'FoM': 7, 'LogLoss': 6, 'Brier': 7},\n", | ||
" 'TNB':{'FoM': 8, 'LogLoss': 9, 'Brier': 8},\n", | ||
" 'TNN':{'FoM': 5, 'LogLoss': 3, 'Brier': 3},\n", | ||
" 'TSVM':{'FoM': 3, 'LogLoss': 2, 'Brier': 2},\n", | ||
" 'WBDT':{'FoM': 2, 'LogLoss': 5, 'Brier': 4},\n", | ||
" 'WKNN':{'FoM': 9, 'LogLoss': 8, 'Brier': 9},\n", | ||
" 'WNB':{'FoM': 10, 'LogLoss': 10, 'Brier': 10},\n", | ||
" 'WNN':{'FoM': 6, 'LogLoss': 7, 'Brier': 6},\n", | ||
" 'WSVM':{'FoM': 4, 'LogLoss': 4, 'Brier': 5},\n", | ||
" }" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"metric_dictionary['TBDT']" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"symbols = {'TBDT':'o',\n", | ||
" 'TKNN':'d',\n", | ||
" 'TNB':'s',\n", | ||
" 'TNN':'*',\n", | ||
" 'TSVM':'^',\n", | ||
" 'WBDT':'o',\n", | ||
" 'WKNN':'d',\n", | ||
" 'WNB':'s',\n", | ||
" 'WNN':'*',\n", | ||
" 'WSVM':'^',\n", | ||
" }\n", | ||
"\n", | ||
"colors = {'TBDT':fave_cmap(0.05),\n", | ||
" 'TKNN':fave_cmap(0.3),\n", | ||
" 'TNB':fave_cmap(0.55),\n", | ||
" 'TNN':fave_cmap(0.8),\n", | ||
" 'TSVM':fave_cmap(1.0),\n", | ||
" 'WBDT':fave_cmap(0.05),\n", | ||
" 'WKNN':fave_cmap(0.3),\n", | ||
" 'WNB':fave_cmap(0.55),\n", | ||
" 'WNN':fave_cmap(0.75),\n", | ||
" 'WSVM':fave_cmap(1.0),\n", | ||
" }\n", | ||
"\n", | ||
"\n", | ||
"plt.figure()\n", | ||
"for key, value in metric_dictionary.items():\n", | ||
" val = []\n", | ||
" for k, v in value.items():\n", | ||
" val.append(v)\n", | ||
" if 'W' in key:\n", | ||
" plt.plot(val, label=key, marker=symbols[key], ls='--', color=colors[key])\n", | ||
" else:\n", | ||
" plt.plot(val, label=key, marker=symbols[key], color=colors[key])\n", | ||
"\n", | ||
"plt.legend(loc='center left', bbox_to_anchor=(1, 0.5), prop={'size': 12})\n", | ||
"plt.xticks([0, 1, 2], ['FoM', 'LogLoss', 'Brier'])\n", | ||
"plt.yticks(np.arange(1, 11))\n", | ||
"plt.ylabel('Rank')\n", | ||
"\n", | ||
"#plt.savefig('Tables3_option1.pdf')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"\n", | ||
"colors = {'TBDT':fave_cmap(0.05),\n", | ||
" 'TKNN':fave_cmap(0.2375),\n", | ||
" 'TNB':fave_cmap(0.54),\n", | ||
" 'TNN':fave_cmap(0.712499999),\n", | ||
" 'TSVM':fave_cmap(1.0),\n", | ||
" 'WBDT':fave_cmap(0.05),\n", | ||
" 'WKNN':fave_cmap(0.2375),\n", | ||
" 'WNB':fave_cmap(0.54),\n", | ||
" 'WNN':fave_cmap(0.712499999),\n", | ||
" 'WSVM':fave_cmap(1.0),\n", | ||
" }\n", | ||
"\n", | ||
"plt.figure()\n", | ||
"for key, value in metric_dictionary.items():\n", | ||
" val = []\n", | ||
" for k, v in value.items():\n", | ||
" val.append(v)\n", | ||
" if 'W' in key:\n", | ||
" plt.plot(val, label=key, marker=symbols[key], ls='--', color=colors[key], lw=2, ms=7, alpha=0.3)\n", | ||
" else:\n", | ||
" plt.plot(val, label=key, marker=symbols[key], color=colors[key], lw=2, ms=7)\n", | ||
"\n", | ||
"plt.legend(loc='center left', bbox_to_anchor=(1, 0.5), prop={'size': 12})\n", | ||
"plt.xticks([0, 1, 2], ['FoM', 'LogLoss', 'Brier'])\n", | ||
"plt.yticks(np.arange(1, 11))\n", | ||
"plt.ylabel('Rank')\n", | ||
"plt.gca().invert_yaxis()\n", | ||
"\n", | ||
"#plt.savefig('Tables3_option4.pdf')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"plt.figure()\n", | ||
"\n", | ||
"fom = []\n", | ||
"ll = []\n", | ||
"brier = []\n", | ||
"\n", | ||
"for key, value in metric_dictionary.items():\n", | ||
" fom.append(value['FoM'])\n", | ||
" ll.append(value['LogLoss'])\n", | ||
" brier.append(value['Brier'])\n", | ||
"\n", | ||
"plt.plot(fom, label='FoM', marker='o')\n", | ||
"plt.plot(ll, label='LogLoss', marker='D', alpha = 0.5)\n", | ||
"plt.plot(brier, label='Brier', marker='s', alpha=0.23)\n", | ||
"\n", | ||
"plt.legend(loc='center left', bbox_to_anchor=(1, 0.5), prop={'size': 12})\n", | ||
"plt.xticks(np.arange(0, 10), list(metric_dictionary.keys()), rotation=45)\n", | ||
"plt.ylabel('Rank')\n", | ||
"plt.savefig('Tables3_option2.pdf')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 2", | ||
"language": "python", | ||
"name": "python2" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.15" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
Lastname,Firstname,Authorname,AuthorType,Affiliation,Contribution,Email | ||
Malz,Alex,A.I.~Malz,Contact,"German Centre of Cosmological Lensing, Ruhr-Universitaet Bochum, Universitaetsstra{\ss}e 150, 44801 Bochum, Germany","conceptualization, data curation, formal analysis, investigation, methodology, project administration, software, supervision, validation, visualization, writing - editing, writing - original draft",[email protected] | ||
Malz,Alex,A.I.~Malz,Contact,"Center for Cosmology and Particle Physics, New York University, 726 Broadway, New York, NY 10004, USA","conceptualization, data curation, formal analysis, investigation, methodology, project administration, software, supervision, validation, visualization, writing - editing, writing - original draft",[email protected] | ||
Malz,Alex,A.I.~Malz,Contact,"Department of Physics, New York University, 726 Broadway, New York, NY 10004, USA","conceptualization, data curation, formal analysis, investigation, methodology, project administration, software, supervision, validation, visualization, writing - editing, writing - original draft",[email protected] | ||
Hlo\v{z}ek,Ren\'ee,R.~Hlo\v{z}ek,Contributor,"Department of Astronomy and Astrophysics, University of Toronto, 50 St. George St., Toronto, ON M5S 3H4, Canada","data curation, formal analysis, funding acquisition, investigation, project administration, software, supervision, validation, visualization, writing - editing, writing - original draft",[email protected] | ||
Hlo\v{z}ek,Ren\'ee,R.~Hlo\v{z}ek,Contributor,"Dunlap Institute for Astronomy and Astrophysics, University of Toronto, 50 St. George St., Toronto, ON M5S 3H4, Canada","data curation, formal analysis, funding acquisition, investigation, project administration, software, supervision, validation, visualization, writing - editing, writing - original draft",[email protected] | ||
Allam,Tarek,T.~Allam Jr,Contributor,"Mullard Space Science Laboratory, Department of Space and Climate Physics, University College London, Holmbury Hill Rd, Dorking RH5 6NT, UK","investigation, software, validation, writing - original draft",[email] | ||
Bahmanyar,Anita,A.~Bahmanyar,Contributor,"Dunlap Institute for Astronomy and Astrophysics, University of Toronto, 50 St. George St., Toronto, ON M5S 3H4, Canada","formal analysis, investigation, methodology, software, writing - editing, writing - original draft",[email] | ||
Biswas,Rahul,R.~Biswas,Contributor,"The Oskar Klein Centre for Cosmoparticle Physics, Stockholm University, AlbaNova, Stockholm, SE-106 91, Sweden","conceptualization, methodology, software, writing - original draft",[email] | ||
Biswas,Rahul,R.~Biswas,Contributor,"The Oskar Klein Centre for Cosmoparticle Physics, Stockholm University, AlbaNova, Stockholm, SE-106 91, Sweden","conceptualization, methodology, software, supervision, writing - editing, writing - original draft",[email] | ||
Dai,Mi,M.~Dai,Contributor,"Rutgers, the State University of New Jersey, 136 Frelinghuysen Road, Piscataway, NJ 08854 USA","writing - editing",[email] | ||
Galbany,Llu\'is,L.~Galbany,Contributor,"University of Pittsburgh, 300 Allen Hall, 3941 O'Hara St, Pittsburgh, PA 15260","writing - editing",[email] | ||
Ishida,Emille,E.E.O.~Ishida,Contributor,"Universit\'e Clermont Auvergne, CNRS/IN2P3, LPC, F-63000 Clermont-Ferrand, France","conceptualization, project administration, supervision, writing - editing",[email] | ||
|
@@ -25,5 +26,5 @@ Narayan,Gautham,G.~Narayan,Contributor,"Space Telescope Science Institute, 3700 | |
Peiris,Hiranya,H.~Peiris,Contributor,"The Oskar Klein Centre for Cosmoparticle Physics, Stockholm University, AlbaNova, Stockholm, SE-106 91, Sweden","conceptualization, funding acquisition, supervision",[email] | ||
Peiris,Hiranya,H.~Peiris,Contributor,"Department of Physics and Astronomy, University College London, Gower Street, London, WC1E 6BT, UK","conceptualization, funding acquisition, supervision",[email] | ||
Peters,Christina~M.,C.M.~Peters,Contributor,"Dunlap Institute for Astronomy and Astrophysics, University of Toronto, 50 St. George St., Toronto, ON M5S 3H4, Canada","writing - editing",[email] | ||
Ponder,Kara,K.~Ponder,Contributor,"Berkeley Center for Cosmological Physics, Campbell Hall 341, University of California Berkeley, Berkeley, CA 94720, USA","writing - editing",[email] | ||
Ponder,Kara,K.~Ponder,Contributor,"Berkeley Center for Cosmological Physics, Campbell Hall 341, University of California Berkeley, Berkeley, CA 94720, USA","visualization, writing - editing",[email] | ||
Setzer,Christian,C.N.~Setzer,Contributor,"The Oskar Klein Centre for Cosmoparticle Physics, Stockholm University, AlbaNova, Stockholm, SE-106 91, Sweden","conceptualization, software",[email protected] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.