Developing Computational Skills in the Sciences with Matlab Webinar 2017
1. Developing Computational Skills
in the Sciences with MATLAB
Presenters: Lisa Kempler, Alain Plattner, Benjamin Bratton, Daniel Zysman
Audience: Science educators
Lisa Alain Benjamin Daniel
2. The Session Will Give You
• Strategies for teaching data analysis, modeling,
and computation, in domain-focused courses
• Resources for teaching computation in Sciences
– Teaching activities (with code)
– Tools to address common challenges conveying
computational skills in the Sciences
– with MATLAB
• Access to a community of peer educators
http://serc.carleton.edu/NAGTWorkshops/data_models/matlab16/index.html
3. Session Flow
• Session goals
• Tour of MATLAB Resources for Sciences: SERC site
• 3 professors’ representative Teaching Activities
– Choice of geophone layout in a simple near-surface seismics setting
• Alain Plattner, Geophysics
• California State University – Fresno
– Building Modular Tools for Visualizing Computation
• Benjamin Bratton, Biology
• Princeton University
– Principal Component Analysis
• Daniel Zysman, Neuroscience
• Massachusetts Institute of Technology
• Q&A
4. Teaching Computation in the Sciences
with MATLAB Workshop (Oct 2016)
• Objectives and process
• Participants
• Outcomes
7. October 2016 Workshop Outcomes:
Teaching Computation with MATLAB
http://serc.carleton.edu/teaching_computation/index.html
8. SERC Site Resources:
Teaching Computation with MATLAB
MATLAB page for educators
• http://serc.carleton.edu/NAGTWorkshops/
data_models/toolsheets/MATLAB.html
Workshop resources and outcomes
• http://serc.carleton.edu/
teaching_computation/index.html
• http://serc.carleton.edu/
matlab_computation2016/outcomes.html
9. Session Flow
• Session goals
• Tour of MATLAB Resources for Sciences: SERC site
• 3 professors’ representative Teaching Activities
– Choice of geophone layout in a simple near-surface seismics setting
• Alain Plattner, Geophysics
• California State University – Fresno
– Building Modular Tools for Visualizing Computation
• Benjamin Bratton, Biology
• Princeton University
– Principal Component Analysis
• Daniel Zysman, Neuroscience
• Massachusetts Institute of Technology
• Q&A
10. Examples using Matlab / Octave for
Experimental Design and Data Processing
in a Near-surface Applied Geophysics Class
Alain Plattner
California State University Fresno
April 27, 2017
https://github.com/NSGeophysics
11. Two Matlab / Octave m-file packages
Seism-O: Simulation of applied geophysics seismic data
Used for teaching concepts and experimental design
GPR-O: Processing and visualization of ground penetrating radar data
Used for teaching concepts and effects of data processing
On https://github.com/NSGeophysics
https://github.com/NSGeophysics
14. air wave
direct wave
refracted waveReflected wave
V1
V2
V0 = 343 m/s
https://github.com/NSGeophysics
Seism-O: Simple Seismic Data Simulation
15. air wave
direct wave
refracted waveReflected wave
V1
V2
V0 = 343 m/s
Show simulated arrival times
Simulated arrival times using Seism-O for 1 m geophone spacing
https://github.com/NSGeophysics
Seism-O: Simple Seismic Data Simulation
16. Simulated arrival times for 1 m geophone spacing Simulated waveforms for 1 m geophone spacing
https://github.com/NSGeophysics
Seism-O: Simple Seismic Data Simulation
17. Simulated waveforms for 2 m geophone spacing Simulated waveforms for 1 m geophone spacing
https://github.com/NSGeophysics
Seism-O: Simple Seismic Data Simulation
18. Simulated waveforms for 2 m geophone spacing Simulated waveforms for 1 m geophone spacing
Software and teaching activity on
https://github.com/NSGeophysics/Seism-O/wiki
https://github.com/NSGeophysics
Seism-O: Simple Seismic Data Simulation
19. GPR-O: GPR data processing & visualization
https://github.com/NSGeophysics
20. Instructions and software on
https://github.com/NSGeophysics/GPR-O/wiki
- Simple Matlab / Octave scripts
- Ground penetrating radar basic data processing
- 2-D profile and depth-slice plots
- Topography
- Educational documentation
GPR data available for example from
https://alaska.usgs.gov/portal/project.php?project_id=384
https://github.com/NSGeophysics
GPR-O: GPR data processing & visualization
21. Data: Liu et al. (in prep)
https://github.com/NSGeophysics
GPR-O: GPR data processing & visualization
25. Tutorial with test data:
https://github.com/NSGeophysics/GPR-O/blob/master/doc/GPR-O.pdf
Raw field data available for example from:
https://alaska.usgs.gov/portal/project.php?project_id=384
https://github.com/NSGeophysics
GPR-O: GPR data processing & visualization
26. Summary
- Seism-O and GPR-O: Matlab / Octave scripts for seismic data
simulation and ground penetrating radar data processing
- Both available from https://github.com/NSGeophysics
- For near-surface geophysics class or general data simulation,
experimental design, data processing class.
https://github.com/NSGeophysics
35. Specific example: Modeling
oscillations of glycolysis in yeast
For multiple versions of the code see
https://github.com/bpbratton/buildingModularVisua
lization_SERC201610
36. Benefits for modular problems
•Students learn when to take breaks
•Fail (and succeed) quickly
•Encourages code reuse
37. A principled way to principal
components analysis
Daniel Zysman
April 27, 2017
38. Teaching scientific computing in
Brain & Cog sciences
• The challenge is to deal with students
motivation, preparedness and interest:
• How to effectively break the ice.
• How to cope with inertia.
• We need to make it interesting, relevant
and transferable.
39. A two tier approach
• Tier 1:
– Learn the basics of data visualization and modelling via toy
examples.
– Build it step by step.
• Tier 2:
– Apply the fundamentals to fun and relevant problems.
Photos: Mandana Sassanfar, Quantitative Methods Workshop, CBMM, MIT.
41. Take home messages:
• Rotations and Projections
• Data variability and its geometry
• Matrix duality:
– to represent data
– to transform data
• Challenge activity: make a dataset, ask fellow
student to reveal underlying structure.
42. Tier 2: PCA for image classification
28 by 28 pixels
8-bit gray scale images
These images live in
a 784 dimensional space
Task: classify digits one
from seven using PCA
Revisit:
rotations
projections
Teaching activity:
http://serc.carleton.edu/matlab_computation2016/activities/159581.html
MNIST data set
http://yann.lecun.com/exdb/mnist/
43. Pairwise pixel intensity relations
• There are more than 300000 possible pairwise pixel plots!!!
• Not clear which one to choose.
• Which choice is more informative? Try PCA.
45. Projections for classification
• The first two PCs capture ~37% of the total variance.
• The data clusters nicely in this space (linear separability).
46. Learning outcomes
• PCA reveals underlying structure in the data.
• It aids in visualization and classification tasks.
• Provides a chance to address short comes,
assumptions and pitfalls.
• Emphasize the different role of matrices:
– To store data
– To transform data
47. Student’s feedback
• The two tier approach:
– Keep students engaged and motivated
to learn, while being challenged.
– Improves confidence and competency
to transfer what they have learned to
broader contexts.
48. Join the Community:
Teaching Computation in Sciences with MATLAB
Community
• http://serc.carleton.edu/matlab_computatio
n2016/community.html
49. Join the Community:
Teaching Computation in Sciences with MATLAB
Community• http://serc.carleton.edu/matlab_computatio
n2016/community.html
50. Future Community Sessions on
Teaching with MATLAB
• Earth Educators’ Rendezvous, July 17-21, 2017
– Early Bird Registration deadline is May 1st!
• Mark your calendars!
– Teaching Computation with MATLAB in the Sciences
Workshop
• October 15-17, 2017
• Carleton College, Northfield, MN
• Email Rory McFadden (rmcfadden@carleton.edu) if
you are interested in joining the community
51. SERC Resources:
Teaching Computation with MATLAB
MATLAB page for educators
• http://serc.carleton.edu/NAGTWorkshops/data_models/
toolsheets/MATLAB.html
• And researchers, too
Workshop outcomes
• Teaching Activities
– http://serc.carleton.edu/matlab_computation2016/activities.html
• Pedagogy and computational philosophy
– http://serc.carleton.edu/teaching_computation/index.html
• Community
– http://serc.carleton.edu/matlab_computation2016/community.html
Hinweis der Redaktion
“The toolbox can’t find a thing and so it gives an error.”
“I don’t know which parameters are important and which ones I’m not supposed to touch.”
“I understood the code you showed us in class, but when I go to do the homework problems, I can’t figure out what to write.”
“I don’t want to use a tool when I don’t entirely understand the math. What if there’s some important assumption that I’m missing?”
“I used these four different packages and one of them gave me the result that I think will make my boss happy, so I must have done something wrong on the other ones.”
“The toolbox can’t find a thing and so it gives an error.”
“I don’t know which parameters are important and which ones I’m not supposed to touch.”
“I understood the code you showed us in class, but when I go to do the homework problems, I can’t figure out what to write.”
“I don’t want to use a tool when I don’t entirely understand the math. What if there’s some important assumption that I’m missing?”
“I used these four different packages and one of them gave me the result that I think will make my boss happy, so I must have done something wrong on the other ones.”
“The toolbox can’t find a thing and so it gives an error.”
“I don’t know which parameters are important and which ones I’m not supposed to touch.”
“I understood the code you showed us in class, but when I go to do the homework problems, I can’t figure out what to write.”
“I don’t want to use a tool when I don’t entirely understand the math. What if there’s some important assumption that I’m missing?”
“I used these four different packages and one of them gave me the result that I think will make my boss happy, so I must have done something wrong on the other ones.”
“The toolbox can’t find a thing and so it gives an error.”
“I don’t know which parameters are important and which ones I’m not supposed to touch.”
“I understood the code you showed us in class, but when I go to do the homework problems, I can’t figure out what to write.”
“I don’t want to use a tool when I don’t entirely understand the math. What if there’s some important assumption that I’m missing?”
“I used these four different packages and one of them gave me the result that I think will make my boss happy, so I must have done something wrong on the other ones.”
“The toolbox can’t find a thing and so it gives an error.”
“I don’t know which parameters are important and which ones I’m not supposed to touch.”
“I understood the code you showed us in class, but when I go to do the homework problems, I can’t figure out what to write.”
“I don’t want to use a tool when I don’t entirely understand the math. What if there’s some important assumption that I’m missing?”
“I used these four different packages and one of them gave me the result that I think will make my boss happy, so I must have done something wrong on the other ones.”
“The toolbox can’t find a thing and so it gives an error.”
“I don’t know which parameters are important and which ones I’m not supposed to touch.”
“I understood the code you showed us in class, but when I go to do the homework problems, I can’t figure out what to write.”
“I don’t want to use a tool when I don’t entirely understand the math. What if there’s some important assumption that I’m missing?”
“I used these four different packages and one of them gave me the result that I think will make my boss happy, so I must have done something wrong on the other ones.”
“The toolbox can’t find a thing and so it gives an error.”
“I don’t know which parameters are important and which ones I’m not supposed to touch.”
“I understood the code you showed us in class, but when I go to do the homework problems, I can’t figure out what to write.”
“I don’t want to use a tool when I don’t entirely understand the math. What if there’s some important assumption that I’m missing?”
“I used these four different packages and one of them gave me the result that I think will make my boss happy, so I must have done something wrong on the other ones.”
“The toolbox can’t find a thing and so it gives an error.”
“I don’t know which parameters are important and which ones I’m not supposed to touch.”
“I understood the code you showed us in class, but when I go to do the homework problems, I can’t figure out what to write.”
“I don’t want to use a tool when I don’t entirely understand the math. What if there’s some important assumption that I’m missing?”
“I used these four different packages and one of them gave me the result that I think will make my boss happy, so I must have done something wrong on the other ones.”