BIOL 638 (NJIT) and 48:120:638 (Rutgers)
Computational Ecology
Spring 2012

  • Learn the basics of computation, as well as ecological theories and models, by exploring them in an interactive, visual environment.
  • Learn to use Mathematica, a multi-purpose programming package.
  • Adapt and apply what you’ve learned to your research.

Course details

Computational Ecology covers many aspects of computation that are relevant to ecology, such as data storage and manipulation, numerical simulation, equation solving, optimization, even image processing and visualization. Along the way we dip into various classic topics in mathematical ecology and population biology (population dynamics, life tables, etc.) to illustrate the various techniques, but the syllabus is structured around the computational topics. (Experience shows it is better this way.)

The course is taught in a computer lab, and is hands-on — you will spend a good part of each class working with data and problems. You will also do a term project. There is no mandatory textbook. Instead, there are 'notebooks' written by me on each topic, which include executable code for you to play around with. At the end, you will have learned some programming basics and will be prepared to work with your own data and/or research question.

Credits: 3

Prerequisites: Instructor permission. Students for this course come from diverse backgrounds. Its 'core' audience is graduate students in ecology and evolution, but it can and has been taken by graduate students in other fields of biology, as well as mathematics, biomedical sciences and others. It is also open to senior undergraduates with sufficient background in either math/computation, ecology and evolution, or both.

Schedule: Class meets Thursday evenings, 6:00 to 9:00, in 425 Colton Hall (the biology computer lab) on the NJIT campus.

Office hours: By appointment.

Grading and exams

There will be a regular series of homework assignments in the first half of the semester and a term paper due at the end of the semester. The grading will be as follows:

Component
Grade percentage
Homeworks
50
Term paper
40
Participation in class
10

Please note that in-class participation is very important! This is a small, seminar-type class with hands-on exercises, so everyone should be engaged in discussions.

Textbooks

There is no required textbook: instead a series of 'notebook' computer files are provided (see syllabus below). However, I recommend having a textbook of mathematical ecology available, especially for students without a strong background in ecology. This will provide more ecological background than I can cover in class. Almost any of the modern texts will be fine; I recommend one of the following:

  • An Illustrated Guide to Theoretical Ecology by Ted Case.
  • A Primer of Ecological Theory by Joan Roughgarden.

Software

This course requires that students work in the Mathematica programming environment. The course is taught in a computer classroom with Linux machines that have Mathematica installed, and students can work on their own time on any machine in an NJIT computer lab. However, most students find it convenient to purchase a student edition of Mathematica and use their own computers, either for homework or even in the classroom itself. The student edition can be purchased direct from Wolfram Research (www.wolfram.com) in versions that last a semester, a year, or indefinitely.

Syllabus

  • This syllabus is a general outline. Exact timings may change if we go slower or faster than anticipated on some topics. Check back with this page for updates.
  • Homeworks are due by 9am Wednesday morning of the week after they are assigned. Homeworks are to be placed in the folder with your name on it inside the Computational Ecology folder here:
  • https://public.me.com/garethrussell

A note about downloads!

Mathematica files are actually text files. Some browsers will try to open the text file in the browser. It's not pretty. If this happens to you, go back to the page with the link, right-click (or control-click on a Mac), and choose to download the file instead.

Week 1 (01/19)

Outline: Class 1.

Mathematica demonstration slides.

Computation: Introduction. Mathematica as an environment. 'Code as language' analogy. Notebooks, document structure and formatting. Executing code. Finding help. Examples of computation in ecological research. How computers store and work with numbers. Symbols and symbolic computation. Mathematical representation vs. computer code. Functions. Nesting. Everything is a function! The importance of 'play.'

