Machine Learning: Few Tips to Overcome Crooked Data

By ridhigrg |Email | Dec 4, 2018 | 9069 Views

Every computer system uses machine learning as it has refined their performance on a definite task.  Machine learning is mainly the overview of algorithms and closely concomitant to computers statistics which mainly focuses on predictive analytics. These algorithms are used in many applications, however, they do not work competently with imbalanced datasets. If you have gone through machine learning and data science, you might have faced problems related to imbalanced data. You might come across through this question! How does imbalanced data occur? Well, it occurs due to classification problems where the classes are not equally represented.

There are some expertise approaches to deal with skewed data using various techniques: 
Use the virtuous evaluation metrics:
It is precarious to use unbalanced data while applying inappropriate evaluation metrics for the generated model. Accuracy is the simplest form of evaluation metrics as it shows that how many data points are predicted correctly. RMSE and MAE are the two most popular metrics for continuous variables. MAE is easier to understand and interpret as it directly takes the average of offsets whereas RMSE penalizes the higher difference more than MAE. In order to measure the model performance, choosing the right evaluation matrix is necessary to overcome the problem. 

Resample the training kit:
You can work on getting the different dataset rather than using different evaluation criteria. Under-sampling and over-sampling are the two major approaches which help you defeat the imbalanced dataset and prepare a balanced one. When the size of the abundant class is reduced, the dataset is balanced by under-sampling. Under-sampling uses smote and Adasyn techniques for classification problems. When the quantity of data is insufficient, over-sampling increase the size of samples which helps to balance the dataset. These two strategies are combined into a hybrid strategy, which successfully deals with balanced data.
K-fold cross-validation should be used appropriately:
While using over-sampling methods you need to apply cross-validation accurately, to address imbalance problems. To generate random data on distribution function, over-sampling takes rare samples and applies to bootstrap. Cross-validation should be done before over-sampling the data, just as how feature selection should be enforced. Dataset can have randomness only by resampling the data frequently. 

Use Different ratios for resampling:
The difference of ratio between the rare and the abundant class mainly depends on models and data that are used by you. Try and use altogether with different ratio rather than going forward with the same ratio. This reduces the problem of the skewed database. As it can influence the weight that one class gets depending upon the model used. 

Models need to be designed by you:
If the model is suitable for imbalanced data there is no need to resample the data. By designing a cost function that is penalizing the wrong classification of the rare class more than wrong classifications of the abundant class, it is possible to design many models that naturally hypothesize in favor of the rare class.
This might not be the exclusive list of techniques, but a small overview of handling the crooked data. There is no best viewpoint or model suited but it is strongly recommended to try different models and techniques to evaluate what works best.

Source: HOB