Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Erro no uso do argumento ‘categorical_features’ #23262
    Leandro
    Participant

      Obrigado Fabio, eu fiz o código por partes. Acabei postando apenas a coluna 8. Seu código está correto.

      in reply to: Erro no uso do argumento ‘categorical_features’ #23258
      Leandro
      Participant
        from sklearn.preprocessing import LabelEncoder, OneHotEncoder
        from sklearn.compose import ColumnTransformer
        ...
        
        onehotencorder = ColumnTransformer(
                                           [('one_hot_encoder', OneHotEncoder(), [8])], 
                                           remainder='passthrough' 
                                          )
        previsores = onehotencorder.fit_transform(previsores)
        • This reply was modified 4 years, 10 months ago by Leandro.
      Viewing 2 posts - 1 through 2 (of 2 total)