[Python] Extend LabelEncoder classes

Discussão em 'Python' iniciado por Stack, Setembro 25, 2024.

  1. Stack

    Stack Membro Participativo

    I have a LabelEncoder with 500 classes.

    To store and load it, I used pickle:

    with open('../data/label_encoder_v500.pkl', 'rb') as file:
    label_encoder = pickle.load(file)


    I want to add 24 new classes to this encoder, keeping existing labels unchanged.

    additional_classes = ['class501', 'class502', ..., 'class524']


    It seems like this operation does not come out-of-the-box with LabelEncoder. Any help is appreciated.

    Continue reading...

Compartilhe esta Página