├── .clean.sh ├── .gitignore ├── Appendices ├── GoogleColab │ └── GoogleColab.tex ├── MatplotlibCustomization │ ├── MatplotlibCustomization.tex │ └── figures │ │ ├── 3d_example.pdf │ │ ├── axis_example.pdf │ │ ├── heat_contour_example.png │ │ ├── layout_1.pdf │ │ ├── layout_2.pdf │ │ ├── layout_3.pdf │ │ ├── layout_4.pdf │ │ ├── layout_5.pdf │ │ ├── layout_6.pdf │ │ ├── linestyles_example.pdf │ │ └── positioning_example.pdf ├── NumpyVisualGuide │ └── NumpyVisualGuide.tex └── Setup │ └── SetupStudent.tex ├── Cover.pdf ├── DataScienceEssentials.tex ├── DataScienceEssentials ├── DataCleaning │ └── DataCleaning.tex ├── MPI │ ├── examplecode │ │ ├── Get_rank_example.py │ │ ├── Get_size_example.py │ │ ├── Send_example.py │ │ ├── hello.py │ │ ├── passValue.py │ │ ├── pi.py │ │ └── separateCode.py │ └── mpi.tex ├── Pandas1 │ ├── Pandas1.tex │ └── figures │ │ ├── moving_ewma.pdf │ │ └── moving_rolling.pdf ├── Pandas2 │ ├── Pandas2.tex │ └── figures │ │ ├── Rent.pdf │ │ ├── all_budget.pdf │ │ ├── all_budget2.pdf │ │ ├── all_expenses.pdf │ │ ├── bad_hist_stacked.pdf │ │ ├── bad_hist_unstacked.pdf │ │ ├── box1.pdf │ │ ├── box2.pdf │ │ ├── hist_subplots.pdf │ │ ├── ice_cream_bad.pdf │ │ ├── ice_cream_good.pdf │ │ ├── line_compare.pdf │ │ ├── line_subplots.pdf │ │ ├── scatter_compare.pdf │ │ ├── scatter_table.pdf │ │ ├── scores_hexbin.pdf │ │ ├── scores_scatter.pdf │ │ └── some_expenses.pdf ├── Pandas3 │ ├── Pandas3.tex │ └── figures │ │ ├── mammal_bar.pdf │ │ ├── mammal_box_cols.pdf │ │ ├── mammal_box_groups.pdf │ │ ├── mammal_hist.pdf │ │ ├── mammal_hist_carni.pdf │ │ └── mammal_hist_herbi.pdf ├── Pandas4 │ ├── Pandas4.tex │ └── figures │ │ ├── airports.pdf │ │ ├── gdp.pdf │ │ ├── world_linear.pdf │ │ ├── world_log.pdf │ │ └── worldmap.pdf ├── Parallel_Intro │ ├── figures │ │ └── ipyarch.png │ └── parallel1.tex ├── RegularExpressions │ └── RegularExpressions.tex ├── SQL1 │ ├── SQL1.tex │ └── rdb_table.pdf ├── SQL2 │ ├── SQL2.tex │ └── figures │ │ ├── inner_join.pdf │ │ └── left_outer.pdf ├── Spark │ └── spark.tex ├── UnixShell1 │ └── UnixShell1.tex ├── UnixShell2 │ └── UnixShell2.tex └── WebScraping │ └── WebScraping.tex ├── GettingStarted.tex ├── HJnewsiambook.cls ├── Makefile ├── PythonEssentials.tex ├── PythonEssentials ├── AdvancedNumpy │ ├── AdvancedNumpy.tex │ └── figures │ │ ├── broadcasting_mismatch.png │ │ ├── broadcasting_outer.png │ │ ├── broadcasting_scalar.png │ │ └── broadcasting_vector.png ├── DataVisualization │ ├── DataVisualization.tex │ └── figures │ │ ├── alpha1.pdf │ │ ├── alpha2.pdf │ │ ├── bar_1.pdf │ │ ├── bar_2.pdf │ │ ├── chartjunk1.jpg │ │ ├── chartjunk_improved.pdf │ │ ├── chebyshev_bad.pdf │ │ ├── chebyshev_good.pdf │ │ ├── contour_1.pdf │ │ ├── contour_2.pdf │ │ ├── earthquake.pdf │ │ ├── heatmap_1.png │ │ ├── heatmap_2.png │ │ ├── hexbin_1.pdf │ │ ├── hexbin_2.pdf │ │ ├── hist1.pdf │ │ ├── hist2.pdf │ │ ├── piebar1.pdf │ │ ├── piebar2.pdf │ │ ├── piebar3.pdf │ │ ├── piechart1.pdf │ │ ├── piechart2.pdf │ │ ├── piechart3.pdf │ │ ├── plannedparenthood.jpeg │ │ └── planparent_corrected.pdf ├── Exceptions_FileIO │ └── Exceptions_FileIO.tex ├── MatplotlibIntro │ ├── MatplotlibIntro.tex │ └── figures │ │ ├── basic1.pdf │ │ ├── basic2.pdf │ │ ├── contour.pdf │ │ ├── contourf.pdf │ │ ├── custom1.pdf │ │ ├── custom2.pdf │ │ ├── discontinuousProblem.pdf │ │ ├── heatmap.png │ │ ├── histogram.pdf │ │ ├── layout_1.pdf │ │ ├── layout_2.pdf │ │ ├── layout_3.pdf │ │ ├── layout_4.pdf │ │ ├── layout_5.pdf │ │ ├── layout_6.pdf │ │ ├── meshplot_fig.pdf │ │ ├── scatterplot.pdf │ │ ├── subplots_1.pdf │ │ ├── subplots_2.pdf │ │ └── surface_plot.pdf ├── NumpyIntro │ └── NumpyIntro.tex ├── ObjectOriented │ └── ObjectOriented.tex ├── Profiling │ └── Profiling.tex ├── PythonIntro │ └── PythonIntro.tex ├── StandardLibrary │ └── StandardLibrary.tex ├── SympyIntro │ ├── SympyIntro.tex │ └── figures │ │ └── pretty_printing.png └── UnitTesting │ ├── UnitTesting.tex │ └── figures │ ├── set1.jpg │ ├── set2.jpg │ ├── set3.jpg │ ├── set4.jpg │ ├── set5.jpg │ ├── set6.jpg │ └── set_game.jpg ├── README.md ├── Volume1.tex ├── Volume1 ├── Arnoldi │ ├── Arnoldi.tex │ └── figures │ │ ├── rand_eigs_conv.pdf │ │ └── rand_vals_conv.pdf ├── ComplexFunctions │ ├── ComplexFunctions.tex │ └── figures │ │ ├── discontinuity_angle.png │ │ ├── discontinuity_magnitude.png │ │ ├── identity_angle.png │ │ ├── identity_magnitude.png │ │ ├── poles_angle.png │ │ ├── zeros_angle.png │ │ └── zeros_magnitude.png ├── Conditioning_Stability │ ├── Conditioning_Stability.tex │ └── figures │ │ ├── eigenvalue_conditioning.png │ │ ├── perturbed_poly.pdf │ │ ├── perturbed_roots.pdf │ │ └── wilkinson_prob_solution.pdf ├── Differentiation │ ├── Differentiation.tex │ └── figures │ │ ├── efficiency.pdf │ │ ├── error_plot.pdf │ │ └── plane_diagram.png ├── DrazinInverse │ ├── DrazinInverse.tex │ └── network.png ├── FacialRecognition │ ├── FacialRecognition.tex │ └── figures │ │ ├── differenceFace0.png │ │ ├── eigenface0.png │ │ ├── eigenface49.png │ │ ├── eigenface99.png │ │ ├── meanFace.png │ │ ├── originalFace0.png │ │ ├── rebuiltEighth.png │ │ ├── rebuiltHalf.png │ │ └── rebuiltThirtySecond.png ├── GMRES │ ├── GMRES.tex │ └── figures │ │ ├── gmres_convergence.pdf │ │ └── scatter_gmres.pdf ├── GitHubIntro │ └── GitHubIntro.tex ├── ImageSegmentation │ ├── ImageSegmentation.tex │ └── figures │ │ ├── dream.pdf │ │ ├── dream_neg.pdf │ │ └── dream_pos.pdf ├── IterativeSolvers │ ├── IterativeSolvers.tex │ └── figures │ │ └── jacobi_convergence.pdf ├── LeastSquares_Eigenvalues │ ├── LeastSquares_Eigenvalues.tex │ └── figures │ │ ├── circle_fit_example.pdf │ │ ├── line_fit_example.pdf │ │ ├── various_norm_ellipse.pdf │ │ └── weighted_least_squares.pdf ├── LinearSystems │ ├── LinearSystems.tex │ └── figures │ │ └── spydemo.pdf ├── LinearTransformations │ ├── LinearTransformations.tex │ └── figures │ │ ├── CompositionHorse.pdf │ │ ├── OriginalHorse.pdf │ │ ├── ReflectionHorse.pdf │ │ ├── RotationHorse.pdf │ │ ├── ShearHorse.pdf │ │ ├── SolarSystem.pdf │ │ ├── StretchHorse.pdf │ │ ├── TranslationHorse.pdf │ │ ├── loglogDemoBad.pdf │ │ ├── loglogDemoGood.pdf │ │ ├── matrixMatrixMultiplication.pdf │ │ ├── matrixVectorMultiplication.pdf │ │ ├── time_random_matrix1.pdf │ │ └── time_random_matrix2.pdf ├── MonteCarloIntegration │ ├── MonteCarloIntegration.tex │ └── figures │ │ ├── mc_circle_0500.pdf │ │ ├── mc_circle_2000.pdf │ │ ├── mc_circle_8000.pdf │ │ └── mc_convergence.pdf ├── PageRank │ └── PageRank.tex ├── QR_Decomposition │ └── QR_Decomposition.tex └── SVD_ImageCompression │ ├── SVD_ImageCompression.tex │ └── figures │ ├── full_transformation.pdf │ ├── hubble_gray.jpg │ ├── hubble_svals.pdf │ ├── rank120.pdf │ ├── rank2.pdf │ ├── rank20.pdf │ ├── svcircle.pdf │ ├── unit_circle.pdf │ └── vcircle.pdf ├── Volume2.tex ├── Volume2 ├── BinaryTrees │ └── BinaryTrees.tex ├── BreadthFirstSearch │ └── BreadthFirstSearch.tex ├── CVXPY_Intro │ └── CVXPY_Intro.tex ├── ConvolutionFiltering │ └── ConvolutionFiltering.tex ├── Dijkstra │ └── Dijkstra.tex ├── DynamicProgramming │ ├── DynamicProgramming.tex │ └── figures │ │ └── diff_policies.pdf ├── FourierTransform │ ├── FourierTransform.tex │ └── figures │ │ ├── dft_a.pdf │ │ ├── dft_a_half.pdf │ │ ├── dft_chord.pdf │ │ ├── dft_tada.pdf │ │ ├── fast_tada.pdf │ │ ├── notebook_audio.pdf │ │ └── tada.pdf ├── GaussianQuadrature │ └── GaussianQuadrature.tex ├── GradientMethods │ ├── GradientMethods.tex │ └── figures │ │ ├── linregression.pdf │ │ ├── logreg.pdf │ │ ├── steepVsConj.pdf │ │ └── steepest.pdf ├── Gymnasium │ ├── Gymnasium.tex │ └── figures │ │ ├── acrobot.pdf │ │ └── taxi.pdf ├── InteriorPoint_Linear │ ├── InteriorPoint_Linear.tex │ └── figures │ │ ├── interiorPath.pdf │ │ └── leastAbsDev.pdf ├── InteriorPoint_Quadratic │ ├── InteriorPoint_Quadratic.tex │ └── figures │ │ ├── frontier.pdf │ │ └── tent.pdf ├── MarkovChains │ └── MarkovChains.tex ├── NMF │ ├── NMF.tex │ └── figures │ │ ├── building_basis_images.pdf │ │ ├── building_images.pdf │ │ └── facial_features.pdf ├── NearestNeighbor │ ├── NearestNeighbor.tex │ └── figures │ │ ├── curse_k.pdf │ │ ├── curse_m.pdf │ │ ├── digit.pdf │ │ ├── kdtnn_search1.pdf │ │ ├── kdtnn_search2.pdf │ │ ├── kdtnn_search3.pdf │ │ ├── partition1.pdf │ │ ├── partition2.pdf │ │ └── partition3.pdf ├── OneD_Optimization │ ├── OneD_Optimization.tex │ └── figures │ │ ├── fractal_ex.png │ │ ├── fractal_hw.png │ │ └── large_alpha.pdf ├── PolicyFunctionIteration │ ├── PolicyFunctionIteration.tex │ └── figures │ │ ├── 4x4_image.pdf │ │ └── 8x8_image.pdf ├── PolynomialInterpolation │ ├── PolynomialInterpolation.tex │ └── figures │ │ ├── bad_interp1.pdf │ │ ├── bad_interp2.pdf │ │ ├── extrema.pdf │ │ ├── good_interp1.pdf │ │ └── good_interp2.pdf ├── Sampling │ └── Sampling.tex ├── Simplex │ ├── Simplex.tex │ └── figures │ │ └── feasiblePolytope.pdf └── Wavelets │ ├── Wavelets.tex │ └── figures │ ├── compressed_finger(30comp).png │ ├── compressed_finger(60comp).png │ ├── dwt1D.pdf │ ├── mandrill1.png │ ├── mandrill2.png │ ├── mandrill3.png │ ├── mandrill4.png │ └── uncompressed_finger.png ├── Volume3.tex ├── Volume3 ├── ARMA │ ├── ARMA.tex │ └── figures │ │ ├── arma.pdf │ │ ├── copper.pdf │ │ ├── correlations.pdf │ │ ├── econ2.pdf │ │ ├── manaus.pdf │ │ ├── naive.pdf │ │ ├── sm.pdf │ │ └── sunspot.pdf ├── CDHMM │ ├── CDHMM.tex │ └── figures │ │ ├── mixture.pdf │ │ └── samples.pdf ├── DeepLearningIntro │ ├── DeepLearningIntro.tex │ └── figures │ │ ├── net1.png │ │ ├── net2.png │ │ ├── neural_net.png │ │ ├── panda.png │ │ ├── perturbed_updated.png │ │ └── tensor_board_home.png ├── GMM │ ├── GMM.tex │ └── figures │ │ ├── gmm.jpeg │ │ └── sum.jpeg ├── Gibbs_LDA │ ├── LDA.tex │ └── figures │ │ ├── mu_posterior.pdf │ │ ├── predictiveposterior.pdf │ │ └── sigma2_posterior.pdf ├── HMM │ └── HMM.tex ├── InformationTheory │ ├── InformationTheory.tex │ └── figures │ │ └── wordle-example.png ├── KMeans │ └── KMeans.tex ├── KalmanFilter │ ├── KalmanFilter.tex │ └── figures │ │ ├── estimate_macro.pdf │ │ ├── estimate_micro.pdf │ │ ├── impact_macro.pdf │ │ ├── impact_micro.pdf │ │ ├── obs_evolution.pdf │ │ ├── origin_macro.pdf │ │ ├── origin_micro.pdf │ │ └── states_evolution.pdf ├── LSI_SkLearn │ ├── LSI-SkLearn.tex │ └── figures │ │ └── cancer.pdf ├── LinearRegression │ ├── LinearRegression.tex │ └── figures │ │ └── cubic_polynomial.pdf ├── LogisticRegression │ ├── LogisticRegression.tex │ └── figures │ │ ├── plot_iris.pdf │ │ ├── prob3_test.pdf │ │ └── sigmoid.pdf ├── Metropolis │ ├── Metropolis.tex │ └── figures │ │ ├── beta0_2.pdf │ │ ├── beta0_2_logprobs.pdf │ │ ├── beta0_4.pdf │ │ ├── beta0_4_logprobs.pdf │ │ ├── beta1.pdf │ │ ├── beta1_logprobs.pdf │ │ ├── initial_config.pdf │ │ ├── logprobs.pdf │ │ ├── mu_kernel.pdf │ │ ├── mu_traces.pdf │ │ ├── sig_kernel.pdf │ │ └── sig_traces.pdf ├── NMF_Recommender │ └── NMF_Recommender.tex ├── NaiveBayes │ └── NaiveBayes.tex ├── RNN │ └── rnn.tex └── RandomForest │ ├── RandomForest.tex │ └── example_tree.pdf ├── Volume4.tex ├── Volume4 ├── Animation │ ├── Animation.tex │ └── figures │ │ ├── normal_density.pdf │ │ ├── orbits-midanimation.pdf │ │ └── orbits.pdf ├── AnisotropicDiffusion │ ├── AnisotropicDiffusion.tex │ └── figures │ │ ├── balloons_color_50iters.pdf │ │ ├── balloons_colors.pdf │ │ ├── cleaned_balloons.pdf │ │ ├── coke_balloon_0iters.pdf │ │ ├── coke_balloon_100iters.pdf │ │ ├── coke_balloon_20iters.pdf │ │ ├── coke_balloon_5iters.pdf │ │ └── noisy_balloons.pdf ├── FiniteDifferenceMethod │ ├── FiniteDifferenceMethod.tex │ └── figures │ │ ├── example_convergence.pdf │ │ ├── figure2.pdf │ │ ├── figure3.pdf │ │ ├── figure4.pdf │ │ └── figure5.pdf ├── FiniteElement │ ├── FiniteElement.tex │ └── figures │ │ ├── FEM_compare_methods.pdf │ │ ├── FEM_error_2nd_order.pdf │ │ ├── FEM_solution.pdf │ │ ├── basis_functions.pdf │ │ └── one_basis_function.pdf ├── HIV_Treatment │ ├── HIV_Treatment.tex │ └── figures │ │ └── hiv_solution.pdf ├── HeatFlow │ ├── HeatFlow.tex │ └── figures │ │ ├── MaximumError.pdf │ │ ├── heatexercise1a.pdf │ │ ├── heatexercise1b.pdf │ │ └── heatexercise2.pdf ├── Hysteresis │ ├── Hysteresis.tex │ └── figures │ │ ├── BudwormEquilibria.pdf │ │ ├── BudwormPopulation.pdf │ │ ├── HysteresisBifurcation.pdf │ │ ├── SaddleNBifurcation.pdf │ │ ├── SaddleNPhasePortrait.pdf │ │ ├── pitchfork_state_space.pdf │ │ └── prob1.pdf ├── IVP_BVP_Intro │ ├── IVP_BVP_Intro.tex │ └── figures │ │ ├── bvp_param_example.pdf │ │ ├── fig1.pdf │ │ ├── fig3.pdf │ │ ├── problem1.pdf │ │ ├── problem2.pdf │ │ ├── problem3.pdf │ │ ├── problem41.pdf │ │ ├── problem42.pdf │ │ ├── problem43.pdf │ │ └── problem5.pdf ├── InverseProblem │ ├── InverseProblem.tex │ └── figures │ │ ├── cause_and_effect.pdf │ │ ├── density_a.pdf │ │ ├── ill_posed_density_a.pdf │ │ └── spatially_dependent_nu.pdf ├── InvertedPendulum │ ├── InvertedPendulum.tex │ └── figures │ │ ├── nonlinear_attempt1.pdf │ │ ├── nonlinear_attempt2.pdf │ │ ├── prob4_stable.pdf │ │ ├── prob4_unstable.pdf │ │ └── rickshaw_img.png ├── LQG │ └── LQG.tex ├── LorenzEquations │ ├── LorenzEquations.tex │ └── figures │ │ ├── Multiple_Lorenz.pdf │ │ ├── Single_Lorenz.pdf │ │ └── semilog.pdf ├── Numerical_IVP │ ├── Numerical_IVP.tex │ └── figures │ │ ├── Efficiency.pdf │ │ ├── damped_forced_oscillator.pdf │ │ ├── euler.pdf │ │ ├── example2.pdf │ │ ├── prob2.pdf │ │ └── simple_oscillator.pdf ├── ObstacleAvoidance │ ├── ObstacleAvoidance.tex │ └── figures │ │ ├── OA_prob1.pdf │ │ ├── OA_prob2.pdf │ │ ├── OA_prob4.pdf │ │ └── example2.pdf ├── PoissonEquation │ ├── Poisson.tex │ └── figures │ │ ├── mt_rushmore.pdf │ │ ├── poisson_square.pdf │ │ ├── potential.pdf │ │ └── relative_charge.pdf ├── PredatorPreyModels │ ├── PredatorPreyModels.tex │ └── figures │ │ ├── LV_Phase_Portrait.png │ │ └── Predator_Prey.png ├── RiverCrossing │ ├── RiverCrossing.tex │ └── figures │ │ ├── minimum_time_rivercrossing.pdf │ │ ├── rivercurrent.pdf │ │ └── trajectory_angle.pdf ├── SIR_Models │ ├── SIR_Models.tex │ └── figures │ │ ├── PGED-model.pdf │ │ ├── SIR1.pdf │ │ ├── SIR2.pdf │ │ ├── bvp_example.pdf │ │ ├── ivpexample1.pdf │ │ ├── measles.pdf │ │ └── problem3.pdf ├── ShootingMethod │ ├── Shooting.tex │ └── figures │ │ ├── cannon_comparison.pdf │ │ ├── example1.pdf │ │ ├── problem1.pdf │ │ ├── problem2.pdf │ │ └── problem3.pdf ├── Solitons │ └── Solitons.tex ├── SpectralMethod1 │ ├── Spectral1.tex │ └── figures │ │ └── minimal_surface.pdf ├── SpectralMethod2 │ ├── Spectral2.tex │ └── figures │ │ ├── spectral2_derivative_example.pdf │ │ ├── variable_speed_advection.pdf │ │ └── wave_equation_barrier.pdf ├── TotalVariation │ ├── TotalVariation.tex │ └── figures │ │ ├── balloon_diffusion.pdf │ │ ├── balloon_gray.pdf │ │ ├── balloon_noise.pdf │ │ ├── balloon_total_variation.pdf │ │ └── min_surface_area.pdf └── WaveEquation │ ├── figures │ └── prob2.pdf │ └── waveeqn.tex ├── by.pdf ├── cc-by-license.txt ├── command.tex ├── compile_labs.sh ├── contributors.tex ├── docs ├── DataScienceEssentials.pdf ├── GettingStarted.pdf ├── PythonEssentials.pdf ├── Volume1.pdf ├── Volume2.pdf ├── Volume3.pdf └── Volume4.pdf ├── newsiambk10.clo └── references.bib /.clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Clean up the repository by removing auxiliary files. 3 | 4 | FILES=(PythonEssentials DataScienceEssentials Volume1 Volume2 Volume3 Volume4 GettingStarted ExtraLabs onelab) 5 | 6 | set +e # Ignore any failures 7 | 8 | # Delete .pyc files and Jupyter Notebook checkpoints. 9 | find . -type f -name "*.pyc" -delete 10 | find . -type d -name ".ipynb_checkpoints" -exec rm -rf {} + 11 | find . -type d -name "__pycache__" -exec rm -rf {} + 12 | 13 | # Delete extra files that may have been generated by LaTeX. 14 | for FILE in ${FILES[@]} 15 | do 16 | find . -type f -name "$FILE*.*" ! -name "$FILE.tex" ! -name "$FILE.pdf" -delete 17 | done 18 | 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Lab data files -------------------------------------------------------------- 3 | 4 | PythonEssentials/NumpyIntro/grid.npy 5 | PythonEssentials/MatplotlibIntro/FARS.npy 6 | PythonEssentials/Exceptions_FileIO/hello_world.txt 7 | PythonEssentials/Exceptions_FileIO/cf_example1.txt 8 | PythonEssentials/Exceptions_FileIO/cf_example2.txt 9 | PythonEssentials/Profiling/names.txt 10 | PythonEssentials/Profiling/triangle.txt 11 | PythonEssentials/Profiling/triangle_large.txt 12 | PythonEssentials/DataVisualization/anscombe.npy 13 | PythonEssentials/DataVisualization/MLB.npy 14 | PythonEssentials/DataVisualization/earthquakes.npy 15 | PythonEssentials/DataVisualization/countries.npy 16 | 17 | Volume1/LinearTransformations/horse.npy 18 | Volume1/LeastSquares_Eigenvalues/circle.npy 19 | Volume1/LeastSquares_Eigenvalues/ellipse.npy 20 | Volume1/LeastSquares_Eigenvalues/housing.npy 21 | Volume1/ImageSegmentation/dream.png 22 | Volume1/ImageSegmentation/dream_gray.png 23 | Volume1/ImageSegmentation/blue_heart.png 24 | Volume1/SVD_ImageCompression/hubble.jpg 25 | Volume1/SVD_ImageCompression/hubble_gray.jpg 26 | Volume1/FacialRecognition/faces94.zip 27 | Volume1/Differentiation/plane.npy 28 | Volume1/Conditioning_Stability/stability_data.npy 29 | Volume1/PageRank/web_stanford.txt 30 | Volume1/PageRank/ncaa2010.csv 31 | Volume1/PageRank/ncaa2011.csv 32 | Volume1/PageRank/ncaa2012.csv 33 | Volume1/PageRank/ncaa2013.csv 34 | Volume1/PageRank/ncaa2014.csv 35 | Volume1/PageRank/ncaa2015.csv 36 | Volume1/PageRank/ncaa2016.csv 37 | Volume1/PageRank/ncaa2017.csv 38 | Volume1/PageRank/top250movies.txt 39 | Volume1/DrazinInverse/social_network.csv 40 | 41 | Volume2/LinkedLists/english.txt 42 | Volume2/BinaryTrees/english.txt 43 | Volume2/NearestNeighbor/mnist_subset.npz 44 | Volume2/BreadthFirstSearch/movie_data.txt 45 | Volume2/BreadthFirstSearch/movie_data_small.txt 46 | Volume2/MarkovChains/yoda.txt 47 | Volume2/MarkovChains/tswift1989.txt 48 | Volume2/MarkovChains/trump.txt 49 | Volume2/FourierTransform/tada.wav 50 | Volume2/FourierTransform/mystery_chord.wav 51 | Volume2/ConvolutionFiltering/tada.wav 52 | Volume2/ConvolutionFiltering/CGC.wav 53 | Volume2/ConvolutionFiltering/GCG.wav 54 | Volume2/ConvolutionFiltering/balloon.wav 55 | Volume2/ConvolutionFiltering/chopin.wav 56 | Volume2/ConvolutionFiltering/noisy1.wav 57 | Volume2/ConvolutionFiltering/noisy2.wav 58 | Volume2/ConvolutionFiltering/vuvuzela.wav 59 | Volume2/ConvolutionFiltering/noisy_face.png 60 | Volume2/ConvolutionFiltering/license_plate.png 61 | Volume2/Dijkstra/bathymetry.tt3 62 | Volume2/Wavelets/mandrill.png 63 | Volume2/Wavelets/woman_darkhair.png 64 | Volume2/Wavelets/noisy_darkhair.png 65 | Volume2/Wavelets/uncompressed_finger.png 66 | Volume2/PolynomialInterpolation/airdata.npy 67 | Volume2/QuasiNewtonMethods/population.npy 68 | Volume2/GradientMethods/linregression.txt 69 | Volume2/GradientMethods/challenger.npy 70 | Volume2/CVXOPT_Intro/ForestData.npy 71 | Volume2/Simplex/productMix.npz 72 | Volume2/InteriorPoint_Linear/simdata.txt 73 | Volume2/InteriorPoint_Quadratic/portfolio.txt 74 | 75 | DataScienceEssentials/UnixShell?/*.zip 76 | DataScienceEssentials/UnixShell?/*.tar.gz 77 | DataScienceEssentials/UnixShell1/Shell1/ 78 | DataScienceEssentials/UnixShell1/img_649.jpg 79 | DataScienceEssentials/SQL1/student_info.csv 80 | DataScienceEssentials/SQL1/student_grades.csv 81 | DataScienceEssentials/SQL1/us_earthquakes.csv 82 | DataScienceEssentials/SQL2/students.db 83 | DataScienceEssentials/RegularExpressions/fake_contacts.txt 84 | DataScienceEssentials/WebScraping1/example.html 85 | DataScienceEssentials/WebScraping1/san_diego_weather.html 86 | DataScienceEssentials/WebScraping1/large_banks_index.html 87 | DataScienceEssentials/WebScraping1/large_banks_data.html 88 | DataScienceEssentials/WebTechnologies/nyc_traffic.json 89 | DataScienceEssentials/Pandas1/crime_data.csv 90 | DataScienceEssentials/Pandas1/final_accidents2.pickle 91 | DataScienceEssentials/Pandas1/final_drivers.pickle 92 | DataScienceEssentials/Pandas2/final_accidents2.pickle 93 | DataScienceEssentials/Pandas2/final_drivers.pickle 94 | DataScienceEssentials/Pandas2/new_york_crime_clean.csv 95 | DataScienceEssentials/Pandas3/time_usage.txt 96 | DataScienceEssentials/Pandas3/Ohio_1999.csv 97 | DataScienceEssentials/Pandas4/DJIA.csv 98 | DataScienceEssentials/Pandas4/finances.csv 99 | DataScienceEssentials/Pandas4/paychecks.csv 100 | DataScienceEssentials/Pandas4/website_traffic.csv 101 | DataScienceEssentials/Pandas5/airports.csv 102 | DataScienceEssentials/MongoDB/trump.json 103 | DataScienceEssentials/Spark/huck_finn.txt 104 | 105 | Volume3/Metropolis/examscores.npy 106 | Volume3/LDA/reagan.txt 107 | Volume3/LDA/stopwords.txt 108 | Volume3/LDA/examscores.npy 109 | Volume3/Gibbs_LDA/reagan.txt 110 | Volume3/Gibbs_LDA/stopwords.txt 111 | Volume3/PCA_LSI/stopwords.txt 112 | Volume3/PCA_LSI/Addresses.zip 113 | Volume3/PCA_LSI/Addresses/*.txt 114 | Volume3/LSI_SkLearn/stopwords.txt 115 | Volume3/LSI_SkLearn/Addresses.zip 116 | Volume3/LSI_SkLearn/Addresses/*.txt 117 | Volume3/KMeans/earthquake_coordinates.npy 118 | Volume3/KMeans/nasa/ 119 | Volume3/ARMA/time_series_?.txt 120 | Volume3/Spark/metastore_db 121 | Volume3/Spark/spark-warehouse 122 | Volume3/Spark/data-files 123 | Volume3/NaiveBayes/enron_mail_20150507 124 | Volume3/NaiveBayes/smsspamcollection 125 | Volume3/InformationTheory/allowed_words.txt 126 | Volume3/InformationTheory/possible_words.txt 127 | Volume3/GMM/classification.npz 128 | Volume3/GMM/problem7.npy 129 | 130 | # General Files --------------------------------------------------------------- 131 | *.csv 132 | *.npy 133 | *.html* 134 | *.zip 135 | *.gpkg 136 | 137 | 138 | # Extra Python files. 139 | __init__.py 140 | __main__.py 141 | *.py[cdfo] 142 | __pycache__/ 143 | .ipynb_checkpoints/ 144 | 145 | # Latex temporary files 146 | *.aux 147 | *.bbl 148 | *.blg 149 | *.dvi 150 | *.glg 151 | *.glo 152 | *.gls 153 | *.idx 154 | *.ilg 155 | *.ind 156 | *.ist 157 | *.lof 158 | *.log 159 | *.lot 160 | *.nlo 161 | *.out 162 | *.toc 163 | *.fdb_latexmk 164 | *.pdfsync 165 | *.synctex.gz 166 | *.nav 167 | *.snm 168 | *.vrb 169 | *.bcf 170 | *.fls 171 | *.run.xml 172 | *.pdf 173 | 174 | # OS generated files 175 | .DS_Store 176 | .vscode 177 | 178 | # Backup files 179 | *~ 180 | *.backup 181 | *.bak 182 | *.tmp 183 | *.temp 184 | *.sav 185 | 186 | # C compiled files, extensions 187 | *.dll 188 | *.o 189 | *.so 190 | 191 | # Packages 192 | *.egg 193 | *.egg-info 194 | dist 195 | build 196 | eggs 197 | parts 198 | bin 199 | var 200 | sdist 201 | develop-eggs 202 | .installed.cfg 203 | 204 | # Unit test / coverage reports 205 | .coverage 206 | .tox 207 | .cache/ 208 | .pytest_cache/ 209 | htmlcov/ 210 | 211 | # Lab PDFS 212 | PythonEssentials.pdf 213 | DataScienceEssentials.pdf 214 | Volume[1234].pdf 215 | ExtraLabs.pdf 216 | onelab.pdf 217 | 218 | # Miscellaneous 219 | !docs/*.pdf 220 | build/ 221 | faces94/ 222 | *.mod 223 | nyc_*.json 224 | onelab.tex 225 | -------------------------------------------------------------------------------- /Appendices/GoogleColab/GoogleColab.tex: -------------------------------------------------------------------------------- 1 | \lab{Using Google Colab}{Google Colab} 2 | 3 | \objective{Google Colab is an environment similar to Jupyter Notebooks that is run remotely on Google's servers. 4 | It has some advantages over other environments, including easy package management and installation and the ability to run on a machine that doesn't have python installed. 5 | This appendix details how Colab can be used for ACME labs, as well as some issues to be aware of and relevant workarounds.} 6 | 7 | \section*{Setup} 8 | Google Colab can be started by going to the Colab website \url{https://colab.research.google.com/} or by opening a \li{.ipynb} file from your Google Drive. 9 | When Colab starts, you can upload a \li{.ipynb} file by selecting the \texttt{Upload} tab and choosing the \li{.ipynb} file you wish to upload. 10 | Colab can also be used with \li{.py} files, but the process is somewhat more involved and is detailed below. 11 | 12 | Once your file is open in Colab, it can be run and edited like a normal Jupyter notebook. 13 | To submit your lab for grading, you will need to download the file by selecting \li{< Download>>} and then either \li{Download .ipynb} or \li{Download .py}. 14 | You will then need to move your file into the repository clone on your machine in the correct lab folder, where you can then add, commit, and push it like normal. 15 | \begin{warn} 16 | Remember to keep the name of the file \textbf{\emph{IDENTICAL}} to the original name of the lab spec! 17 | Failure to do this will cause the test driver to skip over your file and give you an automatic zero for the lab! 18 | \end{warn} 19 | 20 | \subsection*{Using .py Files with Colab} 21 | Google Colab only works with \li{.ipynb} files, but many ACME labs use \li{.py} files. 22 | Since the former filetype has additional formatting, there isn't a way to directly import a \li{.py} file into Colab. 23 | The simplest way around this is to create a new file in Colab and copy-paste the lab file's contents into it. 24 | This way, it can be edited and used as a normal Jupyter notebook. 25 | Then, when you're finished, download the notebook as a \li{.py} file instead of a \li{.ipynb} file. 26 | 27 | However, under these circumstances some care must be taken in order for your work to be graded properly. 28 | In particular, before you download your file, make sure that the following are satisfied: 29 | \begin{itemize} 30 | \item All Colab-specific code to upload files is commented out; as the packages used do not exist outside of Google Colab, the test driver will raise an error when it attempts to import them. 31 | \item There are no calls to the lab's functions, for testing purposes or otherwise, outside of a typical \li{if __name__=="__main__"} statement; otherwise, they will be run when the file is imported by the test driver, which will certainly cause issues. 32 | \end{itemize} 33 | 34 | \section*{Using Data Files} 35 | To use a data file in Colab, you must first upload it by running the following in a code cell in Colab: 36 | \begin{lstlisting} 37 | from google.colab import files 38 | files.upload() 39 | \end{lstlisting} 40 | When run, this will create a prompt for you to upload your files. 41 | After doing so, the data files can be accessed from the notebook as normal. 42 | 43 | The best way to upload an entire folder is to first zip it, then upload the zipped folder to Colab, and then unzip it in the Colab notebook: 44 | \begin{lstlisting} 45 | # To upload a folder called 'data', first zip it, and then upload 'data.zip' 46 | files.upload() 47 | # Then, it can be unzipped 48 | !unzip data.zip 49 | \end{lstlisting} 50 | If the files do not need to be in the same folder, you can always simply upload multiple files at once with the usual \li{files.upload()} code. 51 | 52 | \section*{Installing Packages} 53 | One advantage of Google Colab is that a very large percentage of the python packages used in the ACME labs are already pre-installed. 54 | However, there are a few packages that are not installed, and must be installed each session. 55 | Packages can be installed by running \li{pip} in a code cell, which is done by putting an exclamation point before the usual command. 56 | For example, to install the GeoPandas package, you would run: 57 | \begin{lstlisting} 58 | !pip install geopandas 59 | \end{lstlisting} -------------------------------------------------------------------------------- /Appendices/MatplotlibCustomization/figures/3d_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Appendices/MatplotlibCustomization/figures/3d_example.pdf -------------------------------------------------------------------------------- /Appendices/MatplotlibCustomization/figures/axis_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Appendices/MatplotlibCustomization/figures/axis_example.pdf -------------------------------------------------------------------------------- /Appendices/MatplotlibCustomization/figures/heat_contour_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Appendices/MatplotlibCustomization/figures/heat_contour_example.png -------------------------------------------------------------------------------- /Appendices/MatplotlibCustomization/figures/layout_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Appendices/MatplotlibCustomization/figures/layout_1.pdf -------------------------------------------------------------------------------- /Appendices/MatplotlibCustomization/figures/layout_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Appendices/MatplotlibCustomization/figures/layout_2.pdf -------------------------------------------------------------------------------- /Appendices/MatplotlibCustomization/figures/layout_3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Appendices/MatplotlibCustomization/figures/layout_3.pdf -------------------------------------------------------------------------------- /Appendices/MatplotlibCustomization/figures/layout_4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Appendices/MatplotlibCustomization/figures/layout_4.pdf -------------------------------------------------------------------------------- /Appendices/MatplotlibCustomization/figures/layout_5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Appendices/MatplotlibCustomization/figures/layout_5.pdf -------------------------------------------------------------------------------- /Appendices/MatplotlibCustomization/figures/layout_6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Appendices/MatplotlibCustomization/figures/layout_6.pdf -------------------------------------------------------------------------------- /Appendices/MatplotlibCustomization/figures/linestyles_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Appendices/MatplotlibCustomization/figures/linestyles_example.pdf -------------------------------------------------------------------------------- /Appendices/MatplotlibCustomization/figures/positioning_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Appendices/MatplotlibCustomization/figures/positioning_example.pdf -------------------------------------------------------------------------------- /Cover.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Cover.pdf -------------------------------------------------------------------------------- /DataScienceEssentials.tex: -------------------------------------------------------------------------------- 1 | \pdfminorversion=4 2 | \documentclass[opener-c,labs,grey,nociteref]{HJnewsiambook} 3 | 4 | % See command.tex for all package imports, environments, and special commands. 5 | \input{command} 6 | 7 | \makeindex 8 | 9 | \title{Data Science Essentials} 10 | \author{Jeffrey Humpherys \& Tyler J.~Jarvis, managing editors} 11 | 12 | \begin{document} % ============================================================ 13 | 14 | \thispagestyle{empty} % Book cover and Front matter --------------------------- 15 | \maketitle 16 | \thispagestyle{empty} 17 | \frontmatter 18 | 19 | \include{contributors} 20 | 21 | \begin{thepreface} % Preface -------------------------------------------------- 22 | 23 | This lab manual is designed to accompany the textbook \emph{Foundations of Applied Mathematics} by Humpherys and Jarvis. 24 | While the Volume 3 text focuses on statistics and rigorous data analysis, these labs aim to introduce experienced Python programmers to common tools for obtaining, cleaning, organizing, and presenting data. 25 | The reader should be familiar with Python \cite{vanrossum2010python} and its NumPy \cite{oliphant2006guide,ascher2001numerical,oliphant2007python} and Matplotlib \cite{Hunter:2007} packages before attempting these labs. 26 | See the Python Essentials manual for introductions to these topics. 27 | 28 | \vfill 29 | \copyright{This work is licensed under the Creative Commons Attribution 3.0 United States License. 30 | You may copy, distribute, and display this copyrighted work only if you give credit to Dr.~J.~Humpherys. 31 | All derivative works must include an attribution to Dr.~J.~Humpherys as the owner of this work as well as the web address to 32 | \\\centerline{\url{https://github.com/Foundations-of-Applied-Mathematics/Labs}}\\as the original source of this work. 33 | \\To view a copy of the Creative Commons Attribution 3.0 License, visit 34 | \\\centerline{\url{http://creativecommons.org/licenses/by/3.0/us/}} or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.} 35 | 36 | \vfill 37 | \centering\includegraphics[height=1.2cm]{by.pdf} 38 | \vfill 39 | \end{thepreface} 40 | 41 | \setcounter{tocdepth}{1} 42 | \tableofcontents 43 | 44 | \mainmatter % LABS ============================================================ 45 | 46 | \part{Labs} 47 | \subimport{./DataScienceEssentials/UnixShell1/}{UnixShell1} 48 | \subimport{./DataScienceEssentials/UnixShell2/}{UnixShell2} 49 | \subimport{./DataScienceEssentials/SQL1/}{SQL1} 50 | \subimport{./DataScienceEssentials/SQL2/}{SQL2} 51 | \subimport{./DataScienceEssentials/RegularExpressions/}{RegularExpressions} 52 | % \subimport{./DataScienceEssentials/WebTechnologies/}{WebTechnologies} 53 | \subimport{./DataScienceEssentials/WebScraping/}{WebScraping} 54 | % \subimport{./DataScienceEssentials/WebCrawling/}{WebCrawling} 55 | \subimport{./DataScienceEssentials/Pandas1/}{Pandas1} 56 | \subimport{./DataScienceEssentials/Pandas2/}{Pandas2} 57 | \subimport{./DataScienceEssentials/Pandas3/}{Pandas3} 58 | \subimport{./DataScienceEssentials/Pandas4/}{Pandas4} 59 | \subimport{./DataScienceEssentials/DataCleaning/}{DataCleaning} 60 | % \subimport{./DataScienceEssentials/MongoDB/}{MongoDB} 61 | \subimport{./DataScienceEssentials/Parallel_Intro/}{parallel1} 62 | \subimport{./DataScienceEssentials/MPI/}{mpi} 63 | % \subimport{./DataScienceEssentials/Ethics/}{ethics} 64 | \subimport{./DataScienceEssentials/Spark/}{spark} 65 | 66 | 67 | \part{Appendices} % Relevant Appendices --------------------------------------- 68 | \begin{appendices} 69 | \subimport{./Appendices/NumpyVisualGuide/}{NumpyVisualGuide} 70 | \subimport{./Appendices/MatplotlibCustomization/}{MatplotlibCustomization} 71 | % \subimport{./Appendices/SklearnGuide/}{SklearnGuide} 72 | \end{appendices} 73 | 74 | % Bibliography 75 | \bibliographystyle{alpha} 76 | \bibliography{references} 77 | 78 | \end{document} 79 | -------------------------------------------------------------------------------- /DataScienceEssentials/MPI/examplecode/Get_rank_example.py: -------------------------------------------------------------------------------- 1 | #Get_rank_example.py 2 | from mpi4py import MPI 3 | RANK = MPI.COMM_WORLD.Get_rank() 4 | print(f"My rank is {RANK}.") 5 | -------------------------------------------------------------------------------- /DataScienceEssentials/MPI/examplecode/Get_size_example.py: -------------------------------------------------------------------------------- 1 | #Get_size_example.py 2 | from mpi4py import MPI 3 | SIZE = MPI.COMM_WORLD.Get_size() 4 | print(f"The number of processes is {SIZE}.") 5 | -------------------------------------------------------------------------------- /DataScienceEssentials/MPI/examplecode/Send_example.py: -------------------------------------------------------------------------------- 1 | #Send_example.py 2 | from mpi4py import MPI 3 | import numpy as np 4 | 5 | RANK = MPI.COMM_WORLD.Get_rank() 6 | 7 | a = np.zeros(1, dtype=int) # This must be an array. 8 | if RANK == 0: 9 | a[0] = 10110100 10 | MPI.COMM_WORLD.Send(a, dest=1) 11 | elif RANK == 1: 12 | MPI.COMM_WORLD.Recv(a, source=0) 13 | print(a[0]) 14 | -------------------------------------------------------------------------------- /DataScienceEssentials/MPI/examplecode/hello.py: -------------------------------------------------------------------------------- 1 | #hello.py 2 | from mpi4py import MPI 3 | 4 | COMM = MPI.COMM_WORLD 5 | RANK = COMM.Get_rank() 6 | 7 | print(f"Hello world! I'm process number {RANK}.") 8 | -------------------------------------------------------------------------------- /DataScienceEssentials/MPI/examplecode/passValue.py: -------------------------------------------------------------------------------- 1 | #passValue.py 2 | import numpy as np 3 | from mpi4py import MPI 4 | 5 | COMM = MPI.COMM_WORLD 6 | RANK = COMM.Get_rank() 7 | 8 | if RANK == 1: # This process chooses and sends a random value 9 | num_buffer = np.random.rand(1) 10 | print(f"Process 1: Sending: {num_buffer} to process 0.") 11 | COMM.Send(num_buffer, dest=0) 12 | print("Process 1: Message sent.") 13 | if RANK == 0: # This process receives a value from process 1 14 | num_buffer = np.zeros(1) 15 | print(f"Process 0: Waiting for the message... current {num_buffer=}.") 16 | COMM.Recv(num_buffer, source=1) 17 | print(f"Process 0: Message received! {num_buffer=}.") 18 | -------------------------------------------------------------------------------- /DataScienceEssentials/MPI/examplecode/pi.py: -------------------------------------------------------------------------------- 1 | # pi.py 2 | import numpy as np 3 | from scipy import linalg as la 4 | 5 | 6 | # Get 2000 random points in the 2-D domain [-1,1]x[-1,1]. 7 | points = np.random.uniform(-1, 1, (2, 2000)) 8 | 9 | # Determine how many points are within the unit circle. 10 | lengths = la.norm(points, axis=0) 11 | num_within = np.count_nonzero(lengths < 1) 12 | 13 | # Estimate the circle's area. 14 | print(4 * (num_within / 2000)) 15 | -------------------------------------------------------------------------------- /DataScienceEssentials/MPI/examplecode/separateCode.py: -------------------------------------------------------------------------------- 1 | #separateCode.py 2 | from mpi4py import MPI 3 | RANK = MPI.COMM_WORLD.Get_rank() 4 | 5 | a = 2 6 | b = 3 7 | if RANK == 0: 8 | print(a + b) 9 | elif RANK == 1: 10 | print(a * b) 11 | elif RANK == 2: 12 | print(max(a, b)) 13 | -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas1/figures/moving_ewma.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas1/figures/moving_ewma.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas1/figures/moving_rolling.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas1/figures/moving_rolling.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/Rent.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/Rent.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/all_budget.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/all_budget.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/all_budget2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/all_budget2.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/all_expenses.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/all_expenses.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/bad_hist_stacked.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/bad_hist_stacked.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/bad_hist_unstacked.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/bad_hist_unstacked.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/box1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/box1.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/box2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/box2.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/hist_subplots.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/hist_subplots.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/ice_cream_bad.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/ice_cream_bad.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/ice_cream_good.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/ice_cream_good.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/line_compare.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/line_compare.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/line_subplots.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/line_subplots.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/scatter_compare.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/scatter_compare.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/scatter_table.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/scatter_table.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/scores_hexbin.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/scores_hexbin.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/scores_scatter.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/scores_scatter.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas2/figures/some_expenses.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas2/figures/some_expenses.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas3/figures/mammal_bar.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas3/figures/mammal_bar.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas3/figures/mammal_box_cols.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas3/figures/mammal_box_cols.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas3/figures/mammal_box_groups.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas3/figures/mammal_box_groups.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas3/figures/mammal_hist.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas3/figures/mammal_hist.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas3/figures/mammal_hist_carni.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas3/figures/mammal_hist_carni.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas3/figures/mammal_hist_herbi.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas3/figures/mammal_hist_herbi.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas4/figures/airports.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas4/figures/airports.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas4/figures/gdp.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas4/figures/gdp.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas4/figures/world_linear.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas4/figures/world_linear.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas4/figures/world_log.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas4/figures/world_log.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Pandas4/figures/worldmap.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Pandas4/figures/worldmap.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/Parallel_Intro/figures/ipyarch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/Parallel_Intro/figures/ipyarch.png -------------------------------------------------------------------------------- /DataScienceEssentials/SQL1/rdb_table.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/SQL1/rdb_table.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/SQL2/figures/inner_join.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/SQL2/figures/inner_join.pdf -------------------------------------------------------------------------------- /DataScienceEssentials/SQL2/figures/left_outer.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/DataScienceEssentials/SQL2/figures/left_outer.pdf -------------------------------------------------------------------------------- /GettingStarted.tex: -------------------------------------------------------------------------------- 1 | \pdfminorversion=4 2 | \documentclass[opener-c,labs,black,nociteref]{HJnewsiambook} 3 | 4 | % See command.tex for all package imports, environments, 5 | % and special commands. 6 | \input{command} 7 | 8 | \begin{document} % ============================================================ 9 | 10 | \newif\ifbyu % Compile for BYU-specific document 11 | \newif\ifwindows % Compile for Windows document 12 | \newif\ifbootcamp % Compile for Boot Camp (not Summer Labs) 13 | % Note: there are two main differences between Boot Camp 14 | % material and Summer Labs material. Boot Camp references 15 | % Volume1 and Volume2 and goes over how to set up their 16 | % GitHub repositories. Summer Labs references Summer Lab 17 | % materials and does not go over GitHub. 18 | 19 | \byutrue 20 | % \byufalse % UNCOMMENT to create public document 21 | % ALWAYS SET \bootcamptrue WHEN \byufalse IS TOGGLED! 22 | 23 | \bootcamptrue 24 | % \bootcampfalse % UNCOMMENT to create SummerLabs document 25 | 26 | \windowstrue 27 | % \windowsfalse % UNCOMMENT to create Mac document 28 | 29 | % This will generate a BYU-Bootcamp-Windows document 30 | \subimport{./Appendices/Setup/}{SetupStudent} 31 | 32 | \windowsfalse 33 | % This will generate a BYU-Bootcamp-Mac document 34 | \subimport{./Appendices/Setup/}{SetupStudent} 35 | 36 | 37 | \begin{appendices} 38 | \subimport{./Appendices/GoogleColab/}{GoogleColab} 39 | \end{appendices} 40 | 41 | \end{document} 42 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | LATEX = latexmk -pdf -g -outdir=docs 2 | RM = rm -rfv 3 | 4 | %.pdf: %.tex ./%/*/*.tex references.bib 5 | $(LATEX) $< 6 | 7 | all: PythonEssentials.pdf DataScienceEssentials.pdf Volume1.pdf Volume2.pdf Volume3.pdf Volume4.pdf GettingStarted.pdf 8 | 9 | GettingStarted.pdf: GettingStarted.tex Appendices/Setup/SetupStudent.tex 10 | $(LATEX) $< 11 | 12 | clean: 13 | bash .clean.sh 14 | -------------------------------------------------------------------------------- /PythonEssentials.tex: -------------------------------------------------------------------------------- 1 | \pdfminorversion=4 2 | \documentclass[opener-c,labs,black,nociteref]{HJnewsiambook} 3 | 4 | % See command.tex for all package imports, environments, and special commands. 5 | \input{command} 6 | 7 | \makeindex 8 | \title{Python Essentials} 9 | \author{Jeffrey Humpherys \& Tyler J.~Jarvis, managing editors} 10 | 11 | \begin{document} % ============================================================ 12 | 13 | \thispagestyle{empty} % Book cover and Front matter --------------------------- 14 | \maketitle 15 | \thispagestyle{empty} 16 | \frontmatter 17 | 18 | \include{contributors} 19 | 20 | \begin{thepreface} % Preface -------------------------------------------------- 21 | 22 | This lab manual is designed to accompany the textbook \emph{Foundations of Applied Mathematics} by Humpherys, Jarvis and Evans. 23 | This manual begins with an introduction to Python \cite{vanrossum2010python} from scratch, which only requires a basic understanding of general programming concepts (variables, functions, etc.). 24 | Later labs introduce several Python packages that are essential for mathematical and scientific computing in Python. 25 | 26 | \vfill 27 | \copyright{This work is licensed under the Creative Commons Attribution 3.0 United States 28 | License. You may copy, distribute, and display this copyrighted work only if you give 29 | credit to Dr.~J.~Humpherys. All derivative works must include an attribution to Dr.~J.~Humpherys as the owner of this work as well as the web address to 30 | \\\centerline{\url{https://github.com/Foundations-of-Applied-Mathematics/Labs}}\\as the original source of this work. 31 | \\To view a copy of the Creative Commons Attribution 3.0 License, visit 32 | \\\centerline{\url{http://creativecommons.org/licenses/by/3.0/us/}} or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.} 33 | 34 | \vfill 35 | \centering\includegraphics[height=1.2cm]{by.pdf} 36 | \vfill 37 | \end{thepreface} 38 | 39 | \setcounter{tocdepth}{1} 40 | \tableofcontents 41 | 42 | \mainmatter % LABS ============================================================ 43 | 44 | \part{Labs} 45 | \subimport{./PythonEssentials/PythonIntro/}{PythonIntro} 46 | \subimport{./PythonEssentials/StandardLibrary/}{StandardLibrary} 47 | \subimport{./PythonEssentials/NumpyIntro/}{NumpyIntro} 48 | \subimport{./PythonEssentials/ObjectOriented/}{ObjectOriented} 49 | \subimport{./PythonEssentials/MatplotlibIntro/}{MatplotlibIntro} 50 | \subimport{./PythonEssentials/Exceptions_FileIO/}{Exceptions_FileIO} 51 | \subimport{./PythonEssentials/UnitTesting/}{UnitTesting} 52 | \subimport{./PythonEssentials/DataVisualization/}{DataVisualization} 53 | \subimport{./PythonEssentials/Profiling/}{Profiling} 54 | \subimport{./PythonEssentials/SympyIntro/}{SympyIntro} 55 | \subimport{./PythonEssentials/AdvancedNumpy/}{AdvancedNumpy} 56 | 57 | 58 | \part{Appendices} % Relevant Appendices --------------------------------------- 59 | \begin{appendices} 60 | \subimport{./Appendices/NumpyVisualGuide/}{NumpyVisualGuide} 61 | \subimport{./Appendices/MatplotlibCustomization/}{MatplotlibCustomization} 62 | % \subimport{./Appendices/SklearnGuide/}{SklearnGuide} 63 | \end{appendices} 64 | 65 | % Bibliography 66 | \bibliographystyle{alpha} 67 | \bibliography{references} 68 | 69 | \end{document} 70 | -------------------------------------------------------------------------------- /PythonEssentials/AdvancedNumpy/figures/broadcasting_mismatch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/AdvancedNumpy/figures/broadcasting_mismatch.png -------------------------------------------------------------------------------- /PythonEssentials/AdvancedNumpy/figures/broadcasting_outer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/AdvancedNumpy/figures/broadcasting_outer.png -------------------------------------------------------------------------------- /PythonEssentials/AdvancedNumpy/figures/broadcasting_scalar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/AdvancedNumpy/figures/broadcasting_scalar.png -------------------------------------------------------------------------------- /PythonEssentials/AdvancedNumpy/figures/broadcasting_vector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/AdvancedNumpy/figures/broadcasting_vector.png -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/alpha1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/alpha1.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/alpha2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/alpha2.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/bar_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/bar_1.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/bar_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/bar_2.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/chartjunk1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/chartjunk1.jpg -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/chartjunk_improved.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/chartjunk_improved.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/chebyshev_bad.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/chebyshev_bad.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/chebyshev_good.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/chebyshev_good.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/contour_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/contour_1.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/contour_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/contour_2.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/earthquake.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/earthquake.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/heatmap_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/heatmap_1.png -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/heatmap_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/heatmap_2.png -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/hexbin_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/hexbin_1.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/hexbin_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/hexbin_2.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/hist1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/hist1.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/hist2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/hist2.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/piebar1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/piebar1.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/piebar2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/piebar2.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/piebar3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/piebar3.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/piechart1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/piechart1.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/piechart2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/piechart2.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/piechart3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/piechart3.pdf -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/plannedparenthood.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/plannedparenthood.jpeg -------------------------------------------------------------------------------- /PythonEssentials/DataVisualization/figures/planparent_corrected.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/DataVisualization/figures/planparent_corrected.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/basic1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/basic1.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/basic2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/basic2.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/contour.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/contour.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/contourf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/contourf.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/custom1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/custom1.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/custom2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/custom2.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/discontinuousProblem.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/discontinuousProblem.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/heatmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/heatmap.png -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/histogram.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/histogram.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/layout_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/layout_1.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/layout_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/layout_2.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/layout_3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/layout_3.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/layout_4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/layout_4.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/layout_5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/layout_5.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/layout_6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/layout_6.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/meshplot_fig.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/meshplot_fig.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/scatterplot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/scatterplot.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/subplots_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/subplots_1.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/subplots_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/subplots_2.pdf -------------------------------------------------------------------------------- /PythonEssentials/MatplotlibIntro/figures/surface_plot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/MatplotlibIntro/figures/surface_plot.pdf -------------------------------------------------------------------------------- /PythonEssentials/SympyIntro/figures/pretty_printing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/SympyIntro/figures/pretty_printing.png -------------------------------------------------------------------------------- /PythonEssentials/UnitTesting/figures/set1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/UnitTesting/figures/set1.jpg -------------------------------------------------------------------------------- /PythonEssentials/UnitTesting/figures/set2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/UnitTesting/figures/set2.jpg -------------------------------------------------------------------------------- /PythonEssentials/UnitTesting/figures/set3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/UnitTesting/figures/set3.jpg -------------------------------------------------------------------------------- /PythonEssentials/UnitTesting/figures/set4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/UnitTesting/figures/set4.jpg -------------------------------------------------------------------------------- /PythonEssentials/UnitTesting/figures/set5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/UnitTesting/figures/set5.jpg -------------------------------------------------------------------------------- /PythonEssentials/UnitTesting/figures/set6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/UnitTesting/figures/set6.jpg -------------------------------------------------------------------------------- /PythonEssentials/UnitTesting/figures/set_game.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/PythonEssentials/UnitTesting/figures/set_game.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## About 2 | 3 | _Foundations of Applied Mathematics_ is a series of four textbooks developed for Brigham Young University’s Applied and Computational Mathematics degree program for beginning graduate and advanced undergraduate students. 4 | These are as follows: 5 | - [_Volume 1: Mathematical Analysis._](https://my.siam.org/Store/Product/viewproduct/?ProductId=28736189) 6 | - [_Volume 2: Algorithms, Approximation, and Optimization._](https://my.siam.org/Store/Product/viewproduct/?ProductId=31503574) 7 | - _Volume 3: Modeling with Uncertainty and Data._ 8 | - _Volume 4: Modeling with Dynamics and Control._ 9 | 10 | The textbooks are being published by [the Society for Industrial and Applied Mathematics](http://bookstore.siam.org). 11 | [Volume 1](https://my.siam.org/Store/Product/viewproduct/?ProductId=28736189) and [Volume 2](https://my.siam.org/Store/Product/viewproduct/?ProductId=31503574) are available now, and the remaining volumes are in development. 12 | 13 | This repository contains a collection of Python labs that go in tandem with the textbooks. 14 | These expose students to applications and numerical computation and reinforce the theoretical ideas taught in the text. 15 | The text and labs combine to make students technically proficient and to answer the age-old question, "When am I going to use this?" 16 | 17 | The _Python Essentials_ labs introduce Python and its scientific computing tools. 18 | The _Data Science Essentials_ labs introduce common tools for gathering, cleaning, organizing, and presenting data in Python. 19 | The _Volume 1_ and _Volume 2_ labs are also currently available; labs for the other volumes are forthcoming. 20 | 21 | Visit [foundations-of-applied-mathematics.github.io/](http://foundations-of-applied-mathematics.github.io) or the [releases page](https://github.com/Foundations-of-Applied-Mathematics/Labs/releases) to download the lab manual PDFs directly. 22 | 23 | ## Build Instructions 24 | 25 | If you would rather build the PDFs locally, [fork this repository and clone your fork](https://guides.github.com/activities/forking/). 26 | Each volume can then be built separately using the LaTeX files listed below. 27 | - Python Essentials: `PythonEssentials.tex` 28 | - Data Science Essentials: `DataScienceEssentials.tex` 29 | - Volume 1, Mathematical Analysis: `Volume1.tex` 30 | - Volume 2, Algorithm Design and Optimization: `Volume2.tex` 31 | - Volume 3, Modeling with Uncertainty and Data: `Volume3.tex` 32 | - Volume 4, Modeling with Dynamics and Control: `Volume4.tex` 33 | 34 | Compile the files using TeXShop or a similar program, or via the command line: 35 | ```bash 36 | # Create docs/Volume1.pdf with latexmk (see Makefile). 37 | $ make Volume1.pdf 38 | 39 | # Equivalently, use latexmk directly. 40 | $ latexmk -pdf -outdir=docs Volume1.tex 41 | ``` 42 | These commands create a PDF in the `docs/` folder called, for example, `docs/Volume1.pdf`. 43 | 44 | ## Contributing 45 | 46 | To report bugs in the provided materials, typos or inaccuracies in the labs, or any other problems, [submit an issue on Github](https://github.com/Foundations-of-Applied-Mathematics/Labs/issues/new). 47 | Please contact us at [acme@mathematics.byu.edu](mailto:acme@mathematics.byu.edu) if you have specific questions or feedback, or if you would like to be more involved with developing the labs. 48 | 49 | ## Authors 50 | 51 | #### Managing Editors 52 | 53 | Jeffrey Humpherys and Tyler J. Jarvis 54 | Department of Mathematics 55 | Brigham Young University 56 | Email: [acme@mathematics.byu.edu](mailto:acme@mathematics.byu.edu) 57 | 58 | #### Faculty Contributors 59 | 60 | - E. Evans, Brigham Young University 61 | - R. Evans, University of Chicago 62 | - J. Grout, Drake University 63 | - J. Whitehead, Brigham Young University 64 | 65 | #### Editors 66 | 67 | R. Jones, S. McQuarrie, M. Cook, A. Zaitzeff, A. Henriksen, R. Murray 68 | 69 | #### Student Contributors 70 | 71 | J. Adams, J. Bejarano, Z. Boyd, M. Brown, A. Carr, T. Christensen, M. Cook, 72 | B. Ehlert, M. Fabiano, A. Frandsen, K. Finlinson, J. Fisher, R. Fuhriman, 73 | S. Giddens, C. Gigena, C. Glover, M. Graham, F. Glines, M. Goodwin, R. Grout, 74 | J. Hendricks, A. Henriksen, I. Henriksen, M. Hepner, C. Hettinger, S. Horst, 75 | K. Jacobson, R. Jones, J. Leete, J. Lytle, R. McMurray, S. McQuarrie, 76 | D. Miller, J. Morrise, M. Morrise, A. Morrow, R. Murray, J. Nelson, 77 | E. Parkinson, M. Probst, M. Proudfoot, D. Reber, C. Robertson, M. Russell, 78 | R. Sandberg, C. Sawyer, J. Stewart, S. Suggs, A. Tate, T. Thompson, 79 | M. Victors, J. Webb, R. Webb, J. West, and A. Zaitzeff. 80 | 81 | ## License 82 | 83 | This work is licensed under the Creative Commons Attribution 3.0 United States License. 84 | To view a copy of this license please visit [http://creativecommons.org/licenses/by/3.0/us/](http://creativecommons.org/licenses/by/3.0/us/). 85 | 86 | This project is funded in part by the National Science Foundation, grant no. TUES Phase II DUE-1323785. 87 | -------------------------------------------------------------------------------- /Volume1.tex: -------------------------------------------------------------------------------- 1 | \pdfminorversion=4 2 | \documentclass[opener-c,labs,blue,nociteref]{HJnewsiambook} 3 | 4 | % See command.tex for all package imports, environments, and special commands. 5 | \input{command} 6 | 7 | \makeindex 8 | 9 | \title{Volume 1\\ Mathematical Analysis} 10 | \author{Jeffrey Humpherys \& Tyler J.~Jarvis, managing editors} 11 | 12 | \begin{document} % ============================================================ 13 | 14 | \newif\ifbyu 15 | \byutrue 16 | \byufalse % Create Public Labs; Comment for BYU Labs 17 | 18 | \thispagestyle{empty} % Book cover and Front matter --------------------------- 19 | \maketitle 20 | \thispagestyle{empty} 21 | \frontmatter 22 | 23 | \include{contributors} 24 | 25 | \begin{thepreface} % Preface -------------------------------------------------- 26 | 27 | This lab manual is designed to accompany the textbook \emph{Foundations of Applied Mathematics Volume 1: Mathematical Analysis} by Humpherys, Jarvis and Evans. 28 | The labs focus mainly on important numerical linear algebra algorithms, with applications to images, networks, and data science. 29 | The reader should be familiar with Python \cite{vanrossum2010python} and its NumPy \cite{oliphant2006guide,ascher2001numerical,oliphant2007python} and Matplotlib \cite{Hunter:2007} packages before attempting these labs. 30 | See the Python Essentials manual for introductions to these topics. 31 | 32 | \vfill 33 | \copyright{This work is licensed under the Creative Commons Attribution 3.0 United States License. 34 | You may copy, distribute, and display this copyrighted work only if you give credit to Dr.~J.~Humpherys. 35 | All derivative works must include an attribution to Dr.~J.~Humpherys as the owner of this work as well as the web address to 36 | \\ 37 | \centerline{\url{https://github.com/Foundations-of-Applied-Mathematics/Labs}} 38 | \\ 39 | as the original source of this work. 40 | \\ 41 | To view a copy of the Creative Commons Attribution 3.0 License, visit 42 | \\ 43 | \centerline{\url{http://creativecommons.org/licenses/by/3.0/us/}} 44 | or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.} 45 | 46 | \vfill 47 | \centering\includegraphics[height=1.2cm]{by.pdf} 48 | \vfill 49 | \end{thepreface} 50 | 51 | \setcounter{tocdepth}{1} 52 | \tableofcontents 53 | 54 | \mainmatter % LABS ============================================================ 55 | 56 | \ifbyu 57 | 58 | \part{Labs} % BYU Volume 1 Labs --------------------------------------------------- 59 | \subimport{./Volume1/GitHubIntro/}{GitHubIntro} 60 | \subimport{./DataScienceEssentials/UnixShell1/}{UnixShell1} 61 | \subimport{./PythonEssentials/StandardLibrary/}{StandardLibrary} 62 | \subimport{./PythonEssentials/ObjectOriented/}{ObjectOriented} 63 | \subimport{./PythonEssentials/Exceptions_FileIO/}{Exceptions_FileIO} 64 | \subimport{./Volume1/LinearTransformations/}{LinearTransformations} 65 | \subimport{./Volume1/LinearSystems/}{LinearSystems} 66 | \subimport{./Volume1/QR_Decomposition/}{QR_Decomposition} 67 | \subimport{./Volume1/LeastSquares_Eigenvalues/}{LeastSquares_Eigenvalues} 68 | \subimport{./Volume1/ImageSegmentation/}{ImageSegmentation} 69 | \subimport{./Volume1/SVD_ImageCompression/}{SVD_ImageCompression} 70 | \subimport{./Volume1/FacialRecognition/}{FacialRecognition} 71 | \subimport{./DataScienceEssentials/SQL1/}{SQL1} 72 | 73 | \subimport{./DataScienceEssentials/SQL2/}{SQL2} 74 | \subimport{./PythonEssentials/SympyIntro/}{SympyIntro} 75 | \subimport{./Volume1/Differentiation/}{Differentiation} 76 | % \subimport{./Volume1/NewtonsMethod/}{NewtonsMethod} 77 | \subimport{./Volume1/Conditioning_Stability/}{Conditioning_Stability} 78 | \subimport{./Volume1/MonteCarloIntegration/}{MonteCarloIntegration} 79 | \subimport{./Volume1/ComplexFunctions/}{ComplexFunctions} 80 | \subimport{./Volume1/PageRank/}{PageRank} 81 | \subimport{./PythonEssentials/Profiling/}{Profiling} 82 | \subimport{./PythonEssentials/DataVisualization/}{DataVisualization} 83 | \subimport{./DataScienceEssentials/UnixShell2/}{UnixShell2} 84 | \subimport{./Volume1/IterativeSolvers/}{IterativeSolvers} 85 | 86 | \else 87 | 88 | \part{Labs} % Public Volume 1 Labs --------------------------------------------------- 89 | \subimport{./Volume1/GitHubIntro/}{GitHubIntro} 90 | \subimport{./Volume1/LinearTransformations/}{LinearTransformations} 91 | \subimport{./Volume1/LinearSystems/}{LinearSystems} 92 | \subimport{./Volume1/QR_Decomposition/}{QR_Decomposition} 93 | \subimport{./Volume1/LeastSquares_Eigenvalues/}{LeastSquares_Eigenvalues} 94 | \subimport{./Volume1/ImageSegmentation/}{ImageSegmentation} 95 | \subimport{./Volume1/SVD_ImageCompression/}{SVD_ImageCompression} 96 | \subimport{./Volume1/FacialRecognition/}{FacialRecognition} 97 | 98 | \subimport{./Volume1/Differentiation/}{Differentiation} 99 | % \subimport{./Volume1/NewtonsMethod/}{NewtonsMethod} 100 | \subimport{./Volume1/Conditioning_Stability/}{Conditioning_Stability} 101 | \subimport{./Volume1/MonteCarloIntegration/}{MonteCarloIntegration} 102 | \subimport{./Volume1/ComplexFunctions/}{ComplexFunctions} 103 | \subimport{./Volume1/PageRank/}{PageRank} 104 | \subimport{./Volume1/IterativeSolvers/}{IterativeSolvers} 105 | \subimport{./Volume1/DrazinInverse/}{DrazinInverse} 106 | \subimport{./Volume1/Arnoldi/}{Arnoldi} 107 | \subimport{./Volume1/GMRES/}{GMRES} 108 | 109 | \fi 110 | 111 | \part{Appendices} % Relevant Appendices --------------------------------------- 112 | \begin{appendices} 113 | \subimport{./Appendices/NumpyVisualGuide/}{NumpyVisualGuide} 114 | \subimport{./Appendices/MatplotlibCustomization/}{MatplotlibCustomization} 115 | % \subimport{./Appendices/SklearnGuide/}{SklearnGuide} 116 | \end{appendices} 117 | 118 | \bibliographystyle{alpha} 119 | \bibliography{references} 120 | 121 | \end{document} 122 | -------------------------------------------------------------------------------- /Volume1/Arnoldi/figures/rand_eigs_conv.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/Arnoldi/figures/rand_eigs_conv.pdf -------------------------------------------------------------------------------- /Volume1/Arnoldi/figures/rand_vals_conv.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/Arnoldi/figures/rand_vals_conv.pdf -------------------------------------------------------------------------------- /Volume1/ComplexFunctions/figures/discontinuity_angle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/ComplexFunctions/figures/discontinuity_angle.png -------------------------------------------------------------------------------- /Volume1/ComplexFunctions/figures/discontinuity_magnitude.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/ComplexFunctions/figures/discontinuity_magnitude.png -------------------------------------------------------------------------------- /Volume1/ComplexFunctions/figures/identity_angle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/ComplexFunctions/figures/identity_angle.png -------------------------------------------------------------------------------- /Volume1/ComplexFunctions/figures/identity_magnitude.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/ComplexFunctions/figures/identity_magnitude.png -------------------------------------------------------------------------------- /Volume1/ComplexFunctions/figures/poles_angle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/ComplexFunctions/figures/poles_angle.png -------------------------------------------------------------------------------- /Volume1/ComplexFunctions/figures/zeros_angle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/ComplexFunctions/figures/zeros_angle.png -------------------------------------------------------------------------------- /Volume1/ComplexFunctions/figures/zeros_magnitude.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/ComplexFunctions/figures/zeros_magnitude.png -------------------------------------------------------------------------------- /Volume1/Conditioning_Stability/figures/eigenvalue_conditioning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/Conditioning_Stability/figures/eigenvalue_conditioning.png -------------------------------------------------------------------------------- /Volume1/Conditioning_Stability/figures/perturbed_poly.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/Conditioning_Stability/figures/perturbed_poly.pdf -------------------------------------------------------------------------------- /Volume1/Conditioning_Stability/figures/perturbed_roots.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/Conditioning_Stability/figures/perturbed_roots.pdf -------------------------------------------------------------------------------- /Volume1/Conditioning_Stability/figures/wilkinson_prob_solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/Conditioning_Stability/figures/wilkinson_prob_solution.pdf -------------------------------------------------------------------------------- /Volume1/Differentiation/figures/efficiency.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/Differentiation/figures/efficiency.pdf -------------------------------------------------------------------------------- /Volume1/Differentiation/figures/error_plot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/Differentiation/figures/error_plot.pdf -------------------------------------------------------------------------------- /Volume1/Differentiation/figures/plane_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/Differentiation/figures/plane_diagram.png -------------------------------------------------------------------------------- /Volume1/DrazinInverse/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/DrazinInverse/network.png -------------------------------------------------------------------------------- /Volume1/FacialRecognition/figures/differenceFace0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/FacialRecognition/figures/differenceFace0.png -------------------------------------------------------------------------------- /Volume1/FacialRecognition/figures/eigenface0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/FacialRecognition/figures/eigenface0.png -------------------------------------------------------------------------------- /Volume1/FacialRecognition/figures/eigenface49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/FacialRecognition/figures/eigenface49.png -------------------------------------------------------------------------------- /Volume1/FacialRecognition/figures/eigenface99.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/FacialRecognition/figures/eigenface99.png -------------------------------------------------------------------------------- /Volume1/FacialRecognition/figures/meanFace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/FacialRecognition/figures/meanFace.png -------------------------------------------------------------------------------- /Volume1/FacialRecognition/figures/originalFace0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/FacialRecognition/figures/originalFace0.png -------------------------------------------------------------------------------- /Volume1/FacialRecognition/figures/rebuiltEighth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/FacialRecognition/figures/rebuiltEighth.png -------------------------------------------------------------------------------- /Volume1/FacialRecognition/figures/rebuiltHalf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/FacialRecognition/figures/rebuiltHalf.png -------------------------------------------------------------------------------- /Volume1/FacialRecognition/figures/rebuiltThirtySecond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/FacialRecognition/figures/rebuiltThirtySecond.png -------------------------------------------------------------------------------- /Volume1/GMRES/figures/gmres_convergence.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/GMRES/figures/gmres_convergence.pdf -------------------------------------------------------------------------------- /Volume1/GMRES/figures/scatter_gmres.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/GMRES/figures/scatter_gmres.pdf -------------------------------------------------------------------------------- /Volume1/ImageSegmentation/figures/dream.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/ImageSegmentation/figures/dream.pdf -------------------------------------------------------------------------------- /Volume1/ImageSegmentation/figures/dream_neg.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/ImageSegmentation/figures/dream_neg.pdf -------------------------------------------------------------------------------- /Volume1/ImageSegmentation/figures/dream_pos.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/ImageSegmentation/figures/dream_pos.pdf -------------------------------------------------------------------------------- /Volume1/IterativeSolvers/figures/jacobi_convergence.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/IterativeSolvers/figures/jacobi_convergence.pdf -------------------------------------------------------------------------------- /Volume1/LeastSquares_Eigenvalues/figures/circle_fit_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LeastSquares_Eigenvalues/figures/circle_fit_example.pdf -------------------------------------------------------------------------------- /Volume1/LeastSquares_Eigenvalues/figures/line_fit_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LeastSquares_Eigenvalues/figures/line_fit_example.pdf -------------------------------------------------------------------------------- /Volume1/LeastSquares_Eigenvalues/figures/various_norm_ellipse.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LeastSquares_Eigenvalues/figures/various_norm_ellipse.pdf -------------------------------------------------------------------------------- /Volume1/LeastSquares_Eigenvalues/figures/weighted_least_squares.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LeastSquares_Eigenvalues/figures/weighted_least_squares.pdf -------------------------------------------------------------------------------- /Volume1/LinearSystems/figures/spydemo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearSystems/figures/spydemo.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/CompositionHorse.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/CompositionHorse.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/OriginalHorse.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/OriginalHorse.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/ReflectionHorse.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/ReflectionHorse.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/RotationHorse.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/RotationHorse.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/ShearHorse.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/ShearHorse.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/SolarSystem.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/SolarSystem.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/StretchHorse.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/StretchHorse.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/TranslationHorse.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/TranslationHorse.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/loglogDemoBad.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/loglogDemoBad.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/loglogDemoGood.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/loglogDemoGood.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/matrixMatrixMultiplication.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/matrixMatrixMultiplication.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/matrixVectorMultiplication.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/matrixVectorMultiplication.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/time_random_matrix1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/time_random_matrix1.pdf -------------------------------------------------------------------------------- /Volume1/LinearTransformations/figures/time_random_matrix2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/LinearTransformations/figures/time_random_matrix2.pdf -------------------------------------------------------------------------------- /Volume1/MonteCarloIntegration/figures/mc_circle_0500.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/MonteCarloIntegration/figures/mc_circle_0500.pdf -------------------------------------------------------------------------------- /Volume1/MonteCarloIntegration/figures/mc_circle_2000.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/MonteCarloIntegration/figures/mc_circle_2000.pdf -------------------------------------------------------------------------------- /Volume1/MonteCarloIntegration/figures/mc_circle_8000.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/MonteCarloIntegration/figures/mc_circle_8000.pdf -------------------------------------------------------------------------------- /Volume1/MonteCarloIntegration/figures/mc_convergence.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/MonteCarloIntegration/figures/mc_convergence.pdf -------------------------------------------------------------------------------- /Volume1/SVD_ImageCompression/figures/full_transformation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/SVD_ImageCompression/figures/full_transformation.pdf -------------------------------------------------------------------------------- /Volume1/SVD_ImageCompression/figures/hubble_gray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/SVD_ImageCompression/figures/hubble_gray.jpg -------------------------------------------------------------------------------- /Volume1/SVD_ImageCompression/figures/hubble_svals.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/SVD_ImageCompression/figures/hubble_svals.pdf -------------------------------------------------------------------------------- /Volume1/SVD_ImageCompression/figures/rank120.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/SVD_ImageCompression/figures/rank120.pdf -------------------------------------------------------------------------------- /Volume1/SVD_ImageCompression/figures/rank2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/SVD_ImageCompression/figures/rank2.pdf -------------------------------------------------------------------------------- /Volume1/SVD_ImageCompression/figures/rank20.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/SVD_ImageCompression/figures/rank20.pdf -------------------------------------------------------------------------------- /Volume1/SVD_ImageCompression/figures/svcircle.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/SVD_ImageCompression/figures/svcircle.pdf -------------------------------------------------------------------------------- /Volume1/SVD_ImageCompression/figures/unit_circle.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/SVD_ImageCompression/figures/unit_circle.pdf -------------------------------------------------------------------------------- /Volume1/SVD_ImageCompression/figures/vcircle.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume1/SVD_ImageCompression/figures/vcircle.pdf -------------------------------------------------------------------------------- /Volume2.tex: -------------------------------------------------------------------------------- 1 | \pdfminorversion=4 2 | \documentclass[opener-c,labs,red,nociteref]{HJnewsiambook} 3 | 4 | % See command.tex for all package imports, environments, and special commands. 5 | \input{command} 6 | 7 | \makeindex 8 | 9 | \title{Volume 2\\ Algorithm Design and Optimization} 10 | \author{Jeffrey Humpherys \& Tyler J.~Jarvis, managing editors} 11 | 12 | \begin{document} % ============================================================ 13 | 14 | \newif\ifbyu 15 | \byutrue 16 | \byufalse % Create Public Labs; Comment for BYU Labs 17 | 18 | \thispagestyle{empty} % Book cover and Front matter --------------------------- 19 | \maketitle 20 | \thispagestyle{empty} 21 | \frontmatter 22 | 23 | \include{contributors} 24 | 25 | \begin{thepreface} % Preface -------------------------------------------------- 26 | 27 | This lab manual is designed to accompany the textbooks \emph{Foundations of Applied Mathematics Volume 2: Algorithms, Approximation, and Optimization} by Humpherys and Jarvis. 28 | The labs focus mainly on data structures, signal transforms, and numerical optimization, including applications to data science, signal processing, and machine learning. 29 | The reader should be familiar with Python \cite{vanrossum2010python} and its NumPy \cite{oliphant2006guide,ascher2001numerical,oliphant2007python} and Matplotlib \cite{Hunter:2007} packages before attempting these labs. 30 | See the Python Essentials manual for introductions to these topics. 31 | 32 | \vfill 33 | \copyright{This work is licensed under the Creative Commons Attribution 3.0 United States License. 34 | You may copy, distribute, and display this copyrighted work only if you give credit to Dr.~J.~Humpherys. 35 | All derivative works must include an attribution to Dr.~J.~Humpherys as the owner of this work as well as the web address to 36 | \\ 37 | \centerline{\url{https://github.com/Foundations-of-Applied-Mathematics/Labs}} 38 | \\ 39 | as the original source of this work. 40 | \\ 41 | To view a copy of the Creative Commons Attribution 3.0 License, visit 42 | \\ 43 | \centerline{\url{http://creativecommons.org/licenses/by/3.0/us/}} 44 | or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.} 45 | 46 | \vfill 47 | \centering\includegraphics[height=1.2cm]{by.pdf} 48 | \vfill 49 | \end{thepreface} 50 | 51 | \setcounter{tocdepth}{1} 52 | \tableofcontents 53 | 54 | \mainmatter % LABS ============================================================ 55 | 56 | \ifbyu 57 | 58 | \part{Labs} % BYU Volume 2 Labs --------------------------------------------------- 59 | \subimport{./PythonEssentials/PythonIntro/}{PythonIntro} 60 | \subimport{./PythonEssentials/NumpyIntro/}{NumpyIntro} 61 | \subimport{./PythonEssentials/MatplotlibIntro/}{MatplotlibIntro} 62 | \subimport{./PythonEssentials/UnitTesting/}{UnitTesting} 63 | \subimport{./Volume2/BinaryTrees/}{BinaryTrees} 64 | \subimport{./Volume2/NearestNeighbor/}{NearestNeighbor} 65 | \subimport{./Volume2/BreadthFirstSearch/}{BreadthFirstSearch} 66 | \subimport{./Volume2/Dijkstra/}{Dijkstra} 67 | \subimport{./Volume2/MarkovChains/}{MarkovChains} 68 | \subimport{./Volume2/Sampling/}{Sampling} 69 | \subimport{./Volume2/FourierTransform/}{FourierTransform} 70 | \subimport{./Volume2/ConvolutionFiltering/}{ConvolutionFiltering} 71 | 72 | \subimport{./Volume2/Wavelets/}{Wavelets} 73 | \subimport{./Volume2/PolynomialInterpolation/}{PolynomialInterpolation} 74 | \subimport{./Volume2/GaussianQuadrature/}{GaussianQuadrature} 75 | \subimport{./Volume2/OneD_Optimization/}{OneD_Optimization} 76 | \subimport{./DataScienceEssentials/RegularExpressions/}{RegularExpressions} 77 | \subimport{./Volume2/GradientMethods/}{GradientMethods} 78 | \subimport{./Volume2/Simplex/}{Simplex} 79 | \subimport{./Volume2/Gymnasium/}{Gymnasium} 80 | \subimport{./Volume2/CVXPY_Intro/}{CVXPY_Intro} 81 | \subimport{./Volume2/NMF/}{NMF} 82 | \subimport{./Volume2/InteriorPoint_Linear/}{InteriorPoint_Linear} 83 | \subimport{./Volume2/DynamicProgramming/}{DynamicProgramming} 84 | \subimport{./Volume2/PolicyFunctionIteration/}{PolicyFunctionIteration} 85 | 86 | \else 87 | 88 | \part{Labs} % Public Volume 2 Labs --------------------------------------------------- 89 | \subimport{./Volume2/BinaryTrees/}{BinaryTrees} 90 | \subimport{./Volume2/NearestNeighbor/}{NearestNeighbor} 91 | \subimport{./Volume2/BreadthFirstSearch/}{BreadthFirstSearch} 92 | \subimport{./Volume2/Dijkstra/}{Dijkstra} 93 | \subimport{./Volume2/MarkovChains/}{MarkovChains} 94 | \subimport{./Volume2/Sampling/}{Sampling} 95 | \subimport{./Volume2/FourierTransform/}{FourierTransform} 96 | 97 | \subimport{./Volume2/ConvolutionFiltering/}{ConvolutionFiltering} 98 | \subimport{./Volume2/Wavelets/}{Wavelets} 99 | \subimport{./Volume2/PolynomialInterpolation/}{PolynomialInterpolation} 100 | \subimport{./Volume2/GaussianQuadrature/}{GaussianQuadrature} 101 | \subimport{./Volume2/OneD_Optimization/}{OneD_Optimization} 102 | \subimport{./Volume2/GradientMethods/}{GradientMethods} 103 | \subimport{./Volume2/Simplex/}{Simplex} 104 | \subimport{./Volume2/Gymnasium/}{Gymnasium} 105 | \subimport{./Volume2/CVXPY_Intro/}{CVXPY_Intro} 106 | \subimport{./Volume2/NMF/}{NMF} 107 | \subimport{./Volume2/InteriorPoint_Linear/}{InteriorPoint_Linear} 108 | \subimport{./Volume2/InteriorPoint_Quadratic/}{InteriorPoint_Quadratic} 109 | \subimport{./Volume2/DynamicProgramming/}{DynamicProgramming} 110 | \subimport{./Volume2/PolicyFunctionIteration/}{PolicyFunctionIteration} 111 | %\subimport{./Volume2/LinkedLists/}{LinkedLists} 112 | 113 | \fi 114 | 115 | \part{Appendices} 116 | \begin{appendices} 117 | \subimport{./Appendices/NumpyVisualGuide/}{NumpyVisualGuide} 118 | \subimport{./Appendices/MatplotlibCustomization/}{MatplotlibCustomization} 119 | % \subimport{./Appendices/SklearnGuide/}{SklearnGuide} 120 | \end{appendices} 121 | 122 | % Bibliography 123 | \bibliographystyle{alpha} 124 | \bibliography{references} 125 | 126 | \end{document} 127 | -------------------------------------------------------------------------------- /Volume2/DynamicProgramming/figures/diff_policies.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/DynamicProgramming/figures/diff_policies.pdf -------------------------------------------------------------------------------- /Volume2/FourierTransform/figures/dft_a.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/FourierTransform/figures/dft_a.pdf -------------------------------------------------------------------------------- /Volume2/FourierTransform/figures/dft_a_half.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/FourierTransform/figures/dft_a_half.pdf -------------------------------------------------------------------------------- /Volume2/FourierTransform/figures/dft_chord.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/FourierTransform/figures/dft_chord.pdf -------------------------------------------------------------------------------- /Volume2/FourierTransform/figures/dft_tada.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/FourierTransform/figures/dft_tada.pdf -------------------------------------------------------------------------------- /Volume2/FourierTransform/figures/fast_tada.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/FourierTransform/figures/fast_tada.pdf -------------------------------------------------------------------------------- /Volume2/FourierTransform/figures/notebook_audio.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/FourierTransform/figures/notebook_audio.pdf -------------------------------------------------------------------------------- /Volume2/FourierTransform/figures/tada.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/FourierTransform/figures/tada.pdf -------------------------------------------------------------------------------- /Volume2/GradientMethods/figures/linregression.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/GradientMethods/figures/linregression.pdf -------------------------------------------------------------------------------- /Volume2/GradientMethods/figures/logreg.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/GradientMethods/figures/logreg.pdf -------------------------------------------------------------------------------- /Volume2/GradientMethods/figures/steepVsConj.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/GradientMethods/figures/steepVsConj.pdf -------------------------------------------------------------------------------- /Volume2/GradientMethods/figures/steepest.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/GradientMethods/figures/steepest.pdf -------------------------------------------------------------------------------- /Volume2/Gymnasium/figures/acrobot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/Gymnasium/figures/acrobot.pdf -------------------------------------------------------------------------------- /Volume2/Gymnasium/figures/taxi.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/Gymnasium/figures/taxi.pdf -------------------------------------------------------------------------------- /Volume2/InteriorPoint_Linear/figures/interiorPath.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/InteriorPoint_Linear/figures/interiorPath.pdf -------------------------------------------------------------------------------- /Volume2/InteriorPoint_Linear/figures/leastAbsDev.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/InteriorPoint_Linear/figures/leastAbsDev.pdf -------------------------------------------------------------------------------- /Volume2/InteriorPoint_Quadratic/figures/frontier.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/InteriorPoint_Quadratic/figures/frontier.pdf -------------------------------------------------------------------------------- /Volume2/InteriorPoint_Quadratic/figures/tent.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/InteriorPoint_Quadratic/figures/tent.pdf -------------------------------------------------------------------------------- /Volume2/NMF/figures/building_basis_images.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/NMF/figures/building_basis_images.pdf -------------------------------------------------------------------------------- /Volume2/NMF/figures/building_images.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/NMF/figures/building_images.pdf -------------------------------------------------------------------------------- /Volume2/NMF/figures/facial_features.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/NMF/figures/facial_features.pdf -------------------------------------------------------------------------------- /Volume2/NearestNeighbor/figures/curse_k.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/NearestNeighbor/figures/curse_k.pdf -------------------------------------------------------------------------------- /Volume2/NearestNeighbor/figures/curse_m.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/NearestNeighbor/figures/curse_m.pdf -------------------------------------------------------------------------------- /Volume2/NearestNeighbor/figures/digit.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/NearestNeighbor/figures/digit.pdf -------------------------------------------------------------------------------- /Volume2/NearestNeighbor/figures/kdtnn_search1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/NearestNeighbor/figures/kdtnn_search1.pdf -------------------------------------------------------------------------------- /Volume2/NearestNeighbor/figures/kdtnn_search2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/NearestNeighbor/figures/kdtnn_search2.pdf -------------------------------------------------------------------------------- /Volume2/NearestNeighbor/figures/kdtnn_search3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/NearestNeighbor/figures/kdtnn_search3.pdf -------------------------------------------------------------------------------- /Volume2/NearestNeighbor/figures/partition1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/NearestNeighbor/figures/partition1.pdf -------------------------------------------------------------------------------- /Volume2/NearestNeighbor/figures/partition2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/NearestNeighbor/figures/partition2.pdf -------------------------------------------------------------------------------- /Volume2/NearestNeighbor/figures/partition3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/NearestNeighbor/figures/partition3.pdf -------------------------------------------------------------------------------- /Volume2/OneD_Optimization/figures/fractal_ex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/OneD_Optimization/figures/fractal_ex.png -------------------------------------------------------------------------------- /Volume2/OneD_Optimization/figures/fractal_hw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/OneD_Optimization/figures/fractal_hw.png -------------------------------------------------------------------------------- /Volume2/OneD_Optimization/figures/large_alpha.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/OneD_Optimization/figures/large_alpha.pdf -------------------------------------------------------------------------------- /Volume2/PolicyFunctionIteration/figures/4x4_image.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/PolicyFunctionIteration/figures/4x4_image.pdf -------------------------------------------------------------------------------- /Volume2/PolicyFunctionIteration/figures/8x8_image.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/PolicyFunctionIteration/figures/8x8_image.pdf -------------------------------------------------------------------------------- /Volume2/PolynomialInterpolation/figures/bad_interp1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/PolynomialInterpolation/figures/bad_interp1.pdf -------------------------------------------------------------------------------- /Volume2/PolynomialInterpolation/figures/bad_interp2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/PolynomialInterpolation/figures/bad_interp2.pdf -------------------------------------------------------------------------------- /Volume2/PolynomialInterpolation/figures/extrema.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/PolynomialInterpolation/figures/extrema.pdf -------------------------------------------------------------------------------- /Volume2/PolynomialInterpolation/figures/good_interp1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/PolynomialInterpolation/figures/good_interp1.pdf -------------------------------------------------------------------------------- /Volume2/PolynomialInterpolation/figures/good_interp2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/PolynomialInterpolation/figures/good_interp2.pdf -------------------------------------------------------------------------------- /Volume2/Simplex/figures/feasiblePolytope.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/Simplex/figures/feasiblePolytope.pdf -------------------------------------------------------------------------------- /Volume2/Wavelets/figures/compressed_finger(30comp).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/Wavelets/figures/compressed_finger(30comp).png -------------------------------------------------------------------------------- /Volume2/Wavelets/figures/compressed_finger(60comp).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/Wavelets/figures/compressed_finger(60comp).png -------------------------------------------------------------------------------- /Volume2/Wavelets/figures/dwt1D.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/Wavelets/figures/dwt1D.pdf -------------------------------------------------------------------------------- /Volume2/Wavelets/figures/mandrill1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/Wavelets/figures/mandrill1.png -------------------------------------------------------------------------------- /Volume2/Wavelets/figures/mandrill2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/Wavelets/figures/mandrill2.png -------------------------------------------------------------------------------- /Volume2/Wavelets/figures/mandrill3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/Wavelets/figures/mandrill3.png -------------------------------------------------------------------------------- /Volume2/Wavelets/figures/mandrill4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/Wavelets/figures/mandrill4.png -------------------------------------------------------------------------------- /Volume2/Wavelets/figures/uncompressed_finger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume2/Wavelets/figures/uncompressed_finger.png -------------------------------------------------------------------------------- /Volume3.tex: -------------------------------------------------------------------------------- 1 | \pdfminorversion=4 2 | \documentclass[opener-c,labs,yellow,nociteref]{HJnewsiambook} 3 | \newcommand{\given}{\!\mathrel{\big|}\!} 4 | 5 | % See command.tex for all package imports, environments, and special commands. 6 | \input{command} 7 | 8 | \makeindex 9 | 10 | \title{Volume 3\\ Modeling with Uncertainty and Data} 11 | \author{Jeffrey Humpherys \& Tyler J.~Jarvis, managing editors} 12 | 13 | \begin{document} % ============================================================ 14 | 15 | \newif\ifbyu 16 | \byutrue 17 | \byufalse % Create Public Labs; Comment for BYU Labs 18 | 19 | \thispagestyle{empty} % Book cover and Front matter --------------------------- 20 | \maketitle 21 | \thispagestyle{empty} 22 | \frontmatter 23 | 24 | \include{contributors} 25 | 26 | \begin{thepreface} % Preface -------------------------------------------------- 27 | 28 | This lab manual is designed to accompany the textbook \emph{Foundations of Applied Mathematics Volume 3: Modeling with Uncertainty and Data} by Humpherys and Jarvis. 29 | The labs present various aspects of important machine learning algorithms. 30 | The reader should be familiar with Python \cite{vanrossum2010python} and its NumPy \cite{oliphant2006guide,ascher2001numerical,oliphant2007python} and Matplotlib \cite{Hunter:2007} packages before attempting these labs. 31 | See the Python Essentials manual for introductions to these topics. 32 | 33 | \vfill 34 | \copyright{This work is licensed under the Creative Commons Attribution 3.0 United States License. 35 | You may copy, distribute, and display this copyrighted work only if you give credit to Dr.~J.~Humpherys. 36 | All derivative works must include an attribution to Dr.~J.~Humpherys as the owner of this work as well as the web address to 37 | \\ 38 | \centerline{\url{https://github.com/Foundations-of-Applied-Mathematics/Labs}} 39 | \\ 40 | as the original source of this work. 41 | \\ 42 | To view a copy of the Creative Commons Attribution 3.0 License, visit 43 | \\ 44 | \centerline{\url{http://creativecommons.org/licenses/by/3.0/us/}} 45 | or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.} 46 | 47 | \vfill 48 | \centering\includegraphics[height=1.2cm]{by.pdf} 49 | \vfill 50 | \end{thepreface} 51 | 52 | \setcounter{tocdepth}{1} 53 | \tableofcontents 54 | 55 | \mainmatter % LABS ============================================================ 56 | 57 | \ifbyu 58 | 59 | \part{Labs} % BYU Volume 3 Labs --------------------------------------------------- 60 | \subimport{./PythonEssentials/AdvancedNumpy/}{AdvancedNumpy} 61 | \subimport{./DataScienceEssentials/Pandas1/}{Pandas1} 62 | \subimport{./DataScienceEssentials/Pandas2/}{Pandas2} 63 | \subimport{./DataScienceEssentials/Pandas3/}{Pandas3} 64 | \subimport{./Volume3/InformationTheory/}{InformationTheory} 65 | \subimport{./DataScienceEssentials/Pandas4/}{Pandas4} 66 | \subimport{./Volume3/LSI_SkLearn/}{LSI-SkLearn} 67 | \subimport{./DataScienceEssentials/DataCleaning/}{DataCleaning} 68 | \subimport{./Volume3/RandomForest/}{RandomForest} 69 | \subimport{./Volume3/KMeans/}{KMeans} 70 | \subimport{./Volume3/LinearRegression/}{LinearRegression} 71 | \subimport{./DataScienceEssentials/Parallel_Intro/}{parallel1} 72 | \subimport{./Volume3/LogisticRegression/}{LogisticRegression} 73 | 74 | % \subimport{./Volume3/NaiveBayes/}{NaiveBayes} 75 | % \subimport{./DataScienceEssentials/Spark/}{spark} 76 | % \subimport{./DataScienceEssentials/MPI/}{mpi} 77 | % \subimport{./DataScienceEssentials/WebScraping/}{WebScraping} 78 | % % \subimport{./DataScienceEssentials/WebCrawling/}{WebCrawling} 79 | % \subimport{./Volume3/Metropolis/}{Metropolis} 80 | % \subimport{./Volume3/Gibbs_LDA/}{LDA} 81 | % \subimport{./Volume3/GMM/}{GMM} 82 | % \subimport{./Volume3/HMM/}{HMM} 83 | % \subimport{./Volume3/CDHMM/}{CDHMM} 84 | % \subimport{./Volume3/KalmanFilter/}{KalmanFilter} 85 | % \subimport{./Volume3/ARMA/}{ARMA} 86 | % \subimport{./Volume3/NMF_Recommender/}{NMF_Recommender} 87 | % \subimport{./Volume3/DeepLearningIntro/}{DeepLearningIntro} 88 | % \subimport{./Volume3/RNN/}{rnn} 89 | 90 | \else 91 | 92 | \part{Labs} % Public Volume 3 Labs --------------------------------------------------- 93 | \subimport{./Volume3/InformationTheory/}{InformationTheory} 94 | \subimport{./Volume3/LSI_SkLearn/}{LSI-SkLearn} 95 | \subimport{./Volume3/KMeans/}{KMeans} 96 | \subimport{./Volume3/RandomForest/}{RandomForest} 97 | \subimport{./Volume3/LinearRegression/}{LinearRegression} 98 | \subimport{./Volume3/LogisticRegression/}{LogisticRegression} 99 | \subimport{./Volume3/NaiveBayes/}{NaiveBayes} 100 | % \subimport{./Volume3/DataAugmentation/}{DataAugmentation} 101 | 102 | \subimport{./Volume3/Metropolis/}{Metropolis} 103 | \subimport{./Volume3/Gibbs_LDA/}{LDA} 104 | \subimport{./Volume3/GMM/}{GMM} 105 | \subimport{./Volume3/HMM/}{HMM} 106 | \subimport{./Volume3/CDHMM/}{CDHMM} 107 | \subimport{./Volume3/KalmanFilter/}{KalmanFilter} 108 | \subimport{./Volume3/ARMA/}{ARMA} 109 | \subimport{./Volume3/NMF_Recommender/}{NMF_Recommender} 110 | \subimport{./Volume3/DeepLearningIntro/}{DeepLearningIntro} 111 | \subimport{./Volume3/RNN/}{rnn} 112 | 113 | \fi 114 | 115 | \part{Appendices} 116 | \begin{appendices} 117 | \subimport{./Appendices/NumpyVisualGuide/}{NumpyVisualGuide} 118 | \subimport{./Appendices/MatplotlibCustomization/}{MatplotlibCustomization} 119 | % \subimport{./Appendices/SklearnGuide/}{SklearnGuide} 120 | \end{appendices} 121 | 122 | % bibliography 123 | \bibliographystyle{alpha} 124 | \bibliography{references} 125 | 126 | 127 | \end{document} 128 | -------------------------------------------------------------------------------- /Volume3/ARMA/figures/arma.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/ARMA/figures/arma.pdf -------------------------------------------------------------------------------- /Volume3/ARMA/figures/copper.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/ARMA/figures/copper.pdf -------------------------------------------------------------------------------- /Volume3/ARMA/figures/correlations.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/ARMA/figures/correlations.pdf -------------------------------------------------------------------------------- /Volume3/ARMA/figures/econ2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/ARMA/figures/econ2.pdf -------------------------------------------------------------------------------- /Volume3/ARMA/figures/manaus.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/ARMA/figures/manaus.pdf -------------------------------------------------------------------------------- /Volume3/ARMA/figures/naive.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/ARMA/figures/naive.pdf -------------------------------------------------------------------------------- /Volume3/ARMA/figures/sm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/ARMA/figures/sm.pdf -------------------------------------------------------------------------------- /Volume3/ARMA/figures/sunspot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/ARMA/figures/sunspot.pdf -------------------------------------------------------------------------------- /Volume3/CDHMM/figures/mixture.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/CDHMM/figures/mixture.pdf -------------------------------------------------------------------------------- /Volume3/CDHMM/figures/samples.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/CDHMM/figures/samples.pdf -------------------------------------------------------------------------------- /Volume3/DeepLearningIntro/figures/net1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/DeepLearningIntro/figures/net1.png -------------------------------------------------------------------------------- /Volume3/DeepLearningIntro/figures/net2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/DeepLearningIntro/figures/net2.png -------------------------------------------------------------------------------- /Volume3/DeepLearningIntro/figures/neural_net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/DeepLearningIntro/figures/neural_net.png -------------------------------------------------------------------------------- /Volume3/DeepLearningIntro/figures/panda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/DeepLearningIntro/figures/panda.png -------------------------------------------------------------------------------- /Volume3/DeepLearningIntro/figures/perturbed_updated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/DeepLearningIntro/figures/perturbed_updated.png -------------------------------------------------------------------------------- /Volume3/DeepLearningIntro/figures/tensor_board_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/DeepLearningIntro/figures/tensor_board_home.png -------------------------------------------------------------------------------- /Volume3/GMM/figures/gmm.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/GMM/figures/gmm.jpeg -------------------------------------------------------------------------------- /Volume3/GMM/figures/sum.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/GMM/figures/sum.jpeg -------------------------------------------------------------------------------- /Volume3/Gibbs_LDA/figures/mu_posterior.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Gibbs_LDA/figures/mu_posterior.pdf -------------------------------------------------------------------------------- /Volume3/Gibbs_LDA/figures/predictiveposterior.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Gibbs_LDA/figures/predictiveposterior.pdf -------------------------------------------------------------------------------- /Volume3/Gibbs_LDA/figures/sigma2_posterior.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Gibbs_LDA/figures/sigma2_posterior.pdf -------------------------------------------------------------------------------- /Volume3/InformationTheory/figures/wordle-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/InformationTheory/figures/wordle-example.png -------------------------------------------------------------------------------- /Volume3/KalmanFilter/figures/estimate_macro.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/KalmanFilter/figures/estimate_macro.pdf -------------------------------------------------------------------------------- /Volume3/KalmanFilter/figures/estimate_micro.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/KalmanFilter/figures/estimate_micro.pdf -------------------------------------------------------------------------------- /Volume3/KalmanFilter/figures/impact_macro.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/KalmanFilter/figures/impact_macro.pdf -------------------------------------------------------------------------------- /Volume3/KalmanFilter/figures/impact_micro.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/KalmanFilter/figures/impact_micro.pdf -------------------------------------------------------------------------------- /Volume3/KalmanFilter/figures/obs_evolution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/KalmanFilter/figures/obs_evolution.pdf -------------------------------------------------------------------------------- /Volume3/KalmanFilter/figures/origin_macro.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/KalmanFilter/figures/origin_macro.pdf -------------------------------------------------------------------------------- /Volume3/KalmanFilter/figures/origin_micro.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/KalmanFilter/figures/origin_micro.pdf -------------------------------------------------------------------------------- /Volume3/KalmanFilter/figures/states_evolution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/KalmanFilter/figures/states_evolution.pdf -------------------------------------------------------------------------------- /Volume3/LSI_SkLearn/figures/cancer.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/LSI_SkLearn/figures/cancer.pdf -------------------------------------------------------------------------------- /Volume3/LinearRegression/figures/cubic_polynomial.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/LinearRegression/figures/cubic_polynomial.pdf -------------------------------------------------------------------------------- /Volume3/LogisticRegression/figures/plot_iris.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/LogisticRegression/figures/plot_iris.pdf -------------------------------------------------------------------------------- /Volume3/LogisticRegression/figures/prob3_test.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/LogisticRegression/figures/prob3_test.pdf -------------------------------------------------------------------------------- /Volume3/LogisticRegression/figures/sigmoid.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/LogisticRegression/figures/sigmoid.pdf -------------------------------------------------------------------------------- /Volume3/Metropolis/figures/beta0_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Metropolis/figures/beta0_2.pdf -------------------------------------------------------------------------------- /Volume3/Metropolis/figures/beta0_2_logprobs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Metropolis/figures/beta0_2_logprobs.pdf -------------------------------------------------------------------------------- /Volume3/Metropolis/figures/beta0_4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Metropolis/figures/beta0_4.pdf -------------------------------------------------------------------------------- /Volume3/Metropolis/figures/beta0_4_logprobs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Metropolis/figures/beta0_4_logprobs.pdf -------------------------------------------------------------------------------- /Volume3/Metropolis/figures/beta1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Metropolis/figures/beta1.pdf -------------------------------------------------------------------------------- /Volume3/Metropolis/figures/beta1_logprobs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Metropolis/figures/beta1_logprobs.pdf -------------------------------------------------------------------------------- /Volume3/Metropolis/figures/initial_config.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Metropolis/figures/initial_config.pdf -------------------------------------------------------------------------------- /Volume3/Metropolis/figures/logprobs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Metropolis/figures/logprobs.pdf -------------------------------------------------------------------------------- /Volume3/Metropolis/figures/mu_kernel.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Metropolis/figures/mu_kernel.pdf -------------------------------------------------------------------------------- /Volume3/Metropolis/figures/mu_traces.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Metropolis/figures/mu_traces.pdf -------------------------------------------------------------------------------- /Volume3/Metropolis/figures/sig_kernel.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Metropolis/figures/sig_kernel.pdf -------------------------------------------------------------------------------- /Volume3/Metropolis/figures/sig_traces.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/Metropolis/figures/sig_traces.pdf -------------------------------------------------------------------------------- /Volume3/RandomForest/example_tree.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume3/RandomForest/example_tree.pdf -------------------------------------------------------------------------------- /Volume4.tex: -------------------------------------------------------------------------------- 1 | \pdfminorversion=4 2 | \documentclass[opener-c,labs,green,nociteref]{HJnewsiambook} 3 | 4 | % See command.tex for all package imports, environments, and special commands. 5 | \input{command} 6 | 7 | \makeindex 8 | \title{Volume 4\\ Modeling with Dynamics and Control} 9 | \author{Jeffrey Humpherys \& Tyler J.~Jarvis, managing editors} 10 | 11 | \begin{document} % ============================================================ 12 | 13 | \newif\ifbyu 14 | \byutrue 15 | \byufalse % Create Public Labs; Comment for BYU Labs 16 | 17 | \thispagestyle{empty} % Book cover and Front matter --------------------------- 18 | \maketitle 19 | \thispagestyle{empty} 20 | \frontmatter 21 | 22 | \include{contributors} 23 | 24 | \begin{thepreface} % Preface -------------------------------------------------- 25 | 26 | This lab manual is designed to accompany the textbook \emph{Foundations of Applied Mathematics Volume 4: Modeling with Dynamics and Control} by Humpherys, Jarvis and Whitehead. 27 | The labs focus on numerical methods for solving ordinary and partial differential equations, including applications to optimal control problems. 28 | The reader should be familiar with Python \cite{vanrossum2010python} and its NumPy \cite{oliphant2006guide,ascher2001numerical,oliphant2007python} and Matplotlib \cite{Hunter:2007} packages before attempting these labs. 29 | See the Python Essentials manual for introductions to these topics. 30 | 31 | \vfill 32 | \copyright{This work is licensed under the Creative Commons Attribution 3.0 United States License. 33 | You may copy, distribute, and display this copyrighted work only if you give credit to Dr.~J.~Humpherys. 34 | All derivative works must include an attribution to Dr.~J.~Humpherys as the owner of this work as well as the web address to 35 | \\ 36 | \centerline{\url{https://github.com/Foundations-of-Applied-Mathematics/Labs}} 37 | \\ 38 | as the original source of this work. 39 | \\ 40 | To view a copy of the Creative Commons Attribution 3.0 License, visit 41 | \\ 42 | \centerline{\url{http://creativecommons.org/licenses/by/3.0/us/}} 43 | or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.} 44 | 45 | \vfill 46 | \centering\includegraphics[height=1.2cm]{by.pdf} 47 | \vfill 48 | \end{thepreface} 49 | 50 | \setcounter{tocdepth}{1} 51 | \tableofcontents 52 | 53 | \mainmatter % LABS ============================================================ 54 | 55 | \ifbyu 56 | 57 | \part{Labs} % BYU Volume 4 Labs --------------------------------------------------- 58 | \subimport{./Volume4/Animation/}{Animation} 59 | \subimport{./Volume4/IVP_BVP_Intro/}{IVP_BVP_Intro} 60 | \subimport{./Volume4/SIR_Models/}{SIR_Models} 61 | \subimport{./Volume4/Numerical_IVP/}{Numerical_IVP} 62 | \subimport{./Volume4/PredatorPreyModels/}{PredatorPreyModels} 63 | \subimport{./Volume4/LorenzEquations/}{LorenzEquations} 64 | \subimport{./Volume4/Hysteresis/}{Hysteresis} 65 | \subimport{./Volume4/FiniteDifferenceMethod/}{FiniteDifferenceMethod} 66 | \subimport{./Volume4/HeatFlow/}{HeatFlow} 67 | \subimport{./Volume4/WaveEquation/}{waveeqn} 68 | \subimport{./Volume4/AnisotropicDiffusion/}{AnisotropicDiffusion} 69 | \subimport{./Volume4/FiniteElement/}{FiniteElement} 70 | 71 | % \subimport{./Volume4/PoissonEquation/}{Poisson} 72 | % \subimport{./Volume4/SpectralMethod1/}{Spectral1} 73 | % \subimport{./Volume4/SpectralMethod2/}{Spectral2} 74 | % \subimport{./Volume4/InverseProblem/}{InverseProblem} 75 | % \subimport{./Volume4/ShootingMethod/}{Shooting} 76 | % \subimport{./Volume4/TotalVariation/}{TotalVariation} 77 | % \subimport{./Volume4/RiverCrossing/}{RiverCrossing} 78 | % \subimport{./Volume4/HIV_Treatment/}{HIV_Treatment} 79 | % \subimport{./Volume4/Solitons/}{Solitons} 80 | % \subimport{./Volume4/ObstacleAvoidance/}{ObstacleAvoidance} 81 | % \subimport{./Volume4/InvertedPendulum/}{InvertedPendulum} 82 | % \subimport{./Volume4/LQG/}{LQG} 83 | 84 | \else 85 | 86 | \part{Labs} % Public Volume 4 Labs --------------------------------------------------- 87 | \subimport{./Volume4/Animation/}{Animation} 88 | \subimport{./Volume4/IVP_BVP_Intro/}{IVP_BVP_Intro} 89 | \subimport{./Volume4/SIR_Models/}{SIR_Models} 90 | \subimport{./Volume4/Numerical_IVP/}{Numerical_IVP} 91 | \subimport{./Volume4/PredatorPreyModels/}{PredatorPreyModels} 92 | \subimport{./Volume4/LorenzEquations/}{LorenzEquations} 93 | \subimport{./Volume4/Hysteresis/}{Hysteresis} 94 | \subimport{./Volume4/FiniteDifferenceMethod/}{FiniteDifferenceMethod} 95 | \subimport{./Volume4/WaveEquation/}{waveeqn} 96 | \subimport{./Volume4/HeatFlow/}{HeatFlow} 97 | \subimport{./Volume4/AnisotropicDiffusion/}{AnisotropicDiffusion} 98 | \subimport{./Volume4/FiniteElement/}{FiniteElement} 99 | % \subimport{./Volume4/FiniteElement2D/}{FiniteElement2D} 100 | % \subimport{./Volume4/FiniteVolume/}{finitevolume} 101 | % \subimport{./Volume4/LoveEquations/}{LoveEquations} 102 | 103 | \subimport{./Volume4/PoissonEquation/}{Poisson} 104 | \subimport{./Volume4/SpectralMethod1/}{Spectral1} 105 | \subimport{./Volume4/SpectralMethod2/}{Spectral2} 106 | \subimport{./Volume4/InverseProblem/}{InverseProblem} 107 | \subimport{./Volume4/ShootingMethod/}{Shooting} 108 | \subimport{./Volume4/TotalVariation/}{TotalVariation} 109 | \subimport{./Volume4/RiverCrossing/}{RiverCrossing} 110 | \subimport{./Volume4/HIV_Treatment/}{HIV_Treatment} 111 | \subimport{./Volume4/Solitons/}{Solitons} 112 | \subimport{./Volume4/ObstacleAvoidance/}{ObstacleAvoidance} 113 | \subimport{./Volume4/InvertedPendulum/}{InvertedPendulum} 114 | \subimport{./Volume4/LQG/}{LQG} 115 | % \subimport{./Volume4/OptimalReentry/}{OptimalReentry} 116 | % \subimport{./Volume4/SDE/}{SDE} 117 | % \subimport{./Volume4/TimberHarvest/}{TimberHarvest} 118 | 119 | \fi 120 | 121 | \part{Appendices} 122 | \begin{appendices} 123 | \subimport{./Appendices/NumpyVisualGuide/}{NumpyVisualGuide} 124 | \subimport{./Appendices/MatplotlibCustomization/}{MatplotlibCustomization} 125 | % \subimport{./Appendices/SklearnGuide/}{SklearnGuide} 126 | \end{appendices} 127 | 128 | \bibliographystyle{alpha} 129 | \bibliography{references} 130 | 131 | \end{document} 132 | -------------------------------------------------------------------------------- /Volume4/Animation/figures/normal_density.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Animation/figures/normal_density.pdf -------------------------------------------------------------------------------- /Volume4/Animation/figures/orbits-midanimation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Animation/figures/orbits-midanimation.pdf -------------------------------------------------------------------------------- /Volume4/Animation/figures/orbits.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Animation/figures/orbits.pdf -------------------------------------------------------------------------------- /Volume4/AnisotropicDiffusion/figures/balloons_color_50iters.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/AnisotropicDiffusion/figures/balloons_color_50iters.pdf -------------------------------------------------------------------------------- /Volume4/AnisotropicDiffusion/figures/balloons_colors.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/AnisotropicDiffusion/figures/balloons_colors.pdf -------------------------------------------------------------------------------- /Volume4/AnisotropicDiffusion/figures/cleaned_balloons.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/AnisotropicDiffusion/figures/cleaned_balloons.pdf -------------------------------------------------------------------------------- /Volume4/AnisotropicDiffusion/figures/coke_balloon_0iters.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/AnisotropicDiffusion/figures/coke_balloon_0iters.pdf -------------------------------------------------------------------------------- /Volume4/AnisotropicDiffusion/figures/coke_balloon_100iters.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/AnisotropicDiffusion/figures/coke_balloon_100iters.pdf -------------------------------------------------------------------------------- /Volume4/AnisotropicDiffusion/figures/coke_balloon_20iters.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/AnisotropicDiffusion/figures/coke_balloon_20iters.pdf -------------------------------------------------------------------------------- /Volume4/AnisotropicDiffusion/figures/coke_balloon_5iters.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/AnisotropicDiffusion/figures/coke_balloon_5iters.pdf -------------------------------------------------------------------------------- /Volume4/AnisotropicDiffusion/figures/noisy_balloons.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/AnisotropicDiffusion/figures/noisy_balloons.pdf -------------------------------------------------------------------------------- /Volume4/FiniteDifferenceMethod/figures/example_convergence.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/FiniteDifferenceMethod/figures/example_convergence.pdf -------------------------------------------------------------------------------- /Volume4/FiniteDifferenceMethod/figures/figure2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/FiniteDifferenceMethod/figures/figure2.pdf -------------------------------------------------------------------------------- /Volume4/FiniteDifferenceMethod/figures/figure3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/FiniteDifferenceMethod/figures/figure3.pdf -------------------------------------------------------------------------------- /Volume4/FiniteDifferenceMethod/figures/figure4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/FiniteDifferenceMethod/figures/figure4.pdf -------------------------------------------------------------------------------- /Volume4/FiniteDifferenceMethod/figures/figure5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/FiniteDifferenceMethod/figures/figure5.pdf -------------------------------------------------------------------------------- /Volume4/FiniteElement/figures/FEM_compare_methods.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/FiniteElement/figures/FEM_compare_methods.pdf -------------------------------------------------------------------------------- /Volume4/FiniteElement/figures/FEM_error_2nd_order.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/FiniteElement/figures/FEM_error_2nd_order.pdf -------------------------------------------------------------------------------- /Volume4/FiniteElement/figures/FEM_solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/FiniteElement/figures/FEM_solution.pdf -------------------------------------------------------------------------------- /Volume4/FiniteElement/figures/basis_functions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/FiniteElement/figures/basis_functions.pdf -------------------------------------------------------------------------------- /Volume4/FiniteElement/figures/one_basis_function.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/FiniteElement/figures/one_basis_function.pdf -------------------------------------------------------------------------------- /Volume4/HIV_Treatment/figures/hiv_solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/HIV_Treatment/figures/hiv_solution.pdf -------------------------------------------------------------------------------- /Volume4/HeatFlow/figures/MaximumError.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/HeatFlow/figures/MaximumError.pdf -------------------------------------------------------------------------------- /Volume4/HeatFlow/figures/heatexercise1a.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/HeatFlow/figures/heatexercise1a.pdf -------------------------------------------------------------------------------- /Volume4/HeatFlow/figures/heatexercise1b.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/HeatFlow/figures/heatexercise1b.pdf -------------------------------------------------------------------------------- /Volume4/HeatFlow/figures/heatexercise2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/HeatFlow/figures/heatexercise2.pdf -------------------------------------------------------------------------------- /Volume4/Hysteresis/figures/BudwormEquilibria.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Hysteresis/figures/BudwormEquilibria.pdf -------------------------------------------------------------------------------- /Volume4/Hysteresis/figures/BudwormPopulation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Hysteresis/figures/BudwormPopulation.pdf -------------------------------------------------------------------------------- /Volume4/Hysteresis/figures/HysteresisBifurcation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Hysteresis/figures/HysteresisBifurcation.pdf -------------------------------------------------------------------------------- /Volume4/Hysteresis/figures/SaddleNBifurcation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Hysteresis/figures/SaddleNBifurcation.pdf -------------------------------------------------------------------------------- /Volume4/Hysteresis/figures/SaddleNPhasePortrait.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Hysteresis/figures/SaddleNPhasePortrait.pdf -------------------------------------------------------------------------------- /Volume4/Hysteresis/figures/pitchfork_state_space.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Hysteresis/figures/pitchfork_state_space.pdf -------------------------------------------------------------------------------- /Volume4/Hysteresis/figures/prob1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Hysteresis/figures/prob1.pdf -------------------------------------------------------------------------------- /Volume4/IVP_BVP_Intro/figures/bvp_param_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/IVP_BVP_Intro/figures/bvp_param_example.pdf -------------------------------------------------------------------------------- /Volume4/IVP_BVP_Intro/figures/fig1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/IVP_BVP_Intro/figures/fig1.pdf -------------------------------------------------------------------------------- /Volume4/IVP_BVP_Intro/figures/fig3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/IVP_BVP_Intro/figures/fig3.pdf -------------------------------------------------------------------------------- /Volume4/IVP_BVP_Intro/figures/problem1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/IVP_BVP_Intro/figures/problem1.pdf -------------------------------------------------------------------------------- /Volume4/IVP_BVP_Intro/figures/problem2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/IVP_BVP_Intro/figures/problem2.pdf -------------------------------------------------------------------------------- /Volume4/IVP_BVP_Intro/figures/problem3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/IVP_BVP_Intro/figures/problem3.pdf -------------------------------------------------------------------------------- /Volume4/IVP_BVP_Intro/figures/problem41.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/IVP_BVP_Intro/figures/problem41.pdf -------------------------------------------------------------------------------- /Volume4/IVP_BVP_Intro/figures/problem42.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/IVP_BVP_Intro/figures/problem42.pdf -------------------------------------------------------------------------------- /Volume4/IVP_BVP_Intro/figures/problem43.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/IVP_BVP_Intro/figures/problem43.pdf -------------------------------------------------------------------------------- /Volume4/IVP_BVP_Intro/figures/problem5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/IVP_BVP_Intro/figures/problem5.pdf -------------------------------------------------------------------------------- /Volume4/InverseProblem/figures/cause_and_effect.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/InverseProblem/figures/cause_and_effect.pdf -------------------------------------------------------------------------------- /Volume4/InverseProblem/figures/density_a.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/InverseProblem/figures/density_a.pdf -------------------------------------------------------------------------------- /Volume4/InverseProblem/figures/ill_posed_density_a.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/InverseProblem/figures/ill_posed_density_a.pdf -------------------------------------------------------------------------------- /Volume4/InverseProblem/figures/spatially_dependent_nu.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/InverseProblem/figures/spatially_dependent_nu.pdf -------------------------------------------------------------------------------- /Volume4/InvertedPendulum/figures/nonlinear_attempt1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/InvertedPendulum/figures/nonlinear_attempt1.pdf -------------------------------------------------------------------------------- /Volume4/InvertedPendulum/figures/nonlinear_attempt2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/InvertedPendulum/figures/nonlinear_attempt2.pdf -------------------------------------------------------------------------------- /Volume4/InvertedPendulum/figures/prob4_stable.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/InvertedPendulum/figures/prob4_stable.pdf -------------------------------------------------------------------------------- /Volume4/InvertedPendulum/figures/prob4_unstable.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/InvertedPendulum/figures/prob4_unstable.pdf -------------------------------------------------------------------------------- /Volume4/InvertedPendulum/figures/rickshaw_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/InvertedPendulum/figures/rickshaw_img.png -------------------------------------------------------------------------------- /Volume4/LorenzEquations/LorenzEquations.tex: -------------------------------------------------------------------------------- 1 | \lab{Lorenz Equations}{Lorenz Equations} 2 | % \epigraph{\textit{Chaos: When the present determines the future, but the approximate present does not approximately determine the future.}}{Edward Lorenz} 3 | \objective{Investigate the behavior of a system that exhibits chaotic behavior. 4 | Demonstrate methods for visualizing the evolution of a system.} 5 | \labdependencies{Animation,IVPBVPIntro} 6 | 7 | Chaos is everywhere. 8 | It can crop up in unexpected places and in remarkably simple systems, and a great deal of work has been done to describe the behavior of chaotic systems. 9 | One primary characterization of chaos is that small changes in initial conditions result in large changes over time in the solution curves. 10 | 11 | \section*{The Lorenz System} 12 | One of the earlier examples of chaotic behavior was discovered by Edward Lorenz. 13 | In 1963, while working to study atmospheric dynamics, he derived the simple system of equations 14 | \begin{align*} 15 | \frac{d x}{d t} &= \sigma \left(y - x\right) \\ 16 | \frac{d y}{d t} &= \rho x - y - x z \\ 17 | \frac{d z}{d t} &= x y - \beta z 18 | \end{align*} 19 | where $\sigma$, $\rho$, and $\beta$ are all constants. 20 | After deriving these equations, he plotted the solutions and observed some unexpected behavior. 21 | For appropriately chosen values of $\sigma$, $\rho$, and $\beta$, the solutions did not tend toward any steady fixed points, nor did the system permit any stable cycles. 22 | The solutions did not tend off toward infinity either. 23 | This began the study of what was called a \textit{strange attractor}. 24 | Although relatively simple, this system exhibits chaotic behavior. 25 | 26 | \begin{problem} 27 | Write a function that implements the Lorenz equations. Let $\sigma=10$, $\rho=28$, $\beta=\frac{8}{3}$. 28 | Make a 3D plot of a solution to the Lorenz equations, where the initial conditions $x_0,y_0,z_0$ are each drawn randomly from a uniform distribution on $[-15,15]$ and for \(t\) in the range \([0,25]\). 29 | As usual, use \li{scipy.integrate.solve_ivp} to compute an approximate solution. 30 | Compare your results with Figure \ref{fig:Single_Lorenz}. 31 | \end{problem} 32 | 33 | 34 | \begin{figure} 35 | \includegraphics[width=\textwidth]{figures/Single_Lorenz.pdf} 36 | \caption{Approximate solution to the Lorenz equation with random initial conditions} 37 | \label{fig:Single_Lorenz} 38 | \end{figure} 39 | 40 | \section*{Basin of Attraction} 41 | Notice in the first problem that the solution tended to a certain region, called an \textit{attractor}. 42 | The \textit{basin of attraction} of an attractor is the set of initial conditions that tend towards the attractor. 43 | We will investigate the basin of attraction of the Lorenz system by changing the initial conditions. 44 | \begin{problem} 45 | To better visualize the Lorenz attractor, produce a single 3D plot displaying three solutions to the Lorenz equations, each with random initial conditions as before. 46 | Compare your results with Figure \ref{fig:Multiple_Lorenz}. 47 | \end{problem} 48 | 49 | \begin{figure} 50 | \includegraphics[width=\textwidth]{figures/Multiple_Lorenz.pdf} 51 | \caption{Multiple solutions to the Lorenz equation with random initial conditions} 52 | \label{fig:Multiple_Lorenz} 53 | \end{figure} 54 | 55 | \section*{Chaos} 56 | Chaotic systems exhibit high sensitivity to initial conditions. 57 | This means that a small difference in initial conditions will generally result in solutions that diverge significantly from each other. 58 | However, chaotic systems are not \textit{random}. 59 | An explanation given by Lorenz is that chaos is ``when the present determines the future, but the approximate present does not approximately determine the future.'' 60 | 61 | \begin{problem} 62 | \label{lorenz:prob:chaos} 63 | Use \li{matplotlib.animation.FuncAnimation} to produce a 3D animation of two solutions to the Lorenz equations with nearly identical initial conditions. To make the initial conditions, draw $x_0,y_0,z_0$ as before, and then make a second initial condition by adding a small perturbation to the first (try using \li{np.random.randn(3)*(1e-8)} for the perturbation). Note that it may take several seconds before the separation between the two solutions will be noticeable. Evaluate on \li{t_span=(0,50)} and use the \li{t_eval} argument of \li{solve_ivp}, with \li{t_eval=np.linspace(0,50,3000)}. Using this argument causes \li{solve_ivp} to return the solution's values at the points you pass in. 64 | 65 | The animation should display a point marker as well as the past trajectory curve for each solution. 66 | Save your animation as \li{lorenz_animation1.mp4} and embed it into the notebook. 67 | \end{problem} 68 | 69 | In a chaotic system, round-off error implicit in a numerical method can also cause divergent solutions. For example, using a Runge-Kutta method with two different values for the stepsize $h$ on identical initial conditions will still result in approximations that differ in a chaotic fashion. 70 | 71 | \begin{problem} 72 | Even differences due to small numerical errors can cause solutions of chaotic systems to diverge from each other. 73 | The \li{solve_ivp} function allows user to specify error tolerances (similar to setting a value of $h$ in a Runge-Kutta method). 74 | Using a single initial condition, produce two approximations by using the \li{solve_ivp} arguments \li{(atol=1e-15, rtol=1e-13)} for the first approximation and \li{(atol=1e-12, rtol=1e-10)} for the second. 75 | 76 | As in the previous problem, use \li{FuncAnimation} to animation both solutions. 77 | Save the animation as \li{lorenz_animation2.mp4} and embed it into the notebook. 78 | Use the same \li{t_span} and \li{t_eval} arguments as in problem \ref{lorenz:prob:chaos}. 79 | \end{problem} 80 | 81 | \begin{comment} 82 | If our system is very chaotic, then even small round off errors in your computer can lead to drastically different solutions. 83 | 84 | \begin{problem} 85 | Now set one initial condition. 86 | Use \li{solve_ivp} to solve the system, but use the arguments \li{atol=1E-14}, \li{rtol=1E-12}, and then again with \li{atol=1E-15}, \li{rtol=1E-13}. 87 | Animate both solutions on the same plot. 88 | \end{problem} 89 | \end{comment} 90 | 91 | \section*{Lyapunov Exponents} 92 | The \textit{Lyapunov exponent} of a dynamical system is one measure of how chaotic a system is. 93 | While there are more conditions for a system to be considered chaotic, one of the primary indicators of a chaotic system is \textit{extreme sensitivity to initial conditions}. 94 | Strictly speaking, this is saying that a chaotic system is poorly conditioned. 95 | In a chaotic system, the sensitivity to changes in initial conditions depends expoentially on the time the system is allowed to evolve. 96 | If $\delta(t)$ represents the difference between two solution curves, when $\delta(t)$ is small, the following approximation holds. 97 | \[\|\delta(t)\| \sim \|\delta(0)\| e^{\lambda t}\] 98 | where $\lambda$ is a constant called the Lyapunov exponent. In other words, $\log(\|\delta(t)\|)$ is approximately linear as a function of time, with slope $\lambda$. 99 | For the Lorenz system (and for the parameter values specified in this lab), experimentally it can be verified that $\lambda \approx .9$. 100 | 101 | \begin{figure} 102 | \includegraphics[width=\textwidth]{figures/semilog.pdf} 103 | \caption{A semilog plot of the separation between two solutions to the Lorenz equations together with a fitted line that gives an estimate of the Lyapunov exponent of the system.} 104 | \label{fig:lyapunov_exponent} 105 | \end{figure} 106 | 107 | \begin{comment} 108 | Suppose we want tol find the Lyapunov exponent for the Lorenz System. 109 | Start by importing \li{linalg} and \li{linregress} modules from \li{scipy}. 110 | \begin{lstlisting} 111 | from scipy import linalg as la 112 | from scipy.stats import linregress 113 | \end{lstlisting} 114 | To get a good estimate of the Lyapunov exponent, we want to make sure our initial solution already lies on the attractor. 115 | To do this, choose some random initial conditions, run your \li{solve_lorenz} function, then pick out the final coordinates. 116 | Let these coordinates be the starting point for our next system. 117 | 118 | Next perturb the conditions slightly. 119 | Find the solution curve using these two sets of initial coordinates and then calculate the \li{norm} between the solution at each point. 120 | Plot the norm using \li{plt.semilogy(time, norm)}. 121 | 122 | Finally we want to calculate the exponential line fitted to the data. 123 | Because we are using the semilog plot, we can find this line as follows: 124 | \begin{itemize} 125 | \item take the \li{log} of the norms. 126 | \item use \li{linregress()} to compute the linear regression of the log of the norms. 127 | \item take the \li{exp} of the linear regression to turn back into an exponential regression. 128 | \item plot the exponential regression using \li{plt.semilogy()} (your solution will be a line) 129 | \end{itemize} 130 | \end{comment} 131 | 132 | 133 | \begin{problem} 134 | Estimate the Lyapunov exponent of the Lorenz equations by doing the following: 135 | \begin{itemize} 136 | \item Produce an initial condition that already lies in the attractor. This can be done by using a random ``dummy'' initial condition, approximating the resulting solution to the Lorenz system for a short time, and then using the endpoint of that solution (which is now in the attractor) as the desired initial condition. 137 | \item Produce a second initial condition by adding a small perturbation to the first (as before). 138 | \item For both initial conditions, use \li{solve_ivp} to produce approximate solutions for $0 \leq t \leq 10$. 139 | \item Compute $\|\delta(t)\|$ by taking the norm of the vector difference between the two solutions for each value of $t$. 140 | \item Use \li{scipy.stats.linregress} to calculate a best-fit line for $\log(\|\delta(t)\|)$ against $t$. 141 | \item The slope of the best-fit line is an approximation for the Lyapunov exponent $\lambda$. 142 | 143 | \end{itemize} 144 | Print your approximation of $\lambda$, and produce a plot similar to Figure \ref{fig:lyapunov_exponent} by using \li{plt.semilogy}. 145 | 146 | Hint: Remember that the best-fit line you calculated corresponds to a best-fit exponential for $\|\delta(t)\|$. 147 | If \li{a} and \li{b} are the slope and intercept of the best-fit line, the best-fit exponential can be plotted using \li{plt.semilogy(t,np.exp(a*t+b))}. 148 | Use the \li{t_eval} argument of \li{solve_ivp} (as in Problem \ref{lorenz:prob:chaos}) for both solutions to the Lorenz equation so that you can compute $\|\delta(t)\|$ for the same time steps. 149 | 150 | 151 | \end{problem} -------------------------------------------------------------------------------- /Volume4/LorenzEquations/figures/Multiple_Lorenz.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/LorenzEquations/figures/Multiple_Lorenz.pdf -------------------------------------------------------------------------------- /Volume4/LorenzEquations/figures/Single_Lorenz.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/LorenzEquations/figures/Single_Lorenz.pdf -------------------------------------------------------------------------------- /Volume4/LorenzEquations/figures/semilog.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/LorenzEquations/figures/semilog.pdf -------------------------------------------------------------------------------- /Volume4/Numerical_IVP/figures/Efficiency.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Numerical_IVP/figures/Efficiency.pdf -------------------------------------------------------------------------------- /Volume4/Numerical_IVP/figures/damped_forced_oscillator.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Numerical_IVP/figures/damped_forced_oscillator.pdf -------------------------------------------------------------------------------- /Volume4/Numerical_IVP/figures/euler.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Numerical_IVP/figures/euler.pdf -------------------------------------------------------------------------------- /Volume4/Numerical_IVP/figures/example2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Numerical_IVP/figures/example2.pdf -------------------------------------------------------------------------------- /Volume4/Numerical_IVP/figures/prob2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Numerical_IVP/figures/prob2.pdf -------------------------------------------------------------------------------- /Volume4/Numerical_IVP/figures/simple_oscillator.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/Numerical_IVP/figures/simple_oscillator.pdf -------------------------------------------------------------------------------- /Volume4/ObstacleAvoidance/figures/OA_prob1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/ObstacleAvoidance/figures/OA_prob1.pdf -------------------------------------------------------------------------------- /Volume4/ObstacleAvoidance/figures/OA_prob2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/ObstacleAvoidance/figures/OA_prob2.pdf -------------------------------------------------------------------------------- /Volume4/ObstacleAvoidance/figures/OA_prob4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/ObstacleAvoidance/figures/OA_prob4.pdf -------------------------------------------------------------------------------- /Volume4/ObstacleAvoidance/figures/example2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/ObstacleAvoidance/figures/example2.pdf -------------------------------------------------------------------------------- /Volume4/PoissonEquation/figures/mt_rushmore.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/PoissonEquation/figures/mt_rushmore.pdf -------------------------------------------------------------------------------- /Volume4/PoissonEquation/figures/poisson_square.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/PoissonEquation/figures/poisson_square.pdf -------------------------------------------------------------------------------- /Volume4/PoissonEquation/figures/potential.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/PoissonEquation/figures/potential.pdf -------------------------------------------------------------------------------- /Volume4/PoissonEquation/figures/relative_charge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/PoissonEquation/figures/relative_charge.pdf -------------------------------------------------------------------------------- /Volume4/PredatorPreyModels/figures/LV_Phase_Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/PredatorPreyModels/figures/LV_Phase_Portrait.png -------------------------------------------------------------------------------- /Volume4/PredatorPreyModels/figures/Predator_Prey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/PredatorPreyModels/figures/Predator_Prey.png -------------------------------------------------------------------------------- /Volume4/RiverCrossing/RiverCrossing.tex: -------------------------------------------------------------------------------- 1 | \lab{Transit Time Crossing a River}{Transit Time Crossing a River} 2 | \label{lab:rivercrossing} 3 | \objective{This lab discusses a classical calculus of variations problem: how is a river to be crossed in the shortest possible time? 4 | We will look at a numerical solution using the pseudospectral method. } 5 | \labdependencies{SpectralMethod1} 6 | 7 | Suppose a boat is to be rowed across a river, from a point $A$ on one side of a river ($x=-1$), to a point $B$ on the other side ($x=1$). 8 | Assuming the boat moves at a constant speed 1 relative to the current, how must the boat be steered to minimize the time required to cross the river? 9 | 10 | \begin{figure} 11 | \centering 12 | \includegraphics[width=\textwidth]{figures/rivercurrent.pdf} 13 | \caption{The river's current, along with a possible trajectory for the boat.} 14 | \label{fig:rivercrossing_current} 15 | \end{figure} 16 | 17 | 18 | Let us consider a typical trajectory for the boat as it crosses the river. 19 | If $T$ is the time required to cross the river, then the position $s$ of the boat at time $t$ is 20 | \begin{align*} 21 | s(t) &= (x(t), y(t)), \quad t \in [0,T], \\ 22 | s'(t) &= (x'(t), y'(t)) \\ 23 | &= (\cos \theta(x(t)),\sin \theta(x(t))) + (0, c(x(t))). 24 | \end{align*} 25 | Here $(\cos \theta(x), \sin \theta(x))$ represents the motion of the boat due to the rower, and $(0, c(x))$ is the motion of the boat due to the current. 26 | 27 | We can relate the angle at which the boat is steered to the graph of its trajectory by noting that 28 | \begin{align} 29 | \begin{split} 30 | y'(x) &= \frac{y'(t)}{x'(t)} ,\\ 31 | &= \frac{\sin \theta(x) + c(x)}{\cos \theta(x)},\\ 32 | &= c(x)\sec \theta(x) + \tan \theta(x) .%, \\ 33 | % &= c \sec \theta + \sqrt{\sec^2 \theta -1}. 34 | \end{split} \label{rivercrossing:angle} 35 | \end{align} 36 | The time $T$ required to cross the river is given by 37 | \begin{align} 38 | \begin{split} 39 | T &= \int_{-1}^1 t'(x)\, dx, \\ 40 | &= \int_{-1}^1 \frac{1}{x'(t)}\, dx \\ 41 | &= \int_{-1}^1 \sec \theta(x)\, dx. 42 | \end{split}\label{rivercrossing:T} 43 | \end{align} 44 | We would like to find an expression for the total time $T$ required to cross the river from $A$ to $B$, in terms of the graph of the boat's trajectory. 45 | To derive the functional $T[y]$, we note that 46 | \begin{align*} 47 | T[y] &= \int_{-1}^1 \sec \theta(x) dx,\\ 48 | &= \int_{-1}^1 \frac{1}{1-c(x)^2}(c(x) \tan \theta(x) + \sec \theta(x) -c(x)^2 \sec \theta(x) - c(x)\tan \theta(x))\, dx, \\ 49 | &= \int_{-1}^1 \frac{1}{1-c(x)^2}(c(x) \tan \theta(x) + \sec \theta(x) -c(x) y'(x) )\, dx. 50 | \end{align*} 51 | Since 52 | \begin{align*} 53 | c(x)\tan \theta(x) + \sec \theta(x) &= \sqrt{1 - c(x)^2 + (c(x) \sec \theta(x) + \tan \theta(x))^2},\\ 54 | &= \sqrt{1 - c(x)^2 + (y'(x))^2}, 55 | \end{align*} 56 | we obtain at last 57 | \begin{align} 58 | T[y] &= \int_{-1}^1 \left[ \alpha(x)\sqrt{1 + (\alpha(x) y'(x))^2} - \alpha^2(x) c(x) y'(x) \right]\, dx, 59 | \end{align} 60 | where $\alpha(x) = (1 - c^2(x))^{-1/2}$. 61 | 62 | \begin{problem} 63 | Assume that the current is given by $c(x) = -\frac{7}{10}(x^2-1)$. (This function assumes, for example, that the current is faster near the center of the river.) 64 | Write two python functions. The first should accept as arguments a function $y$, its derivative $y'$, and an $x$-value, and return $L(x,y(x),y'(x))$ (where $T[y] = \int_{-1}^1 L(x,y(x),y'(x))$). 65 | The second should use the first function to compute and return $T[y]$ for a given path $y(x)$. 66 | \\ Hint: The integration for $T[y]$ can be done use an approximation method such as the midpoint method or can be done using the \li{quad} function from \li{scipy.integrate}. 67 | \end{problem} 68 | 69 | \begin{problem} 70 | Let $y(x)$ be the straight-line path between $A = (-1,0)$ and $B=(1,5)$. Numerically calculate $T[y]$ to get an upper bound on the minimum time required to cross from $A$ to $B$. Using $\eqref{rivercrossing:T}$, find a lower bound on the minimum time required to cross. 71 | \\Hint: If $G=\int f(x)dx$ and we want to minimize $G$, try minimizing $f(x)$. 72 | \end{problem} 73 | 74 | We look for the path $y(x)$ that minimizes the time required for the boat to cross the river, so that the function $T$ is minimized. From the calculus of variations we know that a smooth path $y(x)$ minimizes $T$ only if the Euler-Lagrange equation is satisfied. Recall that the Euler-Lagrange equation is 75 | \[ 76 | % \frac{\partial }{\partial y}L - \frac{d}{dx}\frac{\partial }{\partial y'}L 77 | L_{y} - \frac{d}{dx}L_{y'} = 0. 78 | \] 79 | Since $L_y = 0$, we see that the shortest time trajectory satisfies 80 | \begin{align} 81 | \frac{d}{dx}L_{y'} &= \frac{d}{dx}\left( \alpha^3(x) y'(x) (1 + (\alpha(x) y'(x))^2)^{-1/2} - \alpha^2(x) c(x) \right) = 0. 82 | \label{rivercrossing:EL} 83 | \end{align} 84 | 85 | \begin{problem} 86 | Numerically solve the Euler-Lagrange equation \eqref{rivercrossing:EL}, using $c(x) = -\frac{7}{10}(x^2-1)$ and $\alpha(x) = (1-c^2(x))^{-1/2}$, and $y(-1) = 0$, $y(1) = 5$. Plot $y$ on $x\in [-1,1]$. 87 | 88 | Hint: Since this boundary value problem is defined over the domain $[-1,1]$, it is easy to solve using the pseudospectral method. Begin by replacing each $\frac{d}{dx}$ with the pseudospectral differentiation matrix $D$. Then impose the boundary conditions and solve implicitly using \li{fsolve} from \li{scipy.optimize.root}. See the last two problems of Spectral 1 for a reminder on how to do this. 89 | \end{problem} 90 | 91 | \begin{problem} 92 | Plot the angle at which the boat should be pointed at each $x$-coordinate. 93 | 94 | Hint: Use Equation \eqref{rivercrossing:angle}; see Figure \ref{fig:rivercrossing_angle}. Note that the angle the boat should be steered is \emph{not} described by the tangent vector to the trajectory. Consider using \li{scipy.optimize.root} or \li{scipy.interpolate.barycentric_interpolate} 95 | \end{problem} 96 | 97 | \begin{figure}[H] 98 | \centering 99 | \includegraphics[width=\textwidth]{figures/minimum_time_rivercrossing.pdf} 100 | \caption{Numerical computation of the trajectory with the shortest transit time.} 101 | \label{fig:rivercrossing_trajectory} 102 | \end{figure} 103 | 104 | 105 | 106 | \begin{figure}[H] 107 | \centering 108 | \includegraphics[width=\textwidth]{figures/trajectory_angle.pdf} 109 | \caption{The optimal angle to steer the boat.} 110 | \label{fig:rivercrossing_angle} 111 | \end{figure} 112 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /Volume4/RiverCrossing/figures/minimum_time_rivercrossing.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/RiverCrossing/figures/minimum_time_rivercrossing.pdf -------------------------------------------------------------------------------- /Volume4/RiverCrossing/figures/rivercurrent.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/RiverCrossing/figures/rivercurrent.pdf -------------------------------------------------------------------------------- /Volume4/RiverCrossing/figures/trajectory_angle.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/RiverCrossing/figures/trajectory_angle.pdf -------------------------------------------------------------------------------- /Volume4/SIR_Models/figures/PGED-model.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/SIR_Models/figures/PGED-model.pdf -------------------------------------------------------------------------------- /Volume4/SIR_Models/figures/SIR1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/SIR_Models/figures/SIR1.pdf -------------------------------------------------------------------------------- /Volume4/SIR_Models/figures/SIR2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/SIR_Models/figures/SIR2.pdf -------------------------------------------------------------------------------- /Volume4/SIR_Models/figures/bvp_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/SIR_Models/figures/bvp_example.pdf -------------------------------------------------------------------------------- /Volume4/SIR_Models/figures/ivpexample1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/SIR_Models/figures/ivpexample1.pdf -------------------------------------------------------------------------------- /Volume4/SIR_Models/figures/measles.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/SIR_Models/figures/measles.pdf -------------------------------------------------------------------------------- /Volume4/SIR_Models/figures/problem3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/SIR_Models/figures/problem3.pdf -------------------------------------------------------------------------------- /Volume4/ShootingMethod/figures/cannon_comparison.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/ShootingMethod/figures/cannon_comparison.pdf -------------------------------------------------------------------------------- /Volume4/ShootingMethod/figures/example1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/ShootingMethod/figures/example1.pdf -------------------------------------------------------------------------------- /Volume4/ShootingMethod/figures/problem1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/ShootingMethod/figures/problem1.pdf -------------------------------------------------------------------------------- /Volume4/ShootingMethod/figures/problem2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/ShootingMethod/figures/problem2.pdf -------------------------------------------------------------------------------- /Volume4/ShootingMethod/figures/problem3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/ShootingMethod/figures/problem3.pdf -------------------------------------------------------------------------------- /Volume4/SpectralMethod1/figures/minimal_surface.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/SpectralMethod1/figures/minimal_surface.pdf -------------------------------------------------------------------------------- /Volume4/SpectralMethod2/Spectral2.tex: -------------------------------------------------------------------------------- 1 | \lab{Spectral 2: A Pseudospectral Method for Periodic Functions}{Spectral 2: A Pseudospectral Method for Periodic Functions} 2 | \label{lab:pseudospectral2} 3 | \labdependencies{SpectralMethod1} 4 | 5 | \objective{ 6 | We look at a pseudospectral method with a Fourier basis, and numerically solve two PDEs using a pseudospectral discretization in space and a Runge-Kutta integration scheme in time. } 7 | 8 | Let $f$ be a periodic function on $[0,2\pi]$. 9 | Let $x_1,\ldots,x_N$ be $N$ evenly spaced grid points on $[0,2\pi]$. 10 | Since $f$ is periodic on $[0,2\pi]$, we can ignore the grid point $x_N = 2\pi$. 11 | We will further assume that $N$ is even; similar formulas can be derived for $N$ odd. 12 | Let $h = 2\pi/N$; then $\{x_0,\ldots,x_{N-1}\} = \{0,h,2h,\ldots,2\pi-h\}$. 13 | 14 | The discrete Fourier transform (DFT) of $f$, denoted by $\hat{f}$ or $\mathcal{F}(f)$, is given by 15 | \[ 16 | \hat{f}(k) = h \sum_{j=0}^{N-1} e^{-ikx_j}f(x_j) \quad \text{ where } k = -N/2+1, \ldots,0,1,\ldots, N/2. 17 | \] 18 | The inverse DFT is then given by 19 | \begin{align} 20 | \begin{split} 21 | f(x_j) &= \frac{1}{2\pi}\sum_{k=-N/2}^{N/2}\frac{e^{ikx_j}}{c_k}\hat{f}(k), \quad j = 0,\ldots, N-1, 22 | \end{split}\label{inverse_dft} 23 | \end{align} 24 | where 25 | \begin{align} 26 | c_k = \begin{cases} 2 & \text{if }k = -N/2 \text{ or }k = N/2, \\ 1 & \text{otherwise.} 27 | \end{cases} 28 | \end{align} 29 | The inverse DFT can then be used to define a natural interpolant (sometimes called a band-limited interpolant) by evaluating (\ref{inverse_dft}) at any $x$ rather than $x_j$: 30 | \begin{align} 31 | p(x) = \frac{1}{2\pi}\sum_{k=-N/2}^{N/2} e^{ikx}\hat{f}(k). \label{interpolant} 32 | \end{align} 33 | The interpolant for $f'$ is then given by 34 | \begin{align} 35 | p'(x) = \frac{1}{2\pi}\sum_{k=-N/2+1}^{N/2-1} ike^{ikx}\hat{f}(k). \label{spectral2:deriv} 36 | \end{align} 37 | 38 | Consider the function $u(x) = \sin^2 (x) \cos(x) +e^{2\sin(x+1)}$. 39 | Using \eqref{spectral2:deriv}, the derivative $u'$ may be approximated with the following code. 40 | \footnote{See \textit{Spectral Methods in MATLAB} by Lloyd N. Trefethen. 41 | Another good reference is \textit{Chebyshev and Fourier Spectral Methods} by John P. Boyd.} 42 | We note that although we only approximate $u'$ at the Fourier grid points, \eqref{spectral2:deriv} provides an analytic approximation of $u'$ in the form of a trigonometric polynomial. 43 | 44 | \begin{lstlisting} 45 | import numpy as np 46 | from scipy.fftpack import fft, ifft 47 | import matplotlib.pyplot as plt 48 | 49 | N=24 50 | x1 = (2.*np.pi/N)*np.arange(1, N+1) 51 | f = np.sin(x1)**2.*np.cos(x1) + np.exp(2.*np.sin(x1+1)) 52 | 53 | # This array is reordered in Python to 54 | # accomodate the ordering inside the fft function in scipy. 55 | k = np.concatenate(( np.arange(0, N/2) , 56 | np.array([0]) , # Because hat{f}'(k) at k = N/2 is zero. 57 | np.arange(-N/2+1, 0, 1))) 58 | 59 | # Approximates the derivative using the pseudospectral method 60 | f_hat = fft(f) 61 | fp_hat = ((1j*k)*f_hat) 62 | fp = np.real(ifft(fp_hat)) 63 | 64 | # Calculates the derivative analytically 65 | x2 = np.linspace(0, 2*np.pi, 200) 66 | derivative = (2.*np.sin(x2)*np.cos(x2)**2. - 67 | np.sin(x2)**3. + 68 | 2*np.cos(x2+1)*np.exp(2*np.sin(x2+1)) 69 | ) 70 | 71 | plt.plot(x2, derivative, "-k", linewidth=2.) 72 | plt.plot(x1, fp, "*b") 73 | plt.savefig("spectral2_derivative.pdf") 74 | plt.show() 75 | \end{lstlisting} 76 | 77 | \begin{figure}[H] 78 | \centering 79 | \includegraphics[width=\textwidth]{figures/spectral2_derivative_example.pdf} 80 | \caption{The derivative of $u(x) = \sin^2 (x) \cos(x) +e^{2\sin(x+1)}$.} 81 | \label{fig:spectral:spectral2_derivative} 82 | \end{figure} 83 | 84 | \begin{problem} 85 | Consider again the function $u(x) = \sin^2 (x) \cos(x) +e^{2\sin(x+1)}$. 86 | Create a function that approximates $\frac{1}{2}u''-u'$ on the Fourier grid points for $N=24$. 87 | \end{problem} 88 | 89 | \section*{The advection equation} 90 | Recall that the advection equation is given by 91 | \begin{align} 92 | &{ }u_t + cu_x = 0 93 | \end{align} 94 | where $c$ is the speed of the wave (the wave travels to the right for $c > 0$). 95 | We will consider the solution of the advection equation on the domain $[0,2\pi]$ and assume periodic boundary conditions. 96 | 97 | A common method for solving time-dependent PDEs is called the \textit{method of lines}. 98 | To apply the method of lines to our problem, we use our Fourier grid points in $[0,2\pi]$: given an even $N$, let $h = 2\pi/N$, so that $\{x_0,\ldots,x_{N-1}\} = \{0,h,2h,\ldots,2\pi-h\}$. 99 | By using these grid points we obtain the collection of equations 100 | \begin{align} 101 | &{ }u_t(x_j,t) + cu_x(x_j,t) = 0, \quad t >0, \quad j = 0, \ldots N-1. \label{spectral2:method_oflines} 102 | \end{align} 103 | 104 | Let $U(t)$ be the vector-valued function given by $U(t) = (u(x_j,t))_{j=0}^{N-1}$. 105 | Let $\mathcal{F}(U)(t)$ denote the discrete Fourier transform of $u(x,t)$ (in space), so that 106 | \[ 107 | \mathcal{F}(U)(t) = (\hat{u}(k,t))_{k=-N/2+1}^{N/2}. 108 | \] 109 | Define $\mathcal{F}^{-1}$ similarly. 110 | Using the pseudospectral approximation in space leads to the system of ODEs 111 | \begin{align} 112 | U_t + \vec{c}\mathcal{F}^{-1}\left(i\vec{k}\mathcal{F}(U) \right) = 0 113 | \end{align} 114 | where $\vec{k}$ is a vector, and $\vec{k}\mathcal{F}(U) $ denotes element-wise multiplication. 115 | Similarly $\vec{c}$ could also be a vector, if the wave speed $c$ is allowed to vary. We can then use an ODE solver for the time derivative and the pseudospectral method for spatial derivatives. 116 | 117 | \begin{problem} 118 | Using \li{solve_ivp}, solve the initial value problem 119 | \begin{align} 120 | u_t +c(x) u_x = 0, 121 | \end{align} 122 | where $c(x) = 0.2 + \sin^2(x-1)$, and $u(x,t=0) = e^{-100(x-1)^2}.$ 123 | Plot your numerical solution from $t = 0$ to $t = 8$ over 250 time steps and 200 $x$ steps. 124 | Note that the initial data is nearly zero near $x = 0$ and $2 \pi$, and so we can use the pseudospectral method.\footnote{This problem is solved in \textit{Spectral Methods in MATLAB} using a leapfrog discretization in time. } 125 | \label{spectral2:advection_equation} 126 | Use the following code to help graph. The solution can be seen in Figure \ref{fig:spectral:spectral2_advection}. 127 | \begin{lstlisting} 128 | t_steps = 250 # Time steps 129 | x_steps = 200 # x steps 130 | 131 | ''' 132 | Your code here to set things up 133 | ''' 134 | 135 | sol = # use solve_ivp 136 | 137 | X, Y = np.meshgrid(x_domain, t_domain) 138 | fig = plt.figure() 139 | ax = fig.add_subplot(111, projection="3d") 140 | surf = ax.plot_surface(X, Y, np.transpose(sol.y), cmap="coolwarm") 141 | ax.set_zlim(0, 3) 142 | ax.view_init(elev=40, azim=280, roll=0) 143 | ax.set_xlabel(r"$x$") 144 | ax.set_ylabel(r"$T$") 145 | ax.set_zlabel(r"$z$") 146 | ax.set_box_aspect(aspect=None, zoom=0.8) 147 | plt.show() 148 | \end{lstlisting} 149 | \end{problem} 150 | 151 | \begin{figure}[H] 152 | \centering 153 | \includegraphics[width=\textwidth]{figures/variable_speed_advection.pdf} 154 | \caption{The solution of the variable speed advection equation; see Problem \ref{spectral2:advection_equation}.} 155 | \label{fig:spectral:spectral2_advection} 156 | \end{figure} 157 | 158 | \section*{The wave equation} 159 | We can use the pseudospectral method to solve higher-order PDEs as well. A common example of a second-order hyperbolic PDE is the wave equation, which is often used in physics. The wave equation is given by 160 | 161 | \begin{align*} 162 | &{ }u_{tt} - cu_{xx} = 0, 163 | \end{align*} 164 | where $c$ is the wave speed. Unlike the advection equation, waves that encounter mediums of different wave speeds will reflect part of the wave back. We will see this in Problem \ref{spectral2:wave_equation}. First, we must change this second-order method-of-lines ODE equation into a first-order equation. 165 | Using the \textit{method of lines}, the wave equation can be written as a system of first-order ODEs, 166 | 167 | \begin{align} 168 | \frac{\partial}{\partial t} \begin{bmatrix} 169 | u\\ 170 | u_t \\ 171 | \end{bmatrix} &= 172 | \begin{bmatrix} 173 | u_t\\ 174 | cu_{xx} 175 | \end{bmatrix}. 176 | \end{align} 177 | We can then use an ODE solver, such as \li{solve_ivp} to solve for the time derivatives, while we use the spectral method for the spatial derivatives. 178 | 179 | \begin{problem} 180 | Using \li{solve_ivp}, solve the initial value problem 181 | \begin{align} 182 | u_{tt} -c(x) u_{xx} = 0, 183 | \end{align} 184 | where 185 | \begin{align*} 186 | c(x)= 187 | \begin{cases} 188 | 4 & 0\leq x < \pi \\ 189 | 1 & \pi \leq x < 2\pi 190 | \end{cases}, 191 | \end{align*} 192 | with $u(x,t=0) = 0.2e^{(-10(x-5)^2)}$ and $u_t(x,t=0) = -4(x-5)e^{(-10(x-5)^2)}$. 193 | Plot your numerical solution from $t = 0$ to $t = 3$ over 150 time steps and 100 $x$ steps. 194 | As in the previous problem, the initial data is nearly zero near $x = 0$ and $2 \pi$, and so we can use the pseudospectral method (the solution is approximately periodic because the boundaries both stay near zero). 195 | Use the code provided in the previous problem (but with different numbers of steps in the $x$ and $t$ directions) to help with plotting. The solution can be seen in Figure \ref{fig:spectral:spectral2_wave}. Note that the wave speeds up at the barrier, and some of it is reflected. 196 | 197 | Hints: The initial conditions for \li{solve_ivp} need to be in a one-dimensional array. Concatenate the initial conditions into a single $(100+100)\times1$ array to start \li{solve_ivp}. You will need to make corresponding changes in the RHS derivative function (the first parameter of \li{solve_ivp}) by returning a $(100+100)\times1$ array, where the first $100$ elements are the derivative $\frac{\partial}{\partial t}u$, and the second $100$ elements are the derivative $\frac{\partial}{\partial t}u_t$. 198 | \label{spectral2:wave_equation} 199 | \end{problem} 200 | 201 | \begin{figure}[H] 202 | \centering 203 | \includegraphics[width=\textwidth]{figures/wave_equation_barrier.pdf} 204 | \caption{The solution of the wave equation for a pulse hitting a barrier at $x=\pi$; see Problem \ref{spectral2:wave_equation}.} 205 | \label{fig:spectral:spectral2_wave} 206 | \end{figure} 207 | 208 | -------------------------------------------------------------------------------- /Volume4/SpectralMethod2/figures/spectral2_derivative_example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/SpectralMethod2/figures/spectral2_derivative_example.pdf -------------------------------------------------------------------------------- /Volume4/SpectralMethod2/figures/variable_speed_advection.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/SpectralMethod2/figures/variable_speed_advection.pdf -------------------------------------------------------------------------------- /Volume4/SpectralMethod2/figures/wave_equation_barrier.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/SpectralMethod2/figures/wave_equation_barrier.pdf -------------------------------------------------------------------------------- /Volume4/TotalVariation/figures/balloon_diffusion.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/TotalVariation/figures/balloon_diffusion.pdf -------------------------------------------------------------------------------- /Volume4/TotalVariation/figures/balloon_gray.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/TotalVariation/figures/balloon_gray.pdf -------------------------------------------------------------------------------- /Volume4/TotalVariation/figures/balloon_noise.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/TotalVariation/figures/balloon_noise.pdf -------------------------------------------------------------------------------- /Volume4/TotalVariation/figures/balloon_total_variation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/TotalVariation/figures/balloon_total_variation.pdf -------------------------------------------------------------------------------- /Volume4/TotalVariation/figures/min_surface_area.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/TotalVariation/figures/min_surface_area.pdf -------------------------------------------------------------------------------- /Volume4/WaveEquation/figures/prob2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/Volume4/WaveEquation/figures/prob2.pdf -------------------------------------------------------------------------------- /by.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/by.pdf -------------------------------------------------------------------------------- /compile_labs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Compile the main tex files and ensure that there are no errors. 3 | 4 | MAX_TIME=60 5 | FILES=(PythonEssentials DataScienceEssentials Volume1 Volume2 Volume3 Volume4 GettingStarted) 6 | SUCCESS="true" 7 | LOG="_compilelog.errlog" 8 | SEP="====================" 9 | OUTDIR="docs" 10 | RED="\033[0;91m" # Red text color 11 | GREEN="\033[0;92m" # Green text color 12 | CYAN="\033[0;96m" # Cyan text color 13 | NC="\033[0m" # No text color 14 | 15 | set -e 16 | 17 | # Ignore command line arguments. 18 | if [ "$#" -ne 0 ]; then 19 | echo "usage: ./compile_labs.sh" 20 | exit 1 21 | fi 22 | 23 | # Check that latexmk is installed. 24 | # command -v latexmk &> /dev/null || { echo "'latexmk' not found!"; exit 1; } 25 | 26 | # Create a directory to deposit the labs in. 27 | if [ ! -e "${OUTDIR}" ]; then 28 | mkdir "${OUTDIR}" 29 | fi 30 | 31 | # Compile each tex file in one minute or less. 32 | function ctimeout() { perl -e "alarm ${MAX_TIME}; exec @ARGV" "$@"; } 33 | echo -e "${CYAN}Compiling labs with latexmk${NC}" 34 | for FILE in ${FILES[@]}; do 35 | LOGFILE="${FILE}${LOG}" 36 | echo -n " ${FILE}.tex..." 37 | if ctimeout latexmk -pdf -outdir="${OUTDIR}" "${FILE}.tex" &> "${LOGFILE}"; then 38 | echo -e "${GREEN}success!${NC}" 39 | else 40 | # Report and record a failure, then move on to the next file. 41 | echo -e "${RED}FAILURE${NC}" 42 | SUCCESS="false" 43 | fi 44 | done 45 | 46 | # If any of the compilations failed, print the end of each compile log. 47 | if [ "$SUCCESS" == "false" ]; then 48 | echo -en "\n${RED}LAB COMPILATION FAILED${NC}" 49 | for FILE in ${FILES[@]}; do 50 | echo -e "\n\n${SEP} ${FILE} Compiler Log ${SEP}\n" 51 | LOGFILE="${FILE}${LOG}" 52 | tail "${LOGFILE}" 53 | rm "${LOGFILE}" 54 | done 55 | echo 56 | exit 1 57 | else # If successful, delete compile logs and check that PDF files exist. 58 | for FILE in ${FILES[@]}; do 59 | rm "${FILE}${LOG}" 60 | if [ ! -e "${OUTDIR}/${FILE}.pdf" ]; then 61 | echo -e "\nFAILURE: ${OUTDIR}/${FILE}.pdf does not exist\n" 62 | exit 1 63 | fi 64 | done 65 | fi 66 | 67 | echo -e "\n${GREEN}LABS SUCCESSFULLY COMPILED${NC}\n" 68 | -------------------------------------------------------------------------------- /contributors.tex: -------------------------------------------------------------------------------- 1 | \begin{contributors} 2 | 3 | % Professors 4 | \contributor{B.~Barker}{Brigham Young University} 5 | \contributor{E.~Evans}{Brigham Young University} 6 | \contributor{R.~Evans}{Brigham Young University} 7 | \contributor{J.~Grout}{Drake University} 8 | \contributor{J.~Humpherys}{Brigham Young University} 9 | \contributor{T.~Jarvis}{Brigham Young University} 10 | \contributor{J.~Whitehead}{Brigham Young University} 11 | 12 | % Students 13 | \contributor{J.~Adams}{Brigham Young University} 14 | \contributor{K.~Baldwin}{Brigham Young University} 15 | \contributor{J.~Bejarano}{Brigham Young University} 16 | \contributor{J.~Bennett}{Brigham Young University} 17 | \contributor{A.~Berry}{Brigham Young University} 18 | \contributor{Z.~Boyd}{Brigham Young University} 19 | \contributor{M.~Brown}{Brigham Young University} 20 | \contributor{A.~Carr}{Brigham Young University} 21 | \contributor{C.~Carter}{Brigham Young University} 22 | \contributor{S.~Carter}{Brigham Young University} 23 | \contributor{T.~Christensen}{Brigham Young University} 24 | \contributor{M.~Cook}{Brigham Young University} 25 | \contributor{M.~Cutler}{Brigham Young University} 26 | \contributor{R.~Dorff}{Brigham Young University} 27 | \contributor{B.~Ehlert}{Brigham Young University} 28 | \contributor{O.~Escobar Rodriguez}{Brigham Young University} 29 | \contributor{M.~Fabiano}{Brigham Young University} 30 | \contributor{K.~Finlinson}{Brigham Young University} 31 | \contributor{J.~Fisher}{Brigham Young University} 32 | \contributor{R.~Flores}{Brigham Young University} 33 | \contributor{R.~Fowers}{Brigham Young University} 34 | \contributor{A.~Frandsen}{Brigham Young University} 35 | \contributor{R.~Fuhriman}{Brigham Young University} 36 | \contributor{T.~Gledhill}{Brigham Young University} 37 | \contributor{S.~Giddens}{Brigham Young University} 38 | \contributor{C.~Gigena}{Brigham Young University} 39 | \contributor{M.~Graham}{Brigham Young University} 40 | \contributor{F.~Glines}{Brigham Young University} 41 | \contributor{C.~Glover}{Brigham Young University} 42 | \contributor{M.~Goodwin}{Brigham Young University} 43 | \contributor{R.~Grout}{Brigham Young University} 44 | \contributor{D.~Grundvig}{Brigham Young University} 45 | \contributor{S.~Halverson}{Brigham Young University} 46 | \contributor{E.~Hannesson}{Brigham Young University} 47 | \contributor{S.~Harding}{Brigham Young University} 48 | \contributor{K.~Harmer}{Brigham Young University} 49 | \contributor{J.~Henderson}{Brigham Young University} 50 | \contributor{J.~Hendricks}{Brigham Young University} 51 | \contributor{A.~Henriksen}{Brigham Young University} 52 | \contributor{I.~Henriksen}{Brigham Young University} 53 | \contributor{B.~Hepner}{Brigham Young University} 54 | \contributor{C.~Hettinger}{Brigham Young University} 55 | \contributor{S.~Horst}{Brigham Young University} 56 | \contributor{R.~Howell}{Brigham Young University} 57 | \contributor{E.~Ibarra-Campos}{Brigham Young University} 58 | \contributor{K.~Jacobson}{Brigham Young University} 59 | \contributor{R.~Jenkins}{Brigham Young University} 60 | \contributor{J.~Larsen}{Brigham Young University} 61 | \contributor{J.~Larsen}{Brigham Young University} 62 | \contributor{J.~Leete}{Brigham Young University} 63 | \contributor{Q.~Leishman}{Brigham Young University} 64 | \contributor{J.~Lytle}{Brigham Young University} 65 | \contributor{E.~Manner}{Brigham Young University} 66 | \contributor{M.~Matsushita}{Brigham Young University} 67 | \contributor{R.~McMurray}{Brigham Young University} 68 | \contributor{S.~McQuarrie}{Brigham Young University} 69 | \contributor{E.~Mercer}{Brigham Young University} 70 | \contributor{D.~Miller}{Brigham Young University} 71 | \contributor{J.~Morrise}{Brigham Young University} 72 | \contributor{M.~Morrise}{Brigham Young University} 73 | \contributor{A.~Morrow}{Brigham Young University} 74 | \contributor{J.~Murphey}{Brigham Young University} 75 | \contributor{R.~Murray}{Brigham Young University} 76 | \contributor{J.~Nelson}{Brigham Young University} 77 | \contributor{C.~Noorda}{Brigham Young University} 78 | \contributor{A.~Oldroyd}{Brigham Young University} 79 | \contributor{J.~Oliphant}{Brigham Young University} 80 | \contributor{A.~Oveson}{Brigham Young University} 81 | \contributor{E.~Parkinson}{Brigham Young University} 82 | \contributor{M.~Probst}{Brigham Young University} 83 | \contributor{M.~Proudfoot}{Brigham Young University} 84 | \contributor{D.~Reber}{Brigham Young University} 85 | \contributor{H.~Ringer}{Brigham Young University} 86 | \contributor{C.~Robertson}{Brigham Young University} 87 | \contributor{M.~Russell}{Brigham Young University} 88 | \contributor{K.~Sandall}{Brigham Young University} 89 | \contributor{R.~Sandberg}{Brigham Young University} 90 | \contributor{C.~Sawyer}{Brigham Young University} 91 | \contributor{N.~Schill}{Brigham Young University} 92 | \contributor{N.~Sill}{Brigham Young University} 93 | \contributor{D.~Smith}{Brigham Young University} 94 | \contributor{J.~Smith}{Brigham Young University} 95 | \contributor{P.~Smith}{Brigham Young University} 96 | \contributor{M.~Stauffer}{Brigham Young University} 97 | \contributor{E.~Steadman}{Brigham Young University} 98 | \contributor{J.~Stewart}{Brigham Young University} 99 | \contributor{S.~Suggs}{Brigham Young University} 100 | \contributor{A.~Tate}{Brigham Young University} 101 | \contributor{T.~Thompson}{Brigham Young University} 102 | \contributor{B.~Trendler}{Brigham Young University} 103 | \contributor{M.~Victors}{Brigham Young University} 104 | \contributor{E.~Walker}{Brigham Young University} 105 | \contributor{J.~Webb}{Brigham Young University} 106 | \contributor{R.~Webb}{Brigham Young University} 107 | \contributor{J.~West}{Brigham Young University} 108 | \contributor{R.~Wonnacott}{Brigham Young University} 109 | \contributor{A.~Zaitzeff}{Brigham Young University} 110 | 111 | \end{contributors} 112 | 113 | % Use the following command to get all contributor usernames: 114 | % git log --pretty=format:"%an" --since="1/3/2010" | sort | uniq 115 | -------------------------------------------------------------------------------- /docs/DataScienceEssentials.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/docs/DataScienceEssentials.pdf -------------------------------------------------------------------------------- /docs/GettingStarted.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/docs/GettingStarted.pdf -------------------------------------------------------------------------------- /docs/PythonEssentials.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/docs/PythonEssentials.pdf -------------------------------------------------------------------------------- /docs/Volume1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/docs/Volume1.pdf -------------------------------------------------------------------------------- /docs/Volume2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/docs/Volume2.pdf -------------------------------------------------------------------------------- /docs/Volume3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/docs/Volume3.pdf -------------------------------------------------------------------------------- /docs/Volume4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foundations-of-Applied-Mathematics/Labs/f841ddb9e8ed9251c9ef178b8687c9a6d909f13f/docs/Volume4.pdf -------------------------------------------------------------------------------- /newsiambk10.clo: -------------------------------------------------------------------------------- 1 | \ProvidesFile{newsiambk10.clo} 2 | [2000/05/03 v1.5 3 | Customized LaTeX file (size option)] 4 | \renewcommand\normalsize{% 5 | \@setfontsize\normalsize\@xpt\@xiipt 6 | \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ 7 | \abovedisplayshortskip \z@ \@plus3\p@ 8 | \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ 9 | \belowdisplayskip \abovedisplayskip 10 | \let\@listi\@listI} 11 | \normalsize 12 | \newcommand\small{% 13 | \@setfontsize\small\@ixpt{11}% 14 | \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ 15 | \abovedisplayshortskip \z@ \@plus2\p@ 16 | \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ 17 | \def\@listi{\leftmargin\leftmargini 18 | \topsep 4\p@ \@plus2\p@ \@minus2\p@ 19 | \parsep 2\p@ \@plus\p@ \@minus\p@ 20 | \itemsep \parsep}% 21 | \belowdisplayskip \abovedisplayskip 22 | } 23 | \newcommand\footnotesize{% 24 | \@setfontsize\footnotesize\@viiipt{9.5}% 25 | \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@ 26 | \abovedisplayshortskip \z@ \@plus\p@ 27 | \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@ 28 | \def\@listi{\leftmargin\leftmargini 29 | \topsep 3\p@ \@plus\p@ \@minus\p@ 30 | \parsep 2\p@ \@plus\p@ \@minus\p@ 31 | \itemsep \parsep}% 32 | \belowdisplayskip \abovedisplayskip 33 | } 34 | \newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt} 35 | \newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt} 36 | \newcommand\large{\@setfontsize\large\@xiipt{14}} 37 | \newcommand\Large{\@setfontsize\Large\@xivpt{18}} 38 | \newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}} 39 | \newcommand\huge{\@setfontsize\huge\@xxpt{25}} 40 | \newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}} 41 | \if@twocolumn 42 | \setlength\parindent{1em} 43 | \else 44 | \setlength\parindent{24\p@} 45 | \fi 46 | \setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@} 47 | \setlength\medskipamount{6\p@ \@plus 2\p@ \@minus 2\p@} 48 | \setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@} 49 | \setlength\headheight{12\p@} 50 | \setlength\headsep {.25in} 51 | \setlength\topskip {10\p@} 52 | \setlength\footskip{.35in} 53 | \if@compatibility \setlength\maxdepth{4\p@} \else 54 | \setlength\maxdepth{.5\topskip} \fi 55 | \if@compatibility 56 | \if@twocolumn 57 | \setlength\textwidth{5in} 58 | \else 59 | \setlength\textwidth{5in} 60 | \fi 61 | \else 62 | \setlength\@tempdima{\paperwidth} 63 | \addtolength\@tempdima{-2in} 64 | \setlength\@tempdimb{5in} 65 | \if@twocolumn 66 | \ifdim\@tempdima>2\@tempdimb\relax 67 | \setlength\textwidth{2\@tempdimb} 68 | \else 69 | \setlength\textwidth{\@tempdima} 70 | \fi 71 | \else 72 | \ifdim\@tempdima>\@tempdimb\relax 73 | \setlength\textwidth{\@tempdimb} 74 | \else 75 | \setlength\textwidth{\@tempdima} 76 | \fi 77 | \fi 78 | \fi 79 | \if@compatibility\else 80 | \@settopoint\textwidth 81 | \fi 82 | \if@compatibility 83 | \setlength\textheight{41\baselineskip} 84 | \else 85 | \setlength\@tempdima{\paperheight} 86 | \addtolength\@tempdima{-2in} 87 | \addtolength\@tempdima{-1.5in} 88 | \divide\@tempdima\baselineskip 89 | \@tempcnta=\@tempdima 90 | \setlength\textheight{\@tempcnta\baselineskip} 91 | \fi 92 | \addtolength\textheight{\topskip} 93 | \if@twocolumn 94 | \setlength\marginparsep {10\p@} 95 | \else 96 | \setlength\marginparsep{7\p@} 97 | \fi 98 | \setlength\marginparpush{5\p@} 99 | \if@compatibility 100 | \setlength\oddsidemargin {.5in} 101 | \setlength\evensidemargin {1.5in} 102 | \setlength\marginparwidth {.75in} 103 | \if@twocolumn 104 | \setlength\oddsidemargin {30\p@} 105 | \setlength\evensidemargin {30\p@} 106 | \setlength\marginparwidth {48\p@} 107 | \fi 108 | \else 109 | \if@twoside 110 | \setlength\@tempdima {\paperwidth} 111 | \addtolength\@tempdima {-\textwidth} 112 | \setlength\oddsidemargin {.4\@tempdima} 113 | \addtolength\oddsidemargin {-1in} 114 | \setlength\marginparwidth {.6\@tempdima} 115 | \addtolength\marginparwidth {-\marginparsep} 116 | \addtolength\marginparwidth {-0.4in} 117 | \else 118 | \setlength\@tempdima {\paperwidth} 119 | \addtolength\@tempdima {-\textwidth} 120 | \setlength\oddsidemargin {.5\@tempdima} 121 | \addtolength\oddsidemargin {-1in} 122 | \setlength\marginparwidth {.5\@tempdima} 123 | \addtolength\marginparwidth {-\marginparsep} 124 | \addtolength\marginparwidth {-0.4in} 125 | \addtolength\marginparwidth {-.4in} 126 | \fi 127 | \ifdim \marginparwidth >2in 128 | \setlength\marginparwidth{2in} 129 | \fi 130 | \@settopoint\oddsidemargin 131 | \@settopoint\marginparwidth 132 | \setlength\evensidemargin {\paperwidth} 133 | \addtolength\evensidemargin{-2in} 134 | \addtolength\evensidemargin{-\textwidth} 135 | \addtolength\evensidemargin{-\oddsidemargin} 136 | \@settopoint\evensidemargin 137 | \fi 138 | \if@compatibility 139 | \setlength\topmargin{.75in} 140 | \else 141 | \setlength\topmargin{\paperheight} 142 | \addtolength\topmargin{-2in} 143 | \addtolength\topmargin{-\headheight} 144 | \addtolength\topmargin{-\headsep} 145 | \addtolength\topmargin{-\textheight} 146 | \addtolength\topmargin{-\footskip} % this might be wrong! 147 | \addtolength\topmargin{-.5\topmargin} 148 | \@settopoint\topmargin 149 | \fi 150 | \setlength\footnotesep{6.65\p@} 151 | \setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@} 152 | \setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} 153 | \setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 154 | \setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@} 155 | \setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} 156 | \setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 157 | \setlength\@fptop{0\p@ \@plus 1fil} 158 | \setlength\@fpsep{8\p@ \@plus 2fil} 159 | \setlength\@fpbot{0\p@ \@plus 1fil} 160 | \setlength\@dblfptop{0\p@ \@plus 1fil} 161 | \setlength\@dblfpsep{8\p@ \@plus 2fil} 162 | \setlength\@dblfpbot{0\p@ \@plus 1fil} 163 | \setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@} 164 | \def\@listi{\leftmargin\leftmargini 165 | \parsep 4\p@ \@plus2\p@ \@minus\p@ 166 | \topsep 8\p@ \@plus2\p@ \@minus4\p@ 167 | \itemsep4\p@ \@plus2\p@ \@minus\p@} 168 | \let\@listI\@listi 169 | \@listi 170 | \def\@listii {\leftmargin\leftmarginii 171 | \labelwidth\leftmarginii 172 | \advance\labelwidth-\labelsep 173 | \topsep 4\p@ \@plus2\p@ \@minus\p@ 174 | \parsep 2\p@ \@plus\p@ \@minus\p@ 175 | \itemsep \parsep} 176 | \def\@listiii{\leftmargin\leftmarginiii 177 | \labelwidth\leftmarginiii 178 | \advance\labelwidth-\labelsep 179 | \topsep 2\p@ \@plus\p@\@minus\p@ 180 | \parsep \z@ 181 | \partopsep \p@ \@plus\z@ \@minus\p@ 182 | \itemsep \topsep} 183 | \def\@listiv {\leftmargin\leftmarginiv 184 | \labelwidth\leftmarginiv 185 | \advance\labelwidth-\labelsep} 186 | \def\@listv {\leftmargin\leftmarginv 187 | \labelwidth\leftmarginv 188 | \advance\labelwidth-\labelsep} 189 | \def\@listvi {\leftmargin\leftmarginvi 190 | \labelwidth\leftmarginvi 191 | \advance\labelwidth-\labelsep} 192 | \setlength{\textwidth}{5in} 193 | \endinput 194 | %% 195 | %% End of file `bk10.clo'. 196 | --------------------------------------------------------------------------------