VelocerMở ứng dụng

Velocer › Thẻ ghi nhớ › University of Wisconsin–Madison › BME 603: Computational Biological Modeling · UW-Madison

BME 603: Computational Biological Modeling · UW-Madison

My BME 603 cards from this semester, mostly computational biological modeling. good to run through before the midterm. · bởi quiet_kernel · 129 thẻ

University of Wisconsin–Madison

Học bộ thẻ này Nhúng

  1. What is the focus of computational methods in biological modeling and simulation?Using computational techniques to build and simulate models of biological systems.
  2. Why is Git important in a computational modeling course?It provides version control, letting you track changes to code and collaborate reproducibly.
  3. What is the role of simulation in biological modeling?Simulation runs a model numerically to predict or explore the behavior of a biological system over time.
  4. In Python, what index refers to the first base of a DNA sequence stored as a string?Index 0, written seq[0].
  5. What does seq[-1] return for a DNA string?The last base of the sequence.
  6. In Python slicing seq[start:stop], is the base at index stop included?No, slicing excludes the stop index; seq[0:3] returns the first three bases (the first codon).
  7. Which string method returns the first position of a motif in a sequence?.find(motif) returns the first position of the motif.
  8. How do you transcribe a DNA string to RNA using a string method?Use .replace('T','U') to replace thymine with uracil.
  9. Which string method counts occurrences of a motif, and what does .upper() do?.count(motif) counts occurrences; .upper() normalizes case by converting to uppercase.
  10. How is GC content calculated?GC content = (#G + #C) / sequence length.
  11. What are two ways to compute GC content in Python?A counting loop (optionally with a dictionary) or using .count('G') and .count('C').
  12. What Python construct would you use to repeat population doubling until a time limit is reached?A while loop.
  13. What does enumerate provide when looping over a sequence?It yields both the index and the value of each element.
  14. What is a list comprehension used for?To build a list concisely from an iterable, often applying a condition or transformation in one expression.
  15. What is a default argument in a Python function, and give an example from the section?A parameter with a preset value used when no argument is supplied, e.g., a motif finder with overlap=False.
  16. What do classes bundle together?Data (attributes) and behavior (methods).
  17. What does it mean to view a matrix A as a linear map?It maps a vector x to Ax = b, and it is linear: A(αx + βy) = αAx + βAy.
  18. What geometric effect do orthogonal matrices have?They rotate or reflect vectors while preserving lengths.
  19. What geometric effect does a diagonal matrix have?It stretches (or scales) vectors along the coordinate axes.
  20. What does a projection matrix do geometrically?It drops vectors to a lower-dimensional subspace.
  21. In NumPy, what does an array's .shape attribute tell you?It gives the dimensions as (rows, columns).
  22. What is the difference between A @ B and A * B in NumPy?A @ B is matrix multiplication (composition), while A * B is element-wise multiplication.
  23. Give the formula for the entries of a matrix product AB.(AB)_{ij} = Σ_k A_{ik} B_{kj}.
  24. What is the trace of a matrix?The sum of its diagonal entries.
  25. Why is np.linalg.solve(A, b) preferred over forming A^{-1}?It solves Ax = b directly and is numerically more stable and efficient than computing an inverse.
  26. When is an n×n matrix A invertible?Exactly when its rank equals n.
  27. How do you set up a matrix to balance a chemical reaction using a nullspace?Rows are elements and columns are compounds, with reactants positive and products negative; solve Ax = 0.
  28. After finding the nullspace vector for a chemical reaction, what must you do to get the balanced equation?Scale the nullspace vector to the smallest integers.
  29. Which NumPy function builds an identity matrix?np.eye.
  30. Which NumPy function builds a diagonal matrix or extracts a diagonal?np.diag.
  31. What do np.triu and np.tril do?They return the upper or lower triangular part of a matrix, respectively.
  32. Which NumPy function computes the Frobenius norm of a matrix?np.linalg.norm.
  33. What is the goal of interpolation?To find a function that passes through all measured data points, allowing estimates at intermediate values (e.g., estimating blood glucose at t = 3 h from readings at 0, 2, 4, 6 h).
  34. Given n+1 data points, what degree polynomial is guaranteed to interpolate them uniquely?A unique polynomial of degree at most n satisfying p(x_i) = y_i for all points.
  35. What is the Vandermonde matrix in polynomial interpolation?The matrix arising from the monomial basis 1, x, ..., x^n, where row i is (1, x_i, x_i^2, ..., x_i^n); solving A c = y gives the coefficients.
  36. What are the main drawbacks of the monomial basis for interpolation?Solving the linear system is costly, and adding a new data point changes all the coefficients.
  37. What property defines the Lagrange basis polynomials L_j?L_j(x_i) = 1 if i = j and 0 otherwise, so each basis polynomial is 1 at its own node and 0 at all others.
  38. Give the formula for the Lagrange basis polynomial L_j(x).L_j(x) = product over i ≠ j of (x − x_i)/(x_j − x_i).
  39. What is a key advantage of the Lagrange basis over the monomial basis?No matrix solve is needed, and the coefficients in p(x) = Σ y_j L_j(x) are simply the data values.
  40. What basis functions are used in the Newton basis?1, (x − x_0), (x − x_0)(x − x_1), and so on, with each new basis function multiplying by another (x − x_k) factor.
  41. What are the coefficients in the Newton basis called and how are they obtained?They are divided differences, computed recursively.
  42. What is the main advantage of the Newton basis when a new data point is added?Only one new term is added and earlier coefficients stay fixed, so the interpolant can be updated cheaply (e.g., for a new hourly sensor reading).
  43. How should a Newton-basis polynomial be evaluated efficiently?Using nested (Horner-style) multiplication.
  44. What is the motivation for numerical differentiation in oral absorption pharmacokinetics?To estimate dC/dt from measured plasma concentrations, which helps determine absorption rate k_a and elimination rate k_e.
  45. How are finite difference formulas derived, and where does the truncation error come from?They are derived from Taylor expansions of f(x_0 ± h); the leftover higher-order terms give the truncation error.
  46. What is the forward difference formula for the first derivative and its error order?(f_1 - f_0)/h, with error O(h) (first order).
  47. What is the backward difference formula for the first derivative and its error order?(f_0 - f_{-1})/h, with error O(h) (first order).
  48. What is the central difference formula for the first derivative and its error order?(f_1 - f_{-1})/(2h), with error O(h^2) (second order).
  49. What is the second-order forward difference formula for the first derivative?(-3f_0 + 4f_1 - f_2)/(2h), with error O(h^2).
  50. What is the central difference formula for the second derivative and its error order?(f_{-1} - 2f_0 + f_1)/h^2, with error O(h^2).
  51. How does halving h affect the error of a first-order method versus a second-order method?First-order: halving h halves the error. Second-order: halving h quarters the error.
  52. What important application uses the three-point second-derivative stencil?It is the building block of the discrete Laplacian used in diffusion PDEs.
  53. How much does halving h reduce the error when using Richardson extrapolation?It cuts the error by a factor of 16 (16×).
  54. What are the costs of Richardson extrapolation?More function evaluations and a wider stencil.
  55. In the notation f_j = f(x_0 + jh), what does the subscript j represent?The grid offset from x_0: j = 0 is x_0, j = 1 is x_0 + h, j = -1 is x_0 - h, etc.
  56. What does the area under the plasma concentration-time curve (AUC) represent?Total drug exposure (bioavailability). Because concentration data are discrete, the AUC is computed by numerical integration.
  57. What does the precision ρ of a quadrature rule measure?The highest polynomial degree that the rule integrates exactly.
  58. Which nodes does the trapezoidal rule use, and what is its precision?It uses only the endpoints of the interval; its precision is ρ = 1.
  59. What is the composite error order of the trapezoidal rule?O(h²) accuracy in the composite sense.
  60. Where is the node of the midpoint rule located, and how does its order compare to the trapezoid?One node at the interval midpoint (a+b)/2; precision ρ = 1, the same order as the trapezoidal rule.
  61. State Simpson's rule formula on [a,b] with midpoint m.∫ f ≈ (b−a)/6 · [f(a) + 4f(m) + f(b)], obtained by integrating the interpolating parabola.
  62. What is the precision and error order of Simpson's rule?Precision ρ = 3 with O(h⁴) error.
  63. What requirement does composite Simpson's rule place on the number of pieces r?r must be even (the interval is split into an even number of equal-width pieces).
  64. By what factor does the error shrink when h is halved for the trapezoidal rule versus Simpson's rule?Trapezoid: error shrinks 4×; Simpson: error shrinks 16×.
  65. What is interpolatory (Lagrange) quadrature?Integrating the interpolant of the function, which yields a weighted sum of function values using precomputed weights.
  66. What does scipy.integrate.quad do, and what does it return?It integrates a callable (e.g., the closed-form one-compartment curve) and returns an error estimate; it also accepts an infinite upper limit.
  67. What is the general form of an initial value problem for an ODE system?y'(t) = f(t, y) with y(0) = y₀.
  68. Why do nonlinear ODE systems require numerical solvers?They generally lack closed-form solutions, unlike linear systems which have closed forms.
  69. Write the update formula for backward (implicit) Euler.y_{i+1} = y_i + h·f(t_{i+1}, y_{i+1}), requiring a solve at each step.
  70. How is each backward Euler step solved for linear versus nonlinear f?A linear solve for linear f, or Newton's method for nonlinear f.
  71. For the linear system y' = Jy, what is the backward Euler update in matrix form?y_{i+1} = (I - hJ)^{-1} y_i.
  72. What stability property does backward Euler have for linear problems, and what is it used for?It is unconditionally stable for linear problems and is the tool for stiff systems.
  73. Write the RK4 update formula.y_{i+1} = y_i + (k₁ + 2k₂ + 2k₃ + k₄)/6.
  74. What is the global error order of RK4, and how many function evaluations per step does it use?Global error O(h⁴), with four evaluations per step.
  75. Which SciPy function and method are used for adaptive-step IVP solving, and which tolerances control it?scipy.integrate.solve_ivp with method='RK45', controlled by rtol and atol.
  76. What is the difference between the out-degree and in-degree of a node in a directed graph?Out-degree is the number of edges leaving the node; in-degree is the number of edges entering it.
  77. How does PageRank differ from simple degree-based ranking?Degree only counts connections, while PageRank scores importance recursively so that links from important nodes count more.
  78. Describe the random surfer model underlying PageRank.With probability α the surfer follows a random out-edge; otherwise they teleport to a uniformly random node. PageRank is the long-run fraction of time spent at each node.
  79. How is the transition matrix M built from the adjacency matrix A?Divide each column of A by the out-degree of that column's node, making M column-stochastic; M_ij is the probability of moving from j to i.
  80. What equation defines PageRank as a stationary distribution?r = M r, i.e., the eigenvector of M with eigenvalue 1.
  81. What are dangling nodes and how are they handled?Dangling nodes have no out-edges, producing zero columns in M. They are fixed by replacing each zero column with 1/n.
  82. Define the Google matrix G.G = αM + (1−α)(1/n) 1 1ᵀ, a blend of the link-following transition matrix and uniform teleportation.
  83. What damping factor α did the original PageRank use?α = 0.85, meaning an 85% chance of following an out-edge and 15% chance of teleporting.
  84. What problems does the Google matrix fix?It fixes disconnected, periodic, and absorbing graph structures that would otherwise break the stationary distribution.
  85. What does the Perron–Frobenius theorem guarantee for the Google matrix?A positive column-stochastic G has a unique positive dominant eigenvector, and all other eigenvalues have magnitude less than 1.
  86. Describe the power iteration method for computing PageRank.Start with a uniform vector and repeatedly apply r ← G r until the change falls below a tolerance.
  87. What is a biological application of PageRank?Ranking proteins in interaction networks by their importance.
  88. What two components must every recursive function have?A base case (which stops the recursion) and a recursive case (which calls the function on a smaller problem).
  89. What two properties must a problem have for dynamic programming to apply?Optimal substructure (optimal solutions built from optimal subproblem solutions) and overlapping subproblems (the same subproblems recur).
  90. What is memoization?Top-down recursion combined with a cache (e.g., a dictionary) so each subproblem is solved only once.
  91. What is tabulation?A bottom-up approach that fills a table with a loop, solving problems from smallest to largest; it is the most common DP pattern.
  92. In the longest common subsequence problem, what does a subsequence allow that a substring does not?A subsequence keeps characters in order but need not be contiguous.
  93. In the LCS DP table, what does dp[i][j] represent?The length of the LCS of the first i characters of one string and the first j characters of the other.
  94. What are the base row and column values for the LCS table, and its time complexity?The base row and column are all 0; the algorithm costs O(mn).
  95. How do you recover the actual longest common subsequence from the DP table?Trace back through the table from the bottom-right cell, following the choices that produced each value.
  96. When counting occurrences of pattern Q as a subsequence of S, what is the recurrence if the last characters match?Count both possibilities: using the match (recurse on both prefixes) plus skipping it (recurse on S without its last character).
  97. When counting subsequence occurrences of Q in S, what happens if the last characters do not match?You can only skip the last character of S and recurse; the match branch is unavailable.
  98. What are the base cases for counting subsequence occurrences of pattern Q in string S?An empty pattern counts as 1 occurrence; an empty S with a nonempty Q counts as 0.
  99. What three operations does edit distance allow, and what does it measure?Insertions, deletions, and substitutions; it measures the minimum number of these needed to transform one string into another.
  100. What is the edit distance recurrence when characters match versus mismatch?Match: take the diagonal value. Mismatch: 1 + min(diagonal, top, left).
  101. What are the base cases for the edit distance DP table?dp[i][0] = i (delete all of the first string) and dp[0][j] = j (insert all of the second string).
  102. In a pairwise alignment, what do mismatches and gaps represent?Mismatches imply substitutions; gaps imply insertions or deletions (indels).
  103. How is an alignment score computed?It is the sum of state scores (match, mismatch, gap). For example, with match +1, mismatch 0, gap -1, an alignment with 8 matches, 2 mismatches, and 1 gap scores 7.
  104. In a dynamic programming alignment grid, what do the diagonal, down, and right moves represent?Diagonal = (mis)match, down = deletion, right = insertion.
  105. What is the Needleman-Wunsch recurrence?M(i,j) = max{ M(i-1,j) + gap, M(i,j-1) + gap, M(i-1,j-1) + S(i,j) }, starting at M(0,0)=0 and tracing back from the bottom-right.
  106. What type of alignment does Needleman-Wunsch perform and what is its complexity?It performs global alignment in O(mn) time and space.
  107. How does Smith-Waterman differ from Needleman-Wunsch?It is local alignment: the recurrence adds a 0 option, the first row and column are 0, and traceback starts at the highest cell and stops at a 0.
  108. When should you use global vs. local alignment?Global suits similar, equal-length sequences; local suits finding shared domains within dissimilar sequences.
  109. Why are affine gap penalties biologically motivated?A long gap is usually a single evolutionary event (e.g., a transposon insertion/deletion), so it should cost less than many separate short gaps.
  110. What are the common types of gap penalty schemes?Constant, linear (length × cost), affine (opening + extension × (length − 1)), and convex (e.g., logarithmic).
  111. Are transitions or transversions usually penalized less, and why?Transitions (purine↔purine A/G, pyrimidine↔pyrimidine C/T) are cheaper than transversions (purine↔pyrimidine), since they are more common substitutions.
  112. What substitution matrix is standard for protein alignment?BLOSUM62.
  113. Why do protein alignments need a full amino-acid substitution matrix?Because amino acids have varying chemical similarity and substitution frequencies, so scoring must reflect conservative vs. radical replacements rather than simple identity.
  114. Why can ties in the DP recurrence produce multiple optimal alignments?When several moves yield the same maximum score, more than one traceback path is optimal, giving multiple optimal alignments.
  115. What is the key difference between rational design and directed evolution in protein engineering?Rational design uses knowledge of protein structure and function to make targeted changes; directed evolution generates random variants and selects those with desired traits.
  116. What is a perceptron?A perceptron computes a weighted sum of its inputs and applies a threshold to produce an output.
  117. How does the perceptron learning rule update weights?It updates weights when the perceptron makes a mistake, adjusting them to reduce the error.
  118. What kind of problem can a perceptron not solve, and why?It fails on data that are not linearly separable, such as XOR, because a single threshold can only separate linearly separable classes.
  119. What does backpropagation do in a neural network?Backpropagation computes the gradients of the loss with respect to the network's weights, enabling gradient descent updates.
  120. What role does the learning rate play in gradient descent?The learning rate sets the step size of each weight update during gradient descent.
  121. How do regression networks learn?They minimize a loss function by gradient descent, using backpropagation to compute gradients.
  122. What is stochastic gradient descent?A gradient descent variant that updates weights using subsets of the data rather than the full dataset.
  123. What is mini-batch gradient descent?Gradient descent that updates weights from small subsets (mini-batches) of the training data.
  124. What is a multilayer perceptron (MLP)?A network of stacked fully connected layers, which can solve XOR when it uses nonlinear activations.
  125. Why can an MLP solve XOR when a single perceptron cannot?Nonlinear activations in its hidden layers let it learn nonlinear decision boundaries.
  126. What is a dead neuron?A neuron that stops contributing to learning, typically because its activation or gradients become stuck at zero.
  127. What is the difference between overfitting and underfitting?Overfitting means the model fits training data too closely and generalizes poorly; underfitting means it fails to capture the underlying pattern even on training data.
  128. What is the difference between parameters and hyperparameters?Parameters are learned from data during training (e.g., weights), while hyperparameters are chosen beforehand (e.g., learning rate).
  129. What is a fully connected layer?A layer in which each neuron is connected to every neuron in the previous layer.

Velocer miễn phí: ôn tập ngắt quãng và thẻ của riêng bạn từ bất kỳ tài liệu nào.

PDF to flashcards · Lecture to flashcards · Practice exam · Syllabus study plan · Anki import

Thêm bộ thẻ của University of Wisconsin–Madison