{ "cells": [ { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "import os, glob\n", "from IPython.display import Image, display, HTML" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "exps = sorted(glob.glob('RGIV62/*/*/qc*/pcp*/_scores'))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Results of the cross-validation for various OGGM v1.4 set-ups " ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "with open('crossval.html', 'w') as of:\n", " of.write('

OGGM v1.4 cross-validation results

')\n", " for exp in exps:\n", " rgi, baseline, fl, qc, pcp, _ = exp.split('/')\n", " if os.path.exists(os.path.join(exp, 'scores.txt')):\n", " # with open(os.path.join(exp, 'scores.txt')) as f:\n", " # scores = f.read()\n", " # display(HTML(f'

{rgi} {baseline} {fl} {qc} {pcp}

'))\n", " # display(HTML(scores.replace('\\n', '
')))\n", " img_str = (\"\".format(os.path.join(exp, 'cv_histogram.png')))\n", " of.write(img_str)\n", "\n", "# display(HTML(img_str))\n", "# display(HTML('
'))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.8.5" } }, "nbformat": 4, "nbformat_minor": 4 }