Menu

Helper Module for Deep Learning.

Module that defines common tools to process histograms in the context of MRI.

pynet.preprocessing.hist.get_first_mode(arr, remove_tail=True, remove_fraction=0.01)[source]

Computes the first (reliable) peak in the histogram.

Parameters

arr: array

the input data.

remove_tail: bool, default True

remove rare portions of histogram.

remove_fraction: float, default 0.01

discared the specified proportion of hist.

Returns

first_peak: int

index of the first peak.

pynet.preprocessing.hist.get_largest_mode(arr)[source]

Computes the largest (reliable) peak in the histogram.

Parameters

arr: array

the input data.

Returns

largest_peak: int

index of the largest peak.

pynet.preprocessing.hist.get_last_mode(arr, remove_tail=True, remove_fraction=0.05)[source]

Computes the last (reliable) peak in the histogram.

Parameters

arr: array

the input data.

remove_tail: bool, default True

remove rare portions of histogram.

remove_fraction: float, default 0.05

discared the specified proportion of hist.

Returns

last_peak: int

index of the last peak.

pynet.preprocessing.hist.smooth_hist(arr)[source]

Use KDE to get smooth estimate of the histogram.

Parameters

arr: array

the input data.

Returns

grid: array

domain of the PDF.

pdf: array

kernel density estimate of the PDF.

Follow us

© 2019, pynet developers .
Inspired by AZMIND template.