Example 2 of D4.3 - Pre-processing #11
Labels
a/p metadata
documentation
Improvements or additions to documentation
good first issue
Good for newcomers
Use case
common
Name of resource
SMOTE dataset balancing
ID
SMOTE_dataset_balancing
Description
Dataset balancing using SMOTE oversampling technique. A balanced dataset is a dataset where each output class (or target class) is represented by the same number of input samples. Imbalanced data is not always a bad thing and there is always some degree of imbalance in real data sets. That said, if the level of imbalance is relatively low, there should not be much impact on the performance of the model but, in some cases, working on unbalanced data could introduce a high error rate. Imbalanced data is one of the potential problems in the field of data mining and machine learning. This problem can be approached by properly analyzing the data. One way to solve this problem is to oversample the examples in the minority class. This can be achieved by simply duplicating examples from the minority class in the training dataset prior to fitting a model. This can balance the class distribution but does not provide any additional information to the model. An improvement on duplicating examples from the minority class is to synthesize new examples from the minority class. SMOTE works by selecting examples that are close in the feature space, drawing a line between the examples in the feature space and drawing a new sample at a point along that line. Specifically, a random example from the minority class is first chosen. Then k of the nearest neighbors for that example are found (typically k=5). A randomly selected neighbor is chosen, and a synthetic example is created at a randomly selected point between the two examples in feature space.
Main category
Pre-processing
Other category
No response
Publication date
2023-08-05
Objective
dataset-balancing
Platform
Google Colab
Framework
imblearn
Architecture
None
Approach
None
Algorithm
SMOTE - Synthetic-Minority-Oversampling-TEchnique
Processor
cpu
OS
linux
Keyword
dataset balancing, SMOTE
Reference link
https://imbalanced-learn.org/stable/references/generated/imblearn.over_sampling.SMOTE.html
Example
https://github.com/cozzolinoac11/wildfire_prediction/blob/main/dataset_balancing.ipynb
Input data used
Characteristics of input data
Biases and ethical aspects
Output data obtained
Characteristics of output data
Performance
No response
Conditions for access and use
cc-by-4.0
Constraints
No response
The text was updated successfully, but these errors were encountered: