0

I am trying to run the following Collab file : https://colab.research.google.com/github/jeffheaton/t81_558_deep_learning/blob/master/t81_558_class_07_5_tabular_synthetic.ipynb . It generates fake data but does not work!

All the previous cells in this notebook seem to work fine but when reach the following code cell, I receive an error:

from tabgan.sampler import GANGenerator
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split

gen_x, gen_y = GANGenerator(gen_x_times=1.1, cat_cols=None,
           bot_filter_quantile=0.001, top_filter_quantile=0.999, \
              is_post_process=True,
           adversarial_model_params={
               "metrics": "rmse", "max_depth": 2, "max_bin": 100, 
               "learning_rate": 0.02, "random_state": \
                42, "n_estimators": 500,
           }, pregeneration_frac=2, only_generated_data=False,\
           gan_params = {"batch_size": 500, "patience": 25, \
          "epochs" : 500,}).generate_data_pipe(df_x_train, df_y_train,\
          df_x_test, deep_copy=True, only_adversarial=False, \
          use_adversarial=True)

It gives me the error : " LGBMClassifier.fit() got an unexpected keyword argument 'early_stopping_rounds' " I do not know how is is fixed!.

Note: you need to install tabgan via pip install tabgan

I need to get "gen_x" (This is my aim)

  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Aug 13 '23 at 21:18
  • If you run that code it will give you the error : LGBMClassifier.fit() got an unexpected keyword argument 'early_stopping_rounds'. How to fix this problem ? – user22113644 Aug 14 '23 at 06:20

1 Answers1

0

Try new version of library, with fixed error

pip install tabgan==1.3.3
Rocketq
  • 5,423
  • 23
  • 75
  • 126
  • Thank you very much, it is working now. Please can you explain what kind of issue is this? and why it it occur ?. If there is a book or topic I can read about ? – user22113644 Aug 30 '23 at 03:04