Remove is_degenerate methods from estimation models

This commit is contained in:
Johannes Schönberger
2013-05-02 18:30:08 +02:00
parent a73076157c
commit 8d92f5c02b
2 changed files with 0 additions and 76 deletions
-54
View File
@@ -94,24 +94,6 @@ class LineModel(BaseModel):
return dist - (x * math.cos(theta) + y * math.sin(theta))
@classmethod
def is_degenerate(cls, data):
"""Check whether set of points is degenerate.
Parameters
----------
data : (N, 2) array
N points with `(x, y)` coordinates, respectively.
Returns
-------
flag : bool
Flag indicating if data is degenerate.
"""
return data.shape[0] < 2
def predict_x(self, y, params=None):
"""Predict x-coordinates using the estimated model.
@@ -246,24 +228,6 @@ class CircleModel(BaseModel):
return r - np.sqrt((x - xc)**2 + (y - yc)**2)
@classmethod
def is_degenerate(cls, data):
"""Check whether set of points is degenerate.
Parameters
----------
data : (N, 2) array
N points with `(x, y)` coordinates, respectively.
Returns
-------
flag : bool
Flag indicating if data is degenerate.
"""
return data.shape[0] < 3
def predict_xy(self, t, params=None):
"""Predict x- and y-coordinates using the estimated model.
@@ -450,24 +414,6 @@ class EllipseModel(BaseModel):
return residuals
@classmethod
def is_degenerate(cls, data):
"""Check whether set of points is degenerate.
Parameters
----------
data : (N, 2) array
N points with `(x, y)` coordinates, respectively.
Returns
-------
flag : bool
Flag indicating if data is degenerate.
"""
return data.shape[0] < 5
def predict_xy(self, t, params=None):
"""Predict x- and y-coordinates using the estimated model.
-22
View File
@@ -41,28 +41,6 @@ class GeometricTransform(object):
"""
raise NotImplementedError()
@classmethod
def is_degenerate(cls, src, dst):
"""Check whether set of points is degenerate.
Parameters
----------
src : (N, 2) array
Source coordinates.
dst : (N, 2) array
Destination coordinates.
Returns
-------
flag : bool
Flag indicating if data is degenerate.
"""
# by default never degenerate since system equations can be under-,
# well- and over-determined.
return False
def residuals(self, src, dst):
"""Determine residuals of transformed destination coordinates.