Skip to content

Commit

Permalink
+ SHO
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Kramer committed Dec 2, 2024
1 parent f13f0d9 commit 0948dba
Show file tree
Hide file tree
Showing 32 changed files with 49 additions and 45 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added Readings/Kramer_2022.pdf
Binary file not shown.
Binary file added Readings/Roopun_2008.pdf
Binary file not shown.
Binary file added Readings/Spyropoulos_2022.pdf
Binary file not shown.
10 changes: 1 addition & 9 deletions SHO_Lab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@
"x,t = damped_harmonic_oscillator(omega,beta,noise,T0);\n",
"plt.plot(t,x);"
]
},
{
"cell_type": "markdown",
"id": "a6cf952e-e134-444e-b596-48d443806204",
"metadata": {},
"source": [
"### "
]
}
],
"metadata": {
Expand All @@ -115,7 +107,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.8.18"
}
},
"nbformat": 4,
Expand Down
Binary file added Slides/Simple_Model_Lecture.pdf
Binary file not shown.
Binary file removed _extensions/.DS_Store
Binary file not shown.
Binary file removed docs/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/Analyzing_Rhythms_Lab_1.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.5.57">
<meta name="generator" content="quarto-1.5.56">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down
2 changes: 1 addition & 1 deletion docs/Analyzing_Rhythms_Lab_2a.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.5.57">
<meta name="generator" content="quarto-1.5.56">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down
2 changes: 1 addition & 1 deletion docs/Analyzing_Rhythms_Lab_2b.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.5.57">
<meta name="generator" content="quarto-1.5.56">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down
2 changes: 1 addition & 1 deletion docs/Analyzing_Rhythms_Lab_3.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.5.57">
<meta name="generator" content="quarto-1.5.56">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down
4 changes: 2 additions & 2 deletions docs/Backpropagation.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.5.57">
<meta name="generator" content="quarto-1.5.56">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -228,7 +228,7 @@
}

