diff --git a/project-cancer-classification-pca-nn.ipynb b/project-cancer-classification-pca-nn.ipynb index c32a729..4e9a861 100644 --- a/project-cancer-classification-pca-nn.ipynb +++ b/project-cancer-classification-pca-nn.ipynb @@ -541,8 +541,12 @@ " self.results = results\n", "\n", " # Speichern der Daten in einer lokalen Datei\n", - " with open('Experiments/results.pickle', 'wb') as f:\n", - " pickle.dump(self.results, f)\n", + " if len(n_pca_components) > 1:\n", + " with open('Experiments/results.pickle', 'wb') as f:\n", + " pickle.dump(self.results, f)\n", + " else:\n", + " with open(f'Experiments/{str(n_pca_components[0])}/results_{str(n_pca_components[0])}.pickle', 'wb') as f:\n", + " pickle.dump(self.results, f)\n", "\n", " plt.ion()\n", "\n", @@ -610,14 +614,88 @@ " " ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Starten der einzelnen Experimente, da in einer Schleife RAM Probleme auftreten" + ] + }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "e = ExperimentationalExperiments()\n", - "results = e.run([1024, 512, 256, 128, 64, 32, 16], 10, n_epochs=500)" + "e1 = ExperimentationalExperiments()\n", + "results = e1.run([1024], 10, n_epochs=500)\n", + "del e1" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "e2 = ExperimentationalExperiments()\n", + "results = e2.run([512], 10, n_epochs=500)\n", + "del e2" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "e3 = ExperimentationalExperiments()\n", + "results = e3.run([256], 10, n_epochs=500)\n", + "del e3" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "e4 = ExperimentationalExperiments()\n", + "results = e4.run([128], 10, n_epochs=500)\n", + "del e4" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "e5 = ExperimentationalExperiments()\n", + "results = e5.run([64], 10, n_epochs=500)\n", + "del e5" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "e6 = ExperimentationalExperiments()\n", + "results = e6.run([32], 10, n_epochs=500)\n", + "del e6" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "e7 = ExperimentationalExperiments()\n", + "results = e7.run([16], 2, n_epochs=10)\n", + "del e7" ] }, {