{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Example: Sampler" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load the files" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": false }, "outputs": [], "source": [ "from opal import load_dataset, filetype\n", "\n", "ds = load_dataset('sampler/', fname='turn180_182_samples_0.json')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Set the plotting style" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from opal.visualization.styles import load_style\n", "\n", "load_style('jupyter')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Do some plotting ..." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": false }, "outputs": [], "source": [ "import numpy as np\n", "\n", "train0 = np.arange(84).tolist()\n", "train1 = np.arange(168).tolist()\n", "train2 = np.arange(252).tolist()\n", "train3 = np.arange(336).tolist()\n", "\n", "plt = ds.plot_training_vs_validation(train0=train0,\n", " train1=train1,\n", " train2=train2,\n", " train3=train3)#,\n", " #nsamples=True)\n", "\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": false }, "outputs": [], "source": [ "import numpy as np\n", "\n", "train0 = np.arange(84).tolist()\n", "train3 = np.arange(336).tolist()\n", "\n", "plt = ds.plot_auto_correlation(train0)\n", "\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plt = ds.plot_auto_correlation(train3)\n", "\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plt = ds.plot_auto_correlation(train3, percent=True)\n", "\n", "plt.show()" ] } ], "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.5.2" } }, "nbformat": 4, "nbformat_minor": 2 }