Running MRSMS for several \(\lambda\)‘s and \(\mu\)‘s¶
-
medianshape.experiment.median.runmedians.runmedians2d(mesh, simplices, subsimplices, input_currents, lambdas, mus, 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\)) and a list of mass regularizing factors(\(\mu\)). Calls Median shape LP and gets median shape and flat norm decomposition for each combinations of lambda and mu. 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).
- 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.median.runmedians.runmedians3d(mesh, simplices, subsimplices, input_currents, lambdas, mus, 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\)) and a list of mass regularizing factors(\(\mu\)). Calls Median shape LP and gets median shape and flat norm decomposition for each combinations of lambda and mu. 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).
- 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