// Store cell data
globalThis.qpyodideCellDetails = [{"code":"import numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd","id":1,"options":{"out-width":"700px","fig-width":7,"autorun":"","label":"","classes":"","out-height":"","read-only":"false","comment":"","warning":"true","fig-height":5,"fig-cap":"","results":"markup","message":"true","context":"interactive","dpi":72,"output":"true"}},{"code":"df = pd.read_csv(\"https://raw.githubusercontent.com/Mark-Kramer/BU-MA665-MA666/master/Data/backpropagation_example_data.csv\")\n\n# Extract the variables from the loaded data\nin_true = np.array(df.iloc[:,0]) #Get the values associated with the first column of the dataframe\nout_true = np.array(df.iloc[:,1]) #Get the values associated with the second column of the dataframe","id":2,"options":{"out-width":"700px","fig-width":7,"autorun":"","label":"","classes":"","out-height":"","read-only":"false","comment":"","warning":"true","fig-height":5,"fig-cap":"","results":"markup","message":"true","context":"interactive","dpi":72,"output":"true"}},{"code":"print(np.transpose([in_true, out_true]))","id":3,"options":{"out-width":"700px","fig-width":7,"autorun":"","label":"","classes":"","out-height":"","read-only":"false","comment":"","warning":"true","fig-height":5,"fig-cap":"","results":"markup","message":"true","context":"interactive","dpi":72,"output":"true"}},{"code":"def sigmoid(x):\n return 1/(1+np.exp(-x)) # Define the sigmoid anonymous function.\n\ndef feedforward(w, s0): # Define feedforward solution.\n # ... x1 = activity of first neuron,\n # ... s1 = output of first neuron,\n # ... x2 = activity of second neuron,\n # ... s2 = output of second neuron,\n # ... out = output of neural network.\n return out,s1,s2","id":4,"options":{"out-width":"700px","fig-width":7,"autorun":"","label":"","classes":"","out-height":"","read-only":"false","comment":"","warning":"true","fig-height":5,"fig-cap":"","results":"markup","message":"true","context":"interactive","dpi":72,"output":"true"}},{"code":"w = [0.5,0.5] # Choose initial values for the weights.\nalpha = 0.01 # Set the learning constant.\n\nK = np.size(in_true);\nresults = np.zeros([K,3]) # Define a variable to hold the results of each iteration. \n\nfor k in np.arange(K):\n s0 = in_true[k] # Define the input,\n target = out_true[k] # ... and the target output.\n \n #Calculate feedforward solution to get output.\n \n #Update the weights.\n w0 = w[0]; w1 = w[1];\n w[1] = \"SOMETHING\"\n w[0] = \"SOMETHING\"\n \n # Save the results of this step. --------------------------------------\n # Here we save the 3 weights, and the neural network output.\n # results[k,:] = [w[0],w[1], out]\n\n# Plot the NN weights and error during training \n# plt.clf()\n# plt.plot(results[:,1], label='w1')\n# plt.plot(results[:,0], label='w0')\n# plt.plot(results[:,2]-target, label='error')\n# plt.legend() #Include a legend,\n# plt.xlabel('Iteration number'); #... and axis label.\n\n# Print the NN weights\n# print(results[-1,0:2])","id":5,"options":{"out-width":"700px","fig-width":7,"autorun":"","label":"","classes":"","out-height":"","read-only":"false","comment":"","warning":"true","fig-height":5,"fig-cap":"","results":"markup","message":"true","context":"interactive","dpi":72,"output":"true"}}];
globalThis.qpyodideCellDetails = [{"code":"import numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd","id":1,"options":{"label":"","autorun":"","read-only":"false","out-width":"700px","fig-width":7,"message":"true","results":"markup","comment":"","output":"true","fig-cap":"","warning":"true","dpi":72,"classes":"","fig-height":5,"context":"interactive","out-height":""}},{"code":"df = pd.read_csv(\"https://raw.githubusercontent.com/Mark-Kramer/BU-MA665-MA666/master/Data/backpropagation_example_data.csv\")\n\n# Extract the variables from the loaded data\nin_true = np.array(df.iloc[:,0]) #Get the values associated with the first column of the dataframe\nout_true = np.array(df.iloc[:,1]) #Get the values associated with the second column of the dataframe","id":2,"options":{"label":"","autorun":"","read-only":"false","out-width":"700px","fig-width":7,"message":"true","results":"markup","comment":"","output":"true","fig-cap":"","warning":"true","dpi":72,"classes":"","fig-height":5,"context":"interactive","out-height":""}},{"code":"print(np.transpose([in_true, out_true]))","id":3,"options":{"label":"","autorun":"","read-only":"false","out-width":"700px","fig-width":7,"message":"true","results":"markup","comment":"","output":"true","fig-cap":"","warning":"true","dpi":72,"classes":"","fig-height":5,"context":"interactive","out-height":""}},{"code":"def sigmoid(x):\n return 1/(1+np.exp(-x)) # Define the sigmoid anonymous function.\n\ndef feedforward(w, s0): # Define feedforward solution.\n # ... x1 = activity of first neuron,\n # ... s1 = output of first neuron,\n # ... x2 = activity of second neuron,\n # ... s2 = output of second neuron,\n # ... out = output of neural network.\n return out,s1,s2","id":4,"options":{"label":"","autorun":"","read-only":"false","out-width":"700px","fig-width":7,"message":"true","results":"markup","comment":"","output":"true","fig-cap":"","warning":"true","dpi":72,"classes":"","fig-height":5,"context":"interactive","out-height":""}},{"code":"w = [0.5,0.5] # Choose initial values for the weights.\nalpha = 0.01 # Set the learning constant.\n\nK = np.size(in_true);\nresults = np.zeros([K,3]) # Define a variable to hold the results of each iteration. \n\nfor k in np.arange(K):\n s0 = in_true[k] # Define the input,\n target = out_true[k] # ... and the target output.\n \n #Calculate feedforward solution to get output.\n \n #Update the weights.\n w0 = w[0]; w1 = w[1];\n w[1] = \"SOMETHING\"\n w[0] = \"SOMETHING\"\n \n # Save the results of this step. --------------------------------------\n # Here we save the 3 weights, and the neural network output.\n # results[k,:] = [w[0],w[1], out]\n\n# Plot the NN weights and error during training \n# plt.clf()\n# plt.plot(results[:,1], label='w1')\n# plt.plot(results[:,0], label='w0')\n# plt.plot(results[:,2]-target, label='error')\n# plt.legend() #Include a legend,\n# plt.xlabel('Iteration number'); #... and axis label.\n\n# Print the NN weights\n# print(results[-1,0:2])","id":5,"options":{"label":"","autorun":"","read-only":"false","out-width":"700px","fig-width":7,"message":"true","results":"markup","comment":"","output":"true","fig-cap":"","warning":"true","dpi":72,"classes":"","fig-height":5,"context":"interactive","out-height":""}}];


</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Bursting_Lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.5.57">
<meta name="generator" content="quarto-1.5.56">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down
2 changes: 1 addition & 1 deletion docs/CFC_Lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.5.57">
<meta name="generator" content="quarto-1.5.56">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down
2 changes: 1 addition & 1 deletion docs/Coherence_Lab_Part_1.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.5.57">
<meta name="generator" content="quarto-1.5.56">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down
2 changes: 1 addition & 1 deletion docs/Coherence_Lab_Part_2.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.5.57">
<meta name="generator" content="quarto-1.5.56">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down
2 changes: 1 addition & 1 deletion docs/Coherence_Lab_Part_3.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.5.57">
<meta name="generator" content="quarto-1.5.56">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down
2 changes: 1 addition & 1 deletion docs/Gamma_Lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.5.57">
<meta name="generator" content="quarto-1.5.56">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down
Loading

0 comments on commit 0948dba

Please sign in to comment.