This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def normalize_to_smallest_integers(labels): | |
"""Normalizes a list of integers so that each number is reduced to the minimum possible integer, maintaining the order of elements. | |
:param labels: the list to be normalized | |
:returns: a numpy.array with the values normalized as the minimum integers between 0 and the maximum possible value. | |
""" |