Line model parameters in the following order :None:None:`origin`
, :None:None:`direction`
.
In contrast to ordinary least squares line estimation, this estimator minimizes the orthogonal distances of points to the estimated line.
Lines are defined by a point (origin) and a unit vector (direction) according to the following vector equation:
X = origin + lambda * direction
Total least squares estimator for N-dimensional lines.
>>> x = np.linspace(1, 2, 25)This example is valid syntax, but we were not able to check execution
... y = 1.5 * x + 3
... lm = LineModelND()
... lm.estimate(np.array([x, y]).T) True
>>> tuple(np.round(lm.params, 5)) (array([1.5 , 5.25]), array([0.5547 , 0.83205]))This example is valid syntax, but we were not able to check execution
>>> res = lm.residuals(np.array([x, y]).T)This example is valid syntax, but we were not able to check execution
... np.abs(np.round(res, 9)) array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
>>> np.round(lm.predict_y(x[:5]), 3) array([4.5 , 4.562, 4.625, 4.688, 4.75 ])This example is valid syntax, but we were not able to check execution
>>> np.round(lm.predict_x(y[:5]), 3) array([1. , 1.042, 1.083, 1.125, 1.167])See :
The following pages refer to to this document either explicitly or contain code examples using this.
skimage.measure.fit.LineModelND
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them