Questions tagged [column-tansformer]

8 questions
1
vote
1 answer

ColumnTransformer' object has no attribute '_name_to_fitted_passthrough

enter image description here although I used a virtual environment. I got the following error. GitHub repo: I have latest version of sklearn @dataclass class DataTransformationConfig: …
1
vote
1 answer

ColumnTransformer , remainder - passthrough gives me Error

I have a small dataset, like this _d=pd.DataFrame([ [1,2.0,'a','mango','2017-07-07',1], [2,2.55,'b','apple','2017-08-07',0], [3,5.7,np.nan,'bannan',np.nan,1], [4,np.nan,'d','grpaes','2017-09-07',1], …
Lijin Durairaj
  • 4,910
  • 15
  • 52
  • 85
0
votes
0 answers

AttributeError: 'ColumnTransformer' object has no attribute '_feature_names_in'

I am facing this error as I am trying to transform data with my scikit learn model. The model is built as follows: feature_columns_names = [ 'transaction_id', 'created_at', 'amount', 'device_model','device_mode', 'transaction_sum',…
MSS
  • 35
  • 4
0
votes
1 answer

Trouble with OneHotEncoding, Column Transformer and Linear Regression in Python

I'm using a ColumnTransformer in my Python script to transform categorical variables in a dataset for use in a linear regression model. I've used the OneHotEncoder to transform the categorical variable in question, and the transformer appears to be…
0
votes
0 answers

how to use grid search CV with multiples models using make_pipeline and make_column_transformer?

I am trying to use grid search cv and get best params on multiple models which used make_pipeline and make_column_transformer. numerical_features = ['Pclass','Parch','Fare', 'Age'] categorical_features= ['Sex','Embarked'] numerical_pipeline=…
0
votes
0 answers

How to load security key from application.properties for @ColumnTransformer...?

package com.srikanth.oncode.entity; import java.io.Serializable; import org.hibernate.annotations.ColumnTransformer; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import…
0
votes
1 answer

scikit-learn column transformer- columns with different discrete values

I have dataset with about 10 columns with discrete data and I have troubles with transforming them to the to form where its possible to perform machine learning I was able to transoform one column which contain only YES/NO values in this way: le =…
0
votes
0 answers

Custom Column Transformer. Problems with training

I am having the following problem while trying to implement pipeline For the preprocessor, I want to combine adding a new column and processing all other columns. It works as it should features = ['Pclass', 'Sex', 'Age', 'Parch',…