- This topic has 1 reply, 2 voices, and was last updated 2 years, 9 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › Fórum Machine Learning e Data Science com Python de A à Z › Label encoder
Olá,
Uma dúvida, quando aplicamos o label_enconder não é possivel gerar uma legenda sobre qual nome qual inteiro foi atribuído?
Exemplo, se tivermos uma tabela com péssimo Ruim,, bom e excelente e ele atribuir, respectivamente, 0,1,2,3, há algum algoritmo que nos forneça essa informação sem que tenhamos que ficar olhando e contado?
Aula Naive Bayers – base crédito 14:24 minutos
Grata
Olá Katia,
Quando você faz o ajuste de uma instância de LabelEncoder, esta instância guarda os rótulos no atributo labels_, em ordem crescente. Por exemplo:
y = ['a', 'b', 'a'] le = LabelEncoder() le.fit(y) le.labels_ # Output: ['a', 'b']