magni.cs.phase_transition._analysis module

Module providing functionality for analysing the simulation results.

Routine listings

run(path, label)
Determine the phase transition from the simulation results.

See also

magni.cs.phase_transition.config
Configuration options.

Notes

For a description of the concept of phase transition, see [1].

References

[1]C. S. Oxvig, P. S. Pedersen, T. Arildsen, and T. Larsen, “Surpassing the Theoretical 1-norm Phase Transition in Compressive Sensing by Tuning the Smoothed l0 Algorithm”, in IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Vancouver, Canada, May 26-31, 2013, pp. 6019-6023.
magni.cs.phase_transition._analysis.run(path, label)[source]

Determine the phase transition from the simulation results.

The simulation results should be present in the HDF5 database specified by path in the pytables group specified by label in an array named ‘dist’. The determined phase transition (50% curve) is stored in the same HDF5 database, in the same HDF group in an array named ‘phase_transition’. Additionally, the 10%, 25%, 75%, and 90% percentiles are stored in an array named ‘phase_transition_percentiles’.

Parameters:
  • path (str) – The path of the HDF5 database.
  • label (str) – The path of the pytables group in the HDF5 database.

See also

_estimate_PT()
The actual phase transition estimation.

Notes

A simulation is considered successful if the simulation result is less than a normalised mean squared error tolerance computed as 10^(-SNR/10) wtih SNR configured in the configuration module.

magni.cs.phase_transition._analysis._built_in_logit_solver(dist, percentiles)[source]

Fit a logistic regression model using the built-in solver.

Parameters:
  • dist (ndarray) – The simulated signal “distances” in the phase space.
  • percentiles (list or tuple) – The percentiles to estimate.
Returns:

rho (ndarray) – The “len(percentiles)”-by-“len(delta)” array of estimated phase transition rho vectors. The phase transition rho vectors are (in order): 50% (the phase transition esitmate), smaller to larger percentiles.

magni.cs.phase_transition._analysis._estimate_PT(rho, success, percentiles)[source]

Estimate the phase transition location for a given delta.

The phase transition location is estimated using logistic regression. The algorithm used for this is Newton’s method.

Parameters:
  • rho (ndarray) – The rho values.
  • success (ndarray) – The success indicators.
  • percentiles (list or tuple) – The percentiles to estimate.
Returns:

rho (float) – The estimated phase transition location.

Notes

The function includes a number of non-standard ways of handling numerical and convergence related issues. This will be changed in a future version of the code.

magni.cs.phase_transition._analysis._sklearn_logit_solver(dist, percentiles)[source]

Fit a logistic regression model using the solver from scikit-learn.

Parameters:
  • dist (ndarray) – The simulated signal “distances” in the phase space.
  • percentiles (list or tuple) – The percentiles to estimate.
Returns:

rho (ndarray) – The “len(percentiles)”-by-“len(delta)” array of estimated phase transition rho vectors. The phase transition rho vectors are (in order): 50% (the phase transition esitmate), smaller to larger percentiles.