Frequency and Bias
An important consideration in any classification task is class frequency. Class imbalances are problematic because the classifier becomes less sensitive to the minority classes. Consider a training set with a majority class A and minority B. An algorithm trained on this imbalanced data will develop a bias toward predicting A just because it appears more often. Another dataset could in theory contain more of B, for example. This classifier would function poorly in this case because it learned a preference for A.
To avoid this bias, perform class balancing. There are different ways to accomplish balancing. One method is to oversample the minority classes by duplicating observations. However, oversampling can cause the algorithm to overfit, and the data becomes skewed toward the replicated observations. Alternatively, one could undersample the majority class, leading to a loss of valuable information for a classifier [1]. I prefer to maintain as much information as possible.
In this article, I explain variations of oversampling, including using existing observations from the minority to synthesise new data. Balancing via artificial means is known as Synthetic Minority Oversampling Technique, or SMOTE [3].
SMOTE and Tomek Links
A data point can be represented as a vector, where each entry of the vector is an attribute. SMOTE works by first selecting a feature vector from the minority class at random. Then, the algorithm chooses a random neighbouring feature vector from k-nearest (usually five) neighbours. The new, synthesised, feature vector lies at an arbitrary point along the line connecting the two [3]. Fig.1 depicts synthetic data generation in SMOTE with an example dataset.

imblearn [2].The problem with SMOTE is that it can generate noise by interpolating points between outliers [2], and alone does not necessarily improve on the more straightforward random oversampling method. It is unlikely that SMOTE adds any additional information by using existing data, but SMOTE still shifts the bias toward the minority class [2]. Applying SMOTE may increase the sensitivity of the minority class but could decrease accuracy and precision. The authors of SMOTE found that combining SMOTE with under-sampling methods can improve classification performance [3].
To address some issues with SMOTE, particularly the case of synthetic noise, there is a modified version, SMOTE+Tomek, which tries to clean the feature space of synthetic noise. SMOTE+Tomek removes a majority class point with the nearest neighbour of another class. The pair of two closeby opposing types is called a Tomek link and is illustrated in Fig.2 [2].

Undersampling the majority class with Tomek links thus removes boundary cases between classes and class label noise.
Another variation of SMOTE is SMOTE+ENN. Considered an improvement to removing Tomek links, SMOTE+ENN deletes the k-nearest neighbours as well as the points of the Tomek link [4]. There are more variations of SMOTE, including KMeans+SMOTE [5] which applies KMeans clustering before SMOTE.
It is important to note that class balancing is performed after the train-test split otherwise SMOTE will interpolate points between test data in training data. In this scenario, the new feature vectors in the training set could leak information about the location of points in the test data.
An alternative method to deal with imbalanced data and avoid SMOTE entirely is using balanced ensemble classifiers. In balanced ensemble methods, bootstrapping can be used to sample the data so that the constituent classifiers (e.g., trees in a forest) train on subsets with the classes present in equal amounts [6].
Example in Python: imblearn library
from imblearn.pipeline import make_pipeline
from sklearn.ensemble import RandomForestClassifier
from imblearn.over_sampling import SMOTE
pipeline = [SMOTE(random_state=0),
RandomForestClassifier(random_state=0, min_samples_split=4, n_estimators=500)
]
model = make_pipeline(*pipeline)
model.fit(X_train, y_train)
y_pred = model.predict(X_test)
See more on the imblearn website: https://imbalanced-learn.org/dev/references/generated/imblearn.over_sampling.SMOTE.html#
References:
[1] Ma Y, He H. Imbalanced learning: foundations, algorithms, and applications. John
Wiley & Sons; 2013
[2] imblearn library documentation; By the Imbalanced-learn developers. Available from:
https://imbalanced-learn.org/dev/index.html.
[3] Chawla NV, Bowyer KW, Hall LO, Kegelmeyer WP. SMOTE: synthetic minority over-
sampling technique. Journal of artificial intelligence research. 2002;16:321-57.
[4] Batista GE, Bazzan AL, Monard MC, et al. Balancing Training Data for Automated
Annotation of Keywords: a Case Study. In: WOB; 2003. p. 10-8.
[5] Last F, Douzas G, Bacao F. Oversampling for imbalanced learning based on k-means
and smote. arXiv preprint arXiv:171100837. 2017.
[6] Chen C, Liaw A, Breiman L, et al. Using random forest to learn imbalanced data. University of California, Berkeley. 2004;110(1-12):24.
d case studies. MIT Press; 2020.
Interesting analysis! Seeing platforms like 68win prioritize a smooth user experience – especially login processes – is key for Vietnamese players. Tech & culture blend well here! 🤔
Baccarat strategy is fascinating – understanding patterns can help, but it’s still luck-based! Seen some platforms like jkboss offering diverse games, though responsible play is key. Good content here, thanks for sharing!
Really enjoying this article! It’s true, finding a reliable platform is key. I checked out jlboss and their slot games look fantastic – plus, the app seems super convenient for playing on the go! Definitely worth a look.
79Kingcomdangnhap, mới nghe tên lần đầu luôn á. Có ai chơi ở đây chưa cho mình xin chút thông tin với. Thấy giao diện cũng ok đó mà không biết độ uy tín thế nào. 79kingcomdangnhap
Just checked out f8bet05, and hey, it’s not bad! Seems like a decent place to try my luck. I’ll def give it a shot. Check it out here: f8bet05
Alright, time to spin some reels at cashhoardslot.online! I’m feeling lucky. Wish me luck, guys! I hope to win big. You can find it here: cashhoardslot
Friv. is my go-to when I need a quick gaming fix! It’s got such a fun, retro vibe and always seems to have something new to try. Seriously addictive in the best way! Check it out here: friv.
rong bach kim.com? Nghe thoáng thoáng mà thấy quen. Để xem hôm nay có kèo thơm không nào. Xem ngay rong bach kim.com.
Heard my buddy mention Fryv and had to check it out. Totally worth it! Games are simple, but that’s the charm. Perfect for a mindless break. Give it a shot: fryv.
P888Casino is a solid choice for anyone looking for a reliable online casino. Good bonuses and a decent selection of games. Check them out now at p888casino.
I have fun playing at 57VCom, but it feels less intuitive to use than other online casinos. I play to be with the community, but hope they fix the interface soon! Check it out yourself at 57vcom
Yo, just checked out tayaph and it’s legit. Good vibes all around. Peep it here: tayaph
I’ve tried a few sites lately but this one is definitely the smoothest. The login process is super quick and I didn’t hit any lags. Highly recommend kk44login for anyone looking for a reliable spot.
I was surprised by how easy it is to withdraw my winnings. No hidden fees and no long waits. I really trust pkwwwb777.
Quick deposits and even quicker withdrawals. That is all I really care about and they nail it. I am sticking with jilicashslotlogin from now on.
Quick deposits and even quicker withdrawals. That is all I really care about and they deliver every time. bd777u is honestly the most trustworthy site I have used recently.
Love the local vibe of this site. It feels tailored for us and the customer support is actually helpful. Glad I found phauronplay.
Really impressed with the selection of slots available. It feels like a real casino from the comfort of my home. Love phjilibet178!
The withdrawal process is seamless and transparent. No hidden fees or weird delays. I trust pkroyal777 with my deposits.
The login process is seamless and I haven’t encountered any lag during peak hours. It is rare to find such a stable platform these days. Give senopati2login a try.
Joined the club and the rewards are actually insane. It’s great to see a platform that actually cares about its players. Join krwinclub88 and see for yourself.
Best gaming experience I’ve had in a while! The interface is very friendly for beginners and the bonuses are generous. Love playing on yono777games during my break.
The variety of games here is impressive. I spend hours exploring different slots and they all work flawlessly. Big thanks to vnbancanohu
Honestly the game variety here is insane. I spent the whole weekend exploring different rooms and didn’t get bored once. Highly recommend yono789game for anyone looking for real excitement.
The bonuses they offer are actually legit and not just bait. I’m really enjoying the gaming experience here. phpeso999
Super friendly customer support. They helped me out with my deposit issue in just a few minutes. Five stars for phjili188!
Best betting options for local players. The odds are competitive and the app is very user friendly. Big thumbs up for ph1xbetph.
Great vibe and the games are always updated. I appreciate the transparency with the odds. bd8e884 is a winner in my book.
No more struggling with broken links. plus777linklogin makes it so easy to get back into my account and start playing immediately. Super convenient tool! plus777linklogin
The mobile experience is just top notch. I can play my favorite games anywhere without any lag. 55ubetapp makes everything so convenient for players on the go.
I’ve tried many platforms but this one really hits different. The games are smooth and the payouts are actually fair. Definitely recommend checking out phnewjilislot if you want a great experience.
Really impressed with the security and transparency of this platform. I feel safe depositing my funds here. Trust phbeeph for your gaming.
Solid performance and very reliable service. The slot games are fair and the rewards are generous. I’m definitely sticking with armorbet78slot for a long time.
Solid platform with a great selection of slots. I had a lucky streak yesterday and the withdrawal was processed in no time. Love vnnl88.
I’ve been looking for a reliable platform and this one really delivers. The interface is smooth and the payouts are fast. Definitely check out vn123winpro if you want a great experience.
The graphics are stunning and the gameplay is just buttery smooth. It is a great place to unwind after a long day of work. Give bb444login a try.
Downloading the APK was a breeze and the app runs like a dream. No glitches and fast loading times. I really like bd444betapk
Getting into my account is always seamless. No annoying errors or long wait times. The access via dino69login is the smoothest way to get back into the action.
Best value for money I’ve seen in a while. The promotions are actually useful and not just bait. I’m staying with zi888 for the long run.
Really impressed with the graphics and the sound design of the games here. It feels like a premium experience. I’m really enjoying sampan303slot.
Finding a working link can be a pain but this alternative site is a lifesaver. Stable connection and no lag during the big wins. Go to jitu100linkalternatif
The APK is very stable and works perfectly on my Android phone. Much better than playing in the browser. Download bd1333betapk now.
Really impressed with the rewards here. I had a great run yesterday and the payout process was surprisingly fast. Big thanks to brown777
Solid platform with no lag during peak hours. I love how straightforward the registration process is. I’m sticking with pk988wan from now on.