From 8853f34551be76bdf0e5865362fdff5784432eb1 Mon Sep 17 00:00:00 2001 From: jake-windle Date: Tue, 24 Sep 2019 15:03:06 -0400 Subject: [PATCH] Graphed out generations --- AnalysisOfExperiment.ipynb | 231 ++++++++++++++++++++++++++++++++++--- 1 file changed, 212 insertions(+), 19 deletions(-) diff --git a/AnalysisOfExperiment.ipynb b/AnalysisOfExperiment.ipynb index f0589b5..9cdac7e 100644 --- a/AnalysisOfExperiment.ipynb +++ b/AnalysisOfExperiment.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 11, + "execution_count": 1, "metadata": {}, "outputs": [ { @@ -13,17 +13,17 @@ "│ df[!, col_ind] = v\n", "│ df\n", "│ end` instead.\n", - "│ caller = top-level scope at Experiment.jl:25\n", - "└ @ Core /home/jake/Projects/gp-experiment/Experiment.jl:25\n" + "│ caller = top-level scope at Experiment.jl:25 [inlined]\n", + "└ @ Core /home/jake/project/beef-o-bradys-state-space-search/Experiment.jl:25\n" ] }, { "data": { "text/plain": [ - "main (generic function with 2 methods)" + "main (generic function with 1 method)" ] }, - "execution_count": 11, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -34,7 +34,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -43,7 +43,7 @@ "4" ] }, - "execution_count": 12, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -58,7 +58,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -67,24 +67,65 @@ "text": [ "┌ Warning: `getindex(df::DataFrame, col_ind::ColumnIndex)` is deprecated, use `df[!, col_ind]` instead.\n", "│ caller = fitness(::DataFrames.DataFrame) at Experiment.jl:67\n", - "└ @ Main /home/jake/Projects/gp-experiment/Experiment.jl:67\n" + "└ @ Main /home/jake/project/beef-o-bradys-state-space-search/Experiment.jl:67\n" ] }, { "data": { "text/plain": [ "Dict{Integer,Float64} with 11 entries:\n", - " 2 => 220.0\n", + " 2 => 20.0\n", " 11 => 20.0\n", " 7 => 20.0\n", " 9 => 20.0\n", " 10 => 20.0\n", " 8 => 20.0\n", - " 6 => 70.0\n", - " 4 => 70.0\n", - " 3 => 70.0\n", - " 5 => 70.0\n", - " 1 => 330.0" + " 6 => 20.0\n", + " 4 => 20.0\n", + " 3 => 20.0\n", + " 5 => 20.0\n", + " 1 => 50.0" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "main(10)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "OrderedCollections.OrderedDict{Integer,Float64} with 21 entries:\n", + " 1 => 150.0\n", + " 2 => 150.0\n", + " 3 => 150.0\n", + " 4 => 10.0\n", + " 5 => 10.0\n", + " 6 => 10.0\n", + " 7 => 10.0\n", + " 8 => 10.0\n", + " 9 => 10.0\n", + " 10 => 10.0\n", + " 11 => 10.0\n", + " 12 => 10.0\n", + " 13 => 10.0\n", + " 14 => 0.0\n", + " 15 => 0.0\n", + " 16 => 0.0\n", + " 17 => 0.0\n", + " 18 => 0.0\n", + " 19 => 0.0\n", + " 20 => 0.0\n", + " 21 => 0.0" ] }, "execution_count": 13, @@ -93,7 +134,159 @@ } ], "source": [ - "main(10)" + "using Plots\n", + "res = main(20)\n", + "res = sort(res)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Results\n", + "Shown by tweaking the parameters of popsize, mu, lambda, targetcalories, and candidatesize.\n", + "\n", + "## Gadfly\n", + "Julia plotting library based on Grammar of Graphics." + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + " \n", + " \n", + " \n", + "\n", + "\n", + "\n", + " \n", + " \n", + " \n", + "\n", + "\n", + "\n", + " \n", + " \n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "5\n", + "\n", + "\n", + "10\n", + "\n", + "\n", + "15\n", + "\n", + "\n", + "20\n", + "\n", + "\n", + "0\n", + "\n", + "\n", + "50\n", + "\n", + "\n", + "100\n", + "\n", + "\n", + "150\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "y1\n", + "\n", + "\n" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "plot(collect(keys(res)), collect(values(res)))\n", + "xlabel!()" ] }, { @@ -106,15 +299,15 @@ ], "metadata": { "kernelspec": { - "display_name": "Julia 1.1.1", + "display_name": "Julia 1.0.3", "language": "julia", - "name": "julia-1.1" + "name": "julia-1.0" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.1.1" + "version": "1.0.3" } }, "nbformat": 4,