Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Applying function
#1
code

Hi,

I still see nulls in X_train and my pipline seems to not have applied. For example, there should be more columns due to one-hot encoding. Am I doing something wrong?

def apply_fe_pipeline(X_train,X_test):
    # fit the imputer
    feature_engineering_pipeline.fit(X_train)

    # transform the data
    X_train= feature_engineering_pipeline.transform(X_train)
    X_test= feature_engineering_pipeline.transform(X_test)
    training_null=X_train.isna().values.sum()
    test_null=X_test.isna().values.sum()
    
    return print ('count of nulls in training set after fe:',training_null,
                 'count of nulls in test set after fe:',test_null)
apply_fe_pipeline(X_train,X_test)
Reply
#2
This looks like a question that should be directed at the pytorch/tensorflow/whatever library you're using's forum, since the input/output/errors are all completely within those libraries.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Applying Moving Averages formula to a number lynnette1983 1 641 Sep-29-2020, 10:21 AM
Last Post: scidam
  Hi, I need help with defining user's input and applying it to code. jlmorenoc 2 755 Jun-24-2020, 02:10 PM
Last Post: pyzyx3qwerty
  Help with applying this instrument monitoring code to multiple inputs. Kid_Meier 1 633 Mar-04-2020, 12:01 PM
Last Post: Kid_Meier
  applying and(&) ,or(|) in conditions does not result output correctly as expected Smiling29 4 1,037 Oct-21-2019, 01:39 AM
Last Post: ichabod801
  Applying row height to all rows including and after row 7 curranjohn46 2 1,834 Oct-14-2019, 03:10 PM
Last Post: curranjohn46
  applying 2 conditions to a loop Pedroski55 1 1,585 Nov-08-2017, 07:11 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020