diff --git a/Training_IC_on_Demand.ipynb b/Training_IC_on_Demand.ipynb index 5e56741..96829a9 100644 --- a/Training_IC_on_Demand.ipynb +++ b/Training_IC_on_Demand.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "2863fcc5", + "id": "7a9ce3d8", "metadata": {}, "source": [ "# Create ICs on Demand" @@ -11,7 +11,7 @@ { "cell_type": "code", "execution_count": 1, - "id": "26d5bda1", + "id": "3b5cc730", "metadata": {}, "outputs": [], "source": [ @@ -26,7 +26,7 @@ }, { "cell_type": "markdown", - "id": "c90efc94", + "id": "3b4e1ada", "metadata": {}, "source": [ "# Setup the model" @@ -35,7 +35,7 @@ { "cell_type": "code", "execution_count": 2, - "id": "603fb2f7", + "id": "b521b99e", "metadata": {}, "outputs": [ { @@ -59,7 +59,7 @@ }, { "cell_type": "markdown", - "id": "6801dea6", + "id": "066fb79e", "metadata": {}, "source": [ "# test training with white noise" @@ -68,7 +68,7 @@ { "cell_type": "code", "execution_count": 6, - "id": "43ae8f71", + "id": "8001a82b", "metadata": {}, "outputs": [ { @@ -100,7 +100,7 @@ { "cell_type": "code", "execution_count": 7, - "id": "a9716f58", + "id": "46589304", "metadata": {}, "outputs": [ { @@ -134,7 +134,7 @@ }, { "cell_type": "markdown", - "id": "f82355d9", + "id": "623c9205", "metadata": {}, "source": [ "# load BORG data" @@ -143,7 +143,7 @@ { "cell_type": "code", "execution_count": 8, - "id": "733a7793", + "id": "725f2c38", "metadata": {}, "outputs": [ { @@ -168,7 +168,7 @@ { "cell_type": "code", "execution_count": 9, - "id": "8542d959", + "id": "ae7e24a8", "metadata": {}, "outputs": [ { @@ -196,7 +196,7 @@ }, { "cell_type": "markdown", - "id": "dc019fd6", + "id": "1abeba05", "metadata": {}, "source": [ "## generate sample" @@ -205,7 +205,7 @@ { "cell_type": "code", "execution_count": 10, - "id": "b7ae1741", + "id": "8d7b6bf2", "metadata": {}, "outputs": [ { @@ -238,41 +238,16 @@ }, { "cell_type": "markdown", - "id": "9e7daea8", + "id": "7b286278", "metadata": {}, "source": [ "## get an ensemble" ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "36fe2f0b", - "metadata": {}, - "outputs": [], - "source": [ - "def incremental_variance(xs):\n", - " w_sum = w_sum2 = mean = S = 0\n", - "\n", - " for x in xs:\n", - " w_sum = w_sum + w\n", - " w_sum2 = w_sum2 + w**2\n", - " mean_old = mean\n", - " mean = mean_old + (w / w_sum) * (x - mean_old)\n", - " S = S + w * (x - mean_old) * (x - mean)\n", - "\n", - " population_variance = S / w_sum\n", - " # Bessel's correction for weighted samples\n", - " # Frequency weights\n", - " sample_frequency_variance = S / (w_sum - 1)\n", - " # Reliability weights\n", - " sample_reliability_variance = S / (w_sum - w_sum2 / w_sum)" - ] - }, { "cell_type": "code", "execution_count": 29, - "id": "80e8b13e", + "id": "99a8d21a", "metadata": {}, "outputs": [ { @@ -308,7 +283,7 @@ { "cell_type": "code", "execution_count": 30, - "id": "80c14c44", + "id": "2169349e", "metadata": {}, "outputs": [ { @@ -348,7 +323,7 @@ { "cell_type": "code", "execution_count": null, - "id": "754e543e", + "id": "7dbea77a", "metadata": {}, "outputs": [], "source": []