From 4c7bba3cc0a4297394c4573d72d9c8e695ac0c08 Mon Sep 17 00:00:00 2001 From: "Kevin M. Jablonka" Date: Wed, 28 Oct 2020 12:06:22 +0100 Subject: [PATCH] chore: finalized cleanup --- molsim_ml.ipynb | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/molsim_ml.ipynb b/molsim_ml.ipynb index 6498ef6..52401f7 100644 --- a/molsim_ml.ipynb +++ b/molsim_ml.ipynb @@ -24,7 +24,9 @@ "At the end of the exercise, you will produce an interactive plot like the one below, comparing the predictions of your model against CO$_2$ computed with GCMC simulations.\n", "The histograms show the distributions of the errors on the training set (left) and on the test set (right).\n", "\n", - "![Parity interactive](_static/result.gif)\n", + "\n", + "\n", + "\"Parity\n", "\n", "This exercise requires a basic knowledge of Python, e.g. that you can write list comprehensions, and are able to read documentation of functions provided by Python packages.\n", "You will be asked to provide some function arguments (indicated by `#fillme` comments).\n", @@ -40,7 +42,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## -1. Only if you run on Colab" + "## -1. Only if you run this notebook on Colab" ] }, { @@ -1727,7 +1729,7 @@ "
\n", " Click here for a hint\n", "\n", "
" ] @@ -2787,9 +2789,7 @@ "source": [ " $\\color{DarkBlue}{\\textsf{Short Exercise}}$\n", "- use the [joblib library](https://scikit-learn.org/stable/modules/model_persistence.html) to save your model\n", - "- make sure you can load it again\n", - "\n", - "Use this to save models as you go." + "- make sure you can load it again\n" ] }, { @@ -2912,6 +2912,7 @@ " # get the indices\n", " shuffling_idx = np.arange(X.shape[0])\n", " for n_round in range(n_repeats):\n", + " # FILL BELOW HERE\n", " # shuffle them (fill in what you want to shuffle)\n", " random_state.shuffle(#fillme) \n", " \n", @@ -2924,6 +2925,7 @@ " \n", " # Deal with numpy arrays \n", " else:\n", + " # FILL BELOW HERE\n", " # array indexing is [row, column]\n", " X_permuted[:, col_idx] = X_permuted[#fillme]\n", " \n", @@ -2936,6 +2938,13 @@ " return scores" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Nothing to change in the function below, it just call the `_calculate_permutation_scores` function you just completed. " + ] + }, { "cell_type": "code", "execution_count": null, @@ -3038,6 +3047,7 @@ "\n", "" ]