researchutils
master

Contents:

  • API Reference
    • Utilities related to arrays
    • Utilities related to chainer
    • Utilities related to files
    • Utilities related to images
    • Utilities related to math
      • Angle
      • Normalization
researchutils
  • Docs »
  • API Reference »
  • Utilities related to math
  • Edit on GitHub

Utilities related to math¶

Angle¶

researchutils.math.angle.fit_angle_in_deg_range(angles, min_angle=0.0, max_angle=360.0)[source]¶

Check angle range and correct the range

Parameters:
  • angle (array-like) – unit is degrees
  • min_angle (float) – maximum of range in degrees, default 0.0
  • max_angle (float) – minimum of range in degrees, default 360.0
Returns:

correct_angle – correct range angle in degrees

Return type:

numpy.ndarray

researchutils.math.angle.fit_angle_in_rad_range(angles, min_angle=0.0, max_angle=6.283185307179586)[source]¶

Check angle range and correct the range

Parameters:
  • angle (array-like) – unit is radians
  • min_angle (float, optional) – maximum of range in radians, default 0.0
  • max_angle (float, optional) – minimum of range in radians, default 2 * math.pi
Returns:

correct_angle – correct range angle

Return type:

numpy.ndarray

Normalization¶

researchutils.math.normalization.normalize_by_min_max(data, min_value=0.0, max_value=1.0)[source]¶

Normalize the data in min_value and max_value

Parameters:
  • data (array-like) –
  • min_value (float) – min_value of the fixed data, default is 0.0
  • max_value (float) – max_value of the fixed data, default is 1.0
Returns:

normalized_data – the shape of array is same as the input data

Return type:

numpy.ndarray

researchutils.math.normalization.standardize(data)[source]¶

Standardize the data. Fixed data’s average is 0 and, variance is 1.0

Parameters:data (array-like) –
Returns:standarized data – the shape of array is same as the input data
Return type:numpy.ndarray
Previous

© Copyright 2018, Yu Ishihara Revision 34a5e71f.

Built with Sphinx using a theme provided by Read the Docs.