Ecology: Ecological units, and how we might code them for computation. Models as 'rigorous thinking'. Assumptions and approximations.

  • In-class activity 1: Following along making a notebook.
  • In-class activity 2: Load the provided dataset and making plots. Using the documentation.
  • Homework 1: Go through "Hands on Start to Mathematica — Part 1," following along in your own notebook. (Don't go on to Part 2 yet.)
  • Homework 2: Find a data file with numeric or textual data (or both) to bring to the next class. Could be a text file, an Excel document, even a binary file. No pictures.
  • Upload your "Hands on Start" notebook and proposed data file (so I can check it for suitability for the next class).

Week 2 (01/26)

Outline: Class 2. Class 2 example dataset.

Computation: Review of numbers and symbols. Text. Lists and parts of lists. Table vs. Map. Extracting elements and pattern matching. Vectors and matrices. Importing and manipulating data. ListPlots and ArrayPlots.

Ecology: Example of Mathematica in ecological research. More on ecological units. Models, assumptions and approximations. Common types of ecological data: populations, communities, distributions, interactions. Graphical representations of ecological data.

  • In-class activity: Import the data you found for your homework, and play with it. Change the way it's coded, extract different subsets, make graphics.
  • Homework : Creating, manipulating and plotting lists and matrices.
  • Turn in the notebook containing your class and homework exercises.

Week 3 (02/02)

Outline: Class 3.

Ecology Notebook: Four Kinds of Population Growth.

Computation: Continuation of lists. Reformatting data. Functions. Writing your own functions. Continuous functions. Plotting continuous functions. Pure functions. Nesting functions and the "Nest" function.

Ecology: Single-species population models. Discrete and continuous individuals. Discrete-time geometric growth.

  • In-class activity: Continue manipulation and plotting of your data.
  • Homework: Geometric growth with noise.
  • Turn in the notebook in which you have explored your data file as well as your homework.

Week 4 (02/09)

Ecology Notebook: Four Kinds of Population Growth.

Species data file: SpeciesData.xls.

Computation: More on nesting. Random numbers. Graphics. The structure of graphics. Functions with options. Interactive graphics with Manipulate. Introduction to calculus. Differential equations. Symbolic vs. numeric solving (integration).

Ecology: Continuous-time population growth. Stochastic models with discrete individuals.

  • In-class activity: Fixing homework.
  • Homework: Write proposal for term paper.

Week 5 (02/16)

Ecology Notebook: The Space-time Continuum.

Computation: Representing spatial information. Simulations. More on numerical integration.

Ecology: Adding discrete space to population models. Discrete diffusion on a lattice. Types of boundaries. Continuous diffusion on a line.

  • In-class activity: Exercise 2 in Space-time Continuum notebook: Diffusion plus growth.
  • Homework: Exercise 1 in Space-time Continuum notebook: Simulating three-dimensional movement. Finalize term paper source and write up a plan/outline in a new notebook.

Week 6 (02/23)

Ecology Notebook: The Third Horseman.

Computation: More on integration. Chaos and precision.

Ecology: Resource limitation. Density dependence. Logistic model in discrete and continuous time. Population cycles and chaos. Demographic and environmental stochasticity. Time-lags.

  • In-class activity: Theta-logistic exercise
  • Homework: 1) Finish theta-logistic exercise if not already done. 2) Find an interesting image with a biological interpretation (e.g., satellite image or aerial photograph, medical image, microscope image with staining, fluorescence, etc. showing cellular structure or dynamics) and confirm that you can import it into Mathematica with the Import function. Remember that you will have to use SetDirectory[] to point Mathematica to the correct directory before you import. Make sure the image is a standard format (TIFF, JPG, PNG, etc.), and that the resolution is not too small to be interesting (512 to 1024 pixels across is good) or too large for your computer to handle comfortably (which will depend on your computer). Assuming it works, bring the image to the next class. 3) Start work on term paper.

Week 7 (03/01)

Ecology Notebooks: The Game of Life and Image Processing.

Paper: William L. Allen, Innes C. Cuthill, Nicholas E. Scott-Samuel and Roland Baddeley (2010) Why the leopard got its spots: relating pattern development to ecology in felids. Proceedings of the Royal Society Series B Online Early.

Computation: Convolution and cellular automata. Introduction to image manipulation.

Ecology: Population growth and movement on complex landscapes.

  • In-class activity: Working with images. Segmenting vegetation and making buffers.
  • Homework: Population growth and movement on your complex landscape.

Week 8 (03/08)

Ecology Notebook: From Egg to Butterfly.

Computation: Matrix algebra. Eigenvalues and eigenvectors!

Ecology: Population structure. Life tables, Leslie matrices, stable age distribution, sensitivity and elasticity analysis.

  • In-class activity: Ask questions about work so far. Work on term paper.
  • Homework: Work on term paper.

SPRING BREAK (03/15)

Week 9 (03/22)

Ecology Notebook: No More Fish in the Sea.

Computation: Fixed points, stability (graphical method), isoclines, vector fields.

Ecology: Two-species models 1. Consumers and resources. Harvesting strategies. Functional responses.

  • In-class activity: EITHER exercise 1 (isoclines for Type 2 function response) OR exercise 2 (harvesting in a stochastic environment.
  • Homework: Work on term paper.

Week 10 (03/29)

Ecology Notebook: Nature Red in Tooth and Claw.

Ecology: Two-species models 2. Predator-prey systems. Phase space plots, stable and unstable equilibria. Limit cycles.

  • In-class activity and homework: Work on term paper.

Week 11 (04/05)

Ecology Notebook: It's a Dog Eat Dog Eat Dog World.

Ecology: Two-species models 3. Stability analysis. Competition. Generalized Lotka-Volterra model. Community stability. Multiple stable equilibria.

  • In-class activity and homework: Work on term paper.

Week 12 (04/12)

Ecology Notebook: Metapopulations and Diseases.

Class Notebook: Wrap-up.

Ecology: Metapopulations and diseases. Wrap up. Bring questions.

Computation: Spatially-explicit simulations. Wrap up. Bring questions.

  • In-class activity and homework: Work on term paper.

Week 13 (04/19)

Presentations of term paper projects.

  • Homework: Finalize projects based on feedback.

Week 14 (04/26):

Presentations of term paper projects.

  • Homework: Finalize projects based on feedback.

TERM PAPER PROJECTS DUE WEDNESDAY 05/02.

 

Links

Wolfram Research: http://www.wolfram.com

Wolfram Blog: http://blog.wolfram.com

Mathematica Demonstrations Project: http://demonstrations.wolfram.com/