<div dir="ltr"><div>Hi Mamun,<br><br></div><div>The new samples generated through SMOTE are synthetically created.<br></div><div>You can refer to the paper of Chawla for more information.<br></div><div>Therefore, there is no indexes linked to the original data. However, while<br></div><div>under-sampling you can get this information setting up the `return_indices=True`.<br><br></div><div>Cheers,<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 December 2016 at 13:56, Mamun Rashid <span dir="ltr"><<a href="mailto:mamunbabu2001@gmail.com" target="_blank">mamunbabu2001@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi All,<br></div>Not sure if questions regarding the contributory packages are answered here. Just trying my luck. <br><br>I am have a seriously imbalanced classification problem. I am trying to use SMOTE+ENN oversampling and undersampling method to oversample my minority class and oversample my majority class. <br><br>========<br><br><span style="font-family:monospace,monospace">from sklearn.datasets import make_classification<br>from imblearn.combine import SMOTEENN<br><br>sm = SMOTEENN()<br>X, y = make_classification(n_classes=<wbr>2, class_sep=2, weights=[0.2, 0.8], n_informative=1, n_redundant=1, flip_y=0, n_features=3, n_clusters_per_class=1, n_samples=50, random_state=10)<br>X_df = pd.DataFrame(X)<br>X_resampled, y_resampled = sm.fit_sample(X_df, y)<br></span><br><span style="font-family:monospace,monospace">=========<br><br></span></div>I understand that SMOTE returns a resampled data matrix <span style="font-family:monospace,monospace">i.e. X_resampled. </span>I was wondering if there is a direct way to retrieve the indexes of the original data observations ?<br><br></div>Thanks in advance.<br><br></div><div>Best Regards and Seasons Greetings.,<br></div>Mamun<br></div>
<br>______________________________<wbr>_________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scikit-learn</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><div>Guillaume Lemaitre<br></div></div><div>INRIA Saclay - Ile-de-France<br>Equipe PARIETAL<br><a href="mailto:guillaume.lemaitre@inria.fr" target="_blank">guillaume.lemaitre@inria.f</a><a>r</a> --- <a href="https://glemaitre.github.io/" target="_blank">https://glemaitre.github.io/</a><br></div></div></div></div></div></div>
</div>