You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/assignments/Assignment_2:Search_of_Associative_Memory_Model/README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ You will fit **eight parameters** to optimize the match to human recall data:
110
110
7. $m_{1_{\text{max}}}$: maximum number of *contextual* association cueing failures
111
111
8. $m_{2_{\text{max}}}$: maximum number of *episodic* association cueing failures
112
112
113
-
You can choose any approach you wish to fit these parameters. My "recommended" approach is to use [scipy.optimize.minimize](https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html) to minimize the mean squared error between the point-by-point observed vs. model-predicted values for the following behavioral curves:
113
+
You can choose any approach you wish to fit these parameters. My "recommended" approach is to use [skopt.optimizer.gp_minimize](https://scikit-optimize.github.io/stable/modules/generated/skopt.optimizer.gp_minimize.html#skopt.optimizer.gp_minimize) to minimize the mean squared error between the point-by-point observed vs. model-predicted values for the following behavioral curves:
114
114
- $p(\text{first recall})$: probability of recalling each item **first** as a function of its *presentation position*
115
115
- $p(\textit{recall})$: probability of recalling each item at *any* output position as a function of its presentation position
116
116
- lag-CRP: probability of recalling item $i$ given that item $j$ was the previous recall, as a function of $lag = i - j$.
@@ -139,7 +139,7 @@ You can use the [example notebook](https://contextlab.github.io/memory-models-co
139
139
- To help with computing mean squared error, it will be useful to have a function that takes in a dataset as input and returns a vector comprising each of these curves, for each list length and presentation rate, concatenated together into a single vector.
140
140
141
141
### **Step 4: Fit Model Parameters**
142
-
- To compute mean squared error for a given set of model parameters, use the function you wrote above to compute the concatenated behavioral curves for the *observed recalls* and the *model-predicted recalls*. The average squared point-by-point difference between the vectors is the mean squared error. You'll want to set up [scipy.optimize.minimize](https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html) to find the set of model parameters that minimizes the mean squared error between the observed and predicted curves, using only the training dataset.
142
+
- To compute mean squared error for a given set of model parameters, use the function you wrote above to compute the concatenated behavioral curves for the *observed recalls* and the *model-predicted recalls*. The average squared point-by-point difference between the vectors is the mean squared error. You'll want to set up [skopt.optimizer.gp_minimize](https://scikit-optimize.github.io/stable/modules/generated/skopt.optimizer.gp_minimize.html#skopt.optimizer.gp_minimize) to find the set of model parameters that minimizes the mean squared error between the observed and predicted curves, using only the training dataset.
143
143
- Importantly, you should use the same parameters across all trials and experimental conditions. You're fitting the *average* performance, not data from individual trials or participants.
Copy file name to clipboardExpand all lines: content/assignments/Assignment_2:Search_of_Associative_Memory_Model/sam_assignment_template.ipynb
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -203,7 +203,7 @@
203
203
"Other tasks:\n",
204
204
" - Fit params to [Murdock (1962) dataset](https://github.com/ContextLab/memory-models-course/tree/main/content/assignments/Assignment_2%3ASearch_of_Associative_Memory_Model/Murd62%20data) that you downloaded with the `load_data` function.\n",
205
205
" - You'll need to define a \"loss\" function. I suggest computing MSE for one or more behavioral curves, computed for a subset of the Murdock (1962) participants/lists\n",
206
-
" - I suggest using [scipy.optimize.minimize](https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html) to estimate the model parameters.\n",
206
+
" - I suggest using [skopt.optimizer.gp_minimize](https://scikit-optimize.github.io/stable/modules/generated/skopt.optimizer.gp_minimize.html#skopt.optimizer.gp_minimize) to estimate the model parameters.\n",
207
207
" - Create observed/predicted plots for held-out data:\n",
Copy file name to clipboardExpand all lines: content/assignments/Assignment_3:Context_Maintenance_and_Retrieval_Model/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -120,7 +120,7 @@ Fit the model to the following curves and measures from the Polyn et al. (2009)
120
120
There are several possible ways to accomplish this. My recommended approach is:
121
121
1. Split the dataset into a training set and a test set
122
122
2. Compute the above curves/measures for the training set and concatenate them into a single vector
123
-
3. Use [scipy.optimize.minimize](https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html#scipy.optimize.minimize) to find the set of model parameters that minimizes the mean squared error between the observed curves and the CMR-estimated curves (using the given parameters).
123
+
3. Use [skopt.optimizer.gp_minimize](https://scikit-optimize.github.io/stable/modules/generated/skopt.optimizer.gp_minimize.html#skopt.optimizer.gp_minimize) to find the set of model parameters that minimizes the mean squared error between the observed curves and the CMR-estimated curves (using the given parameters).
124
124
4. Compare the observed performance vs. CMR-estimated performance (using the best-fitting parameters) for the test data
0 commit comments