I've used SMOTE to rebalance a dataframe, which I then plan to write back to Snowflake and use to create new variables.
Here's the code I use (I've checked the output- the new dataframes- and they're as expected):
X_smote = df.drop(['SURGERY_REQUIRED_FLAG','ADDED_DATES'], axis=1)
Y_smote = df['SURGERY_REQUIRED_FLAG']
sm = SMOTE(random_state = 2)
X_smote_res,y_smote_res = sm.fit_resample(X_smote, Y_smote.ravel())
My question is: How does the SMOTE model know what to what independent variables to input for the synthesized rows? I get that it's based on a neighbour (which makes sense when I think about datasets with just two dimensions) but how does it work if there are many independent variables?