This is the read-me file for the dynamics/Mathematica directory which is associated with the "Learning Dynamical Systems" tutorial. Contexts/Packages All packages and notebooks used in the tutorial are referenced with respect to the default startup path (which includes a path to the Packages directory that comes with Mathematica) augmented with a path to the parent directory of the Dynamics directory. If you are on a machine in the computer science department at Brown, augment your path by adding the following command to your Mathematica initialization file (~/init.m). PrependTo[$Path,"/u/tld/programming/Mathematica/"] On a personal computer, you will have to copy the necessary files and, for example on a MacIntosh, add the following command to your initialization file, PrependTo[$Path,"HD:Mathematica"] and create the directory HD:Mathematica:Dynamics with the subdirectories Exercises and Packages corresponding to HD:Mathematica:Dynamics:Exercises: HD:Mathematica:Dynamics:Packages: The remainder of this discussion is implementation independent and so, for example, the expression Dynamics`Packages` refers to the subdirectory of the Dynamics directory whether you are using a Unix, MacIntosh, or MS-DOS machine. Packages found in Dynamics`Packages` are in a raw ASCII format, not in the portable Mathematica notebook format. Files found in Dynamics`Exercises` and ending in .m are in the standard notebook format while those ending in .txt are not. The code in the noteboks found in Dynamics`Exercises` makes use of the following standard packages. DiscreteMath`Combinatorica` Constructing, manipulating, and displaying graphs. Statistics`ContinuousDistributions` See Page 585 in Mathematica. Code in Dynamics`Packages` is in the form of Mathematica packages with associated contexts. Currently the Dynamics directory is organized with two subdirectories Exercises and Packages containing exercises and supporting packages, respectively. For the time being, there is also a directory Old for versions of code that are or are becoming obsolete. Here are some of the more stable packages. Dynamics`Packages`MarkovProcesses` Representing Markov processes and finite state machines. Depends on DiscreteMath`Combinatorica`. Dynamics`Packages`MarkovExamples` Examples of Markov processes specified as temporal Bayesian networks. Dynamics`Packages`BayesianNetworks` Representing Bayesian networks and factored joint distributions. Depends on DiscreteMath`Combinatorica`. Dynamics`Packages`TemporalBayesianNetworks` Representing two-stage temporal Bayesian networks. Depends on Dynamics`Packages`MarkovProcesses`, Dynamics`Packages`BayesianNetworks`, and DiscreteMath`Combinatorica`. Dynamics`Packages`NearestNeighbors` Simple procedures for finding k nearest neighbors. Dynamics`Packages`CooperandHerskovits` Implementation of Cooper and Herskovits [1992]. Here are the current plans for notebooks. Some of these are yet to be created (tentative authors indicated on the right). Dynamics`Exercises`BayesianNetworks` Dynamics`Exercises`CooperandHerskovits` Dynamics`Exercises`LogisticFunction` Dynamics`Exercises`LorenzEquations` Dynamics`Exercises`CellularAutomata` Dynamics`Exercises`TimeSeries` Dynamics`Exercises`DelayCoordinateEmbedding` Dynamics`Exercises`LearningHiddenMarkovModels` Dynamics`Exercises`MachineReconstruction` Dynamics`Exercises`DiscreteFourierTransform` Dynamics`Exercises`GibbsSampling` Dynamics`Exercises`SingularValueDecomposition` Here is some more information on standard Mathematica packages and functions that have proved useful in implementing the exercises for this tutorial. Packages`DiscreteMath`Combinatorica` ShowGraph[g_Graph] ShowGraph[g_Graph,Directed] ShowLabeledGraph[g_Graph] ShowLabeledGraph[g_Graph,labels_List] ChangeVertices[g_Graph,vertices_List] Vertices[g_Graph] ChangeEdges[g_Graph,edges_List] Edges[g_Graph] IsomorphicQ[g_Graph,h_Graph] ToAdjacencyLists[g_Graph] FromAdjacencyLists[edges_List,vertices_List] See ``Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica'' by Steven Skiena, Addison Wesley, 1990. Packages`Statistics`ContinuousDistributions` See Page 585 in Mathematica. NormalDistribution[m,s] returns a normal (Gaussian) distribution with mean s and standard deviation s. PDF[dist,x] returns the probability density function at x. CDF[dist,x] returns the cumulative distribution function at x. Random[dist] returns a pseudorandom number with the specified distribution. Packages`Statistics`DiscreteDistributions` See Page 589 in Mathematica BernoulliDistribution returns the discrete Bernoulli distribution with mean p. BinomialDistribution[n,p] returns the binomial distribution for n trials with probability p. Packages`Statistics`LinearRegression` Packages`Statistics`MovingAverage` Packages`DiscreteMath`ComputationalGeometry` Here are few built-in functions that turned out to be useful. SingularValues[m] gives the singular value decomposition (SVD) for a numerical matrix m. The result is a list {u,w,v} where w is the list of nonzero singular values, and m can be written as Conjugate[Transpose[u]].DiagonalMatrix[w].v See page 665 in Mathematica, Second Edition, by Wolfram for a description. See also SingularValues[m, Tolerance -> t]. Fourier[data] InverseFourier[data] See page 679 in Mathematica, Second Edition, by Wolfram for examples illustrating how the Fourier transform can be used in analyzing and smoothing data.