[scikit-learn] error code linear models

carlos gonzalez carlos.gonzalez1006 at gmail.com
Sat Feb 3 12:36:54 EST 2024


Se encuentra nuevo error en guia de models linear:

from sklearn.compose import make_column_transformer
from sklearn.preprocessing import OneHotEncoder

categorical_columns = ["RACE", "OCCUPATION", "SECTOR", "MARR", "UNION",
"SEX", "SOUTH"]
numerical_columns = ["EDUCATION", "EXPERIENCE", "AGE"]

preprocessor = make_column_transformer(
    (OneHotEncoder(drop="if_binary"), categorical_columns),
    remainder="passthrough",
    verbose_feature_names_out=False,  # avoid to prepend the preprocessor
names
)
------------------------------------------------------------------------------
!pip install scipy
import scipy as sp

from sklearn.compose import make_column_transformer
from sklearn.preprocessing import OneHotEncoder

categorical_columns = ["RACE", "OCCUPATION", "SECTOR", "MARR", "UNION",
"SEX", "SOUTH"]
numerical_columns = ["EDUCATION", "EXPERIENCE", "AGE"]

preprocessor = make_column_transformer(
    (OneHotEncoder(drop="if_binary"), categorical_columns),
    remainder="passthrough",
    verbose_feature_names_out=False,  # avoid to prepend the preprocessor
names
)

-- 
Carlos González T.

Ing. Informático.
[image: mobilePhone] +56977542105
[image: emailAddress] carlos.gonzalez1006 at gmail.com
[image: address] Maipú, Santiago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/scikit-learn/attachments/20240203/efd5987a/attachment.html>


More information about the scikit-learn mailing list