Preface
This series is aimed at providing tools for an electrical engineer to analyze data and solve problems in design. The focus is on applying linear algebra to systems of equations or large sets of matrix data.
Introduction
This article will attempt to organize the previous series of articles into a decision tree allowing you to quickly choose the best method for a particular problem.
Procedure
First, ask yourself some questions about your data and the type of answer you need.
- How many dimensions in your data set? Was this data capture or design intent?
- Do you need an exact answer or a best estimate?
- Are you expecting a single result or iterating over time? Are you looking for an asymptote at infinity?
- How many dimensions or values do you expect in your calculated result?
Methodology
Which method to use?
- Are you solving a system for equilibrium? Is this measurement data or a design problem?
- If this is a design problem then you will likely want an exact solution: np.linalg.solve
- If this is data is captured from the lab then a least squares solution is probably best: np.linalg.lstsq
- For economic problems use an Leontief Input-Output Model
- Are you forecasting? For situations where you need to curve fit to an equation.
- For exact fit use scipy.interpolate
- For a least squares fit use: np.polyfit
- Then use np.poly1d to build a polynomial and forecast
- Forecasting. For situations where you are evaluating flow over time or looking for an asymptote.
- To solve a network problem use adjacency matrices and matrix math
- For stochastic matrices use Markov chains
Summary
Hopefully this will provide you with the most common calculation requirements you will encounter.