You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while executing above line, I am getting below error
:22: FutureWarning: Downcasting behavior in replace is deprecated and will be removed in a future version. To retain the old behavior, explicitly call result.infer_objects(copy=False). To opt-in to the future behavior, set pd.set_option('future.no_silent_downcasting', True)
education=df_.Q4.replace({'Master’s degree': 18,
:51: FutureWarning: Downcasting behavior in replace is deprecated and will be removed in a future version. To retain the old behavior, explicitly call result.infer_objects(copy=False). To opt-in to the future behavior, set pd.set_option('future.no_silent_downcasting', True)
python=df_.Q16_Part_1.fillna(0).replace('Python', 1),
:52: FutureWarning: Downcasting behavior in replace is deprecated and will be removed in a future version. To retain the old behavior, explicitly call result.infer_objects(copy=False). To opt-in to the future behavior, set pd.set_option('future.no_silent_downcasting', True)
r=df_.Q16_Part_2.fillna(0).replace('R', 1),
:53: FutureWarning: Downcasting behavior in replace is deprecated and will be removed in a future version. To retain the old behavior, explicitly call result.infer_objects(copy=False). To opt-in to the future behavior, set pd.set_option('future.no_silent_downcasting', True)
sql=df_.Q16_Part_3.fillna(0).replace('SQL', 1)
/usr/local/lib/python3.10/dist-packages/sklearn/utils/_tags.py:354: FutureWarning: The OneHotEncoder or classes from which it inherits use _get_tags and _more_tags. Please define the __sklearn_tags__ method, or inherit from sklearn.base.BaseEstimator and/or other appropriate mixins such as sklearn.base.TransformerMixin, sklearn.base.ClassifierMixin, sklearn.base.RegressorMixin, and sklearn.base.OutlierMixin. From scikit-learn 1.7, not defining __sklearn_tags__ will raise an error.
warnings.warn(
AttributeError: 'super' object has no attribute 'sklearn_tags'
The text was updated successfully, but these errors were encountered:
pragatech
changed the title
Chap2 'super' object has no attribute '__sklearn_tags__'
Chap2 'super' object has no attribute '__sklearn_tags__' X_train = kag_pl.fit_transform(kag_X_train, kag_y_train)
Jan 8, 2025
X_train = kag_pl.fit_transform(kag_X_train, kag_y_train)
while executing above line, I am getting below error
:22: FutureWarning: Downcasting behavior in
replace
is deprecated and will be removed in a future version. To retain the old behavior, explicitly callresult.infer_objects(copy=False)
. To opt-in to the future behavior, setpd.set_option('future.no_silent_downcasting', True)
education=df_.Q4.replace({'Master’s degree': 18,
:51: FutureWarning: Downcasting behavior in
replace
is deprecated and will be removed in a future version. To retain the old behavior, explicitly callresult.infer_objects(copy=False)
. To opt-in to the future behavior, setpd.set_option('future.no_silent_downcasting', True)
python=df_.Q16_Part_1.fillna(0).replace('Python', 1),
:52: FutureWarning: Downcasting behavior in
replace
is deprecated and will be removed in a future version. To retain the old behavior, explicitly callresult.infer_objects(copy=False)
. To opt-in to the future behavior, setpd.set_option('future.no_silent_downcasting', True)
r=df_.Q16_Part_2.fillna(0).replace('R', 1),
:53: FutureWarning: Downcasting behavior in
replace
is deprecated and will be removed in a future version. To retain the old behavior, explicitly callresult.infer_objects(copy=False)
. To opt-in to the future behavior, setpd.set_option('future.no_silent_downcasting', True)
sql=df_.Q16_Part_3.fillna(0).replace('SQL', 1)
/usr/local/lib/python3.10/dist-packages/sklearn/utils/_tags.py:354: FutureWarning: The OneHotEncoder or classes from which it inherits use
_get_tags
and_more_tags
. Please define the__sklearn_tags__
method, or inherit fromsklearn.base.BaseEstimator
and/or other appropriate mixins such assklearn.base.TransformerMixin
,sklearn.base.ClassifierMixin
,sklearn.base.RegressorMixin
, andsklearn.base.OutlierMixin
. From scikit-learn 1.7, not defining__sklearn_tags__
will raise an error.warnings.warn(
AttributeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 X_train = kag_pl.fit_transform(kag_X_train, kag_y_train)
12 frames
/usr/local/lib/python3.10/dist-packages/sklearn/base.py in sklearn_tags(self)
857
858 def sklearn_tags(self):
--> 859 tags = super().sklearn_tags()
860 tags.transformer_tags = TransformerTags()
861 return tags
AttributeError: 'super' object has no attribute 'sklearn_tags'
The text was updated successfully, but these errors were encountered: