Running median shape¶
-
medianshape.experiment.deform.rundeforms.rundeforms2d(mesh, simplices, subsimplices, input_currents, lambdas, mus, alphas, w=None, v=None, b_matrix=None, file_doc=None, save=True, outdir='data', figcount=2)[source]¶ Accepts simplicial settings, input currents, a list of multiscale factors(\(\lambda\)), a list of mass regularizing factors(\(\mu\)), and a list of weights for deformation. Calls Median shape LP and gets a deformed current and flat norm decomposition for each combinations of lambda, mu and weights. It calls plotting function from ‘medianshape.viz’ which can save them as pdf and/or separate figures.Let K be an underlying simplicial complex of dimension q.
Parameters: - mesh (float) – an instance of Mesh3D class in ‘medianshape.simplicial/mesh’.
- simplices (int) – (p+1)-simplices in K, an array of dimension (nx(p+1)) where \(p+1 \leq q\) and n is the number of p+1-simplices in K.
- subsimplices (int) – p-simplices in K, an array of dimension (mxp) where \(p \leq q\) and m is the number of p-simplice in K.
- input_currents (int) – input currents, an array of dimension kxm where k is the number of input currents.
- lambdas (float) – a list or an array of multiscale factors.
- mu (float) – Mass regularizing factor (no mass regularization when set to 0).
- alphas (float) – a set of weights for deformation.
- w (float) – a vector of subsimplices volumes.
- v (float) – a vector of simplices volumes.
- b_matrix (int) – a boundary matrix representing the boundary operator \(\partial_{p+1}\) of K.
- file_doc (object) – a file object to which plotted figures are saved. An instance of ‘matplotlib.backends.backend_pdf.PdfPages’.
- save (bool) – a boolean flag to indicate whether to save the experiment results.
- outdir (str) – The name of a directory to which the experiment result is saved.
- figcount (int) – The starting index for figures.
Returns: None
-
medianshape.experiment.deform.rundeforms.rundeforms3d(mesh, simplices, subsimplices, input_currents, lambdas, mus, alphas, w=None, v=None, b_matrix=None, file_doc=None, save=True, outdir='data', figcount=1)[source]¶ Accepts simplicial settings, input currents, a list of multiscale factors(\(\lambda\)), a list of mass regularizing factors(\(\mu\)), and a list of weights for deformation. Calls Median shape LP and gets a deformed current and flat norm decomposition for each combinations of lambda, mu and weights. It calls plotting function from ‘medianshape.viz’ which can save them as pdf and/or separate figures.Let K be an underlying simplicial complex of dimension q.
Parameters: - mesh (float) – an instance of Mesh3D class in ‘medianshape.simplicial/mesh’.
- simplices (int) – (p+1)-simplices in K, an array of dimension (nx(p+1)) where \(p+1 \leq q\) and n is the number of p+1-simplices in K.
- subsimplices (int) – p-simplices in K, an array of dimension (mxp) where \(p \leq q\) and m is the number of p-simplice in K.
- input_currents (int) – input currents, an array of dimension kxm where k is the number of input currents.
- lambdas (float) – a list or an array of multiscale factors.
- mu (float) – Mass regularizing factor (no mass regularization when set to 0).
- alphas (float) – a set of weights for deformation.
- w (float) – a vector of subsimplices volumes.
- v (float) – a vector of simplices volumes.
- b_matrix (int) – a boundary matrix representing the boundary operator \(\partial_{p+1}\) of K.
- file_doc (object) – a file object to which plotted figures are saved. An instance of ‘matplotlib.backends.backend_pdf.PdfPages’.
- save (bool) – a boolean flag to indicate whether to save the experiment results.
- outdir (str) – The name of a directory to which the experiment result is saved.
- figcount (int) – The starting index for figures.
Returns: None