In which situation should we consider a dataset as imbalanced?

I'm facing a problem about making a classification on a dataset. The target variable is binary (with 2 classes, 0 and 1). I have 8,161 samples in the training dataset. And for each class, I have:

• class 0: 6,008 samples, 73.6% of total numbers.
• class 1: 2,153 samples, 26.4%

My questions are:

• In this case, should I consider the dataset I used as an imbalanced dataset?

• If it was, should I process the data before using RandomForest to make a prediction?

• If it was not an imbalanced dataset, could somebody tell me in which situation (like what ratio for each class) I could consider a dataset as imbalanced?

New contributor
ouyqf is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Please notice that when someone edits out the "thanks" part in the SO version of your post, it is expected that you get the message and do not repeat it here (or anywhere else, for that matter) – desertnaut Jan 16 at 1:24
• @desertnaut I was wondering that you left a comment in SO version like "I’m voting to close this question because it is not about programming as defined in the help center but about ML theory/methodology. " Then I asked my question here in the right version. But you said "do not repeat it here " So where should I ask my question ???? – ouyqf 2 days ago
• I meant do not repeat the "thanks" part (which I have removed). – desertnaut yesterday

However, some packages come with built-in options to deal with unbalanced targets, e.g. sklearn‘s random forest (option class_weight). Check the docs.