Muhammad4hmed / GML

Auto Data Science - Python Library.
MIT License
139 stars 33 forks source link

regression new features sympy.add error #14

Open prashanthGit945 opened 3 years ago

prashanthGit945 commented 3 years ago

sympy module no attritubute with add

mehrankamal commented 3 years ago

Can you please get us the error dump for the problem?

prashanthGit945 commented 3 years ago

Creating New Features with Features Selection

[GML] The 1 step feature engineering process could generate up to 49 features. [GML] With 5429 data points this new feature matrix would use about 0.00 gb of space. [FEATURE_ENGINEERING] Step 1: transformation of original features [FEATURE_ENGINEERING] Generated 21 transformed features from 7 original features - done. [FEATURE_ENGINEERING] Generated altogether 22 new features in 1 steps [FEATURE_ENGINEERING] Removing correlated features, as well as additions at the highest level

AttributeError Traceback (most recent call last)

in 3 numeric_cols =['session_id'] 4 ----> 5 fe = FeatureEngineering(train,'time_spent',fill_missing_data=True, method_cat='Mode',cat_cols = cat_cols,numeric_cols = numeric_cols, 6 method_num='Mean',encode_data=True,normalize=True, remove_outliers=False,new_features=True,feateng_steps=1,task ='regression') 7 ~\Anaconda3\lib\site-packages\GML\FEATURE_ENGINEERING.py in __init__(self, data, label, fill_missing_data, method_cat, method_num, drop, cat_cols, numeric_cols, thresh_cat, thresh_numeric, encode_data, method, thresh, normalize, method_transform, thresh_numeric_transform, remove_outliers, qu_fence, new_features, task, test_data, verbose, feateng_steps) 184 except: 185 pass --> 186 X = afc.fit_transform(X, y) 187 if not test_data.empty: 188 test_data = afc.transform(test_data) ~\Anaconda3\lib\site-packages\GML\AUTO_FEATURE_ENGINEERING\autofeat.py in fit_transform(self, X, y) 294 target_sub = target.copy() 295 # generate features --> 296 df_subs, self.feature_formulas_ = engineer_features(df_subs, self.feateng_cols_, _parse_units(self.units, verbose=self.verbose), 297 self.feateng_steps, self.transformations, self.verbose) 298 # select predictive features ~\Anaconda3\lib\site-packages\GML\AUTO_FEATURE_ENGINEERING\feateng.py in engineer_features(df_org, start_features, units, max_steps, transformations, verbose) 339 print("[FEATURE_ENGINEERING] Generated altogether %i new features in %i steps" % (len(feature_pool) - len(start_features), max_steps)) 340 print("[FEATURE_ENGINEERING] Removing correlated features, as well as additions at the highest level") --> 341 feature_pool = {c: feature_pool[c] for c in feature_pool if c in uncorr_features and not feature_pool[c].func == sympy.add.Add} 342 cols = [c for c in list(df.columns) if c in feature_pool and c not in df_org.columns] # categorical cols not in feature_pool 343 if cols: ~\Anaconda3\lib\site-packages\GML\AUTO_FEATURE_ENGINEERING\feateng.py in (.0) 339 print("[FEATURE_ENGINEERING] Generated altogether %i new features in %i steps" % (len(feature_pool) - len(start_features), max_steps)) 340 print("[FEATURE_ENGINEERING] Removing correlated features, as well as additions at the highest level") --> 341 feature_pool = {c: feature_pool[c] for c in feature_pool if c in uncorr_features and not feature_pool[c].func == sympy.add.Add} 342 cols = [c for c in list(df.columns) if c in feature_pool and c not in df_org.columns] # categorical cols not in feature_pool 343 if cols: AttributeError: module 'sympy' has no attribute 'add'