0
$\begingroup$

I am working on weather data and it has few features that are independent variables such as severity, severity_id, urgency_id etc ... Based on these values, I would like to classify alerts into class 0 or 1. For example, below is row item from data source

Alert | Severity | Sev_Id | Urg_Id | Event      | Sys_Rec(Target Variable) 
--------------------------------------------------------------------------
dummy | Extreme  |   1    |    1   |   STORM    |      1
dummy | Minor    |   3    |    5   |   RIPTIDE  |      0
dummy | Extreme  |   1    |    1   |   HURRICANE|      1

For severity_id 1 it should be class 1 (Yes) and for others its class 0 (No).The objective is to build a general binary classifier using decision trees. So I started with DTClassifier, but later I realized it could also be done with logistic regression. I am confused which would be a better fit for this kind of data for classification.

Please advice and give me some starting points.

$\endgroup$
0
$\begingroup$

Which model you choose in the end depends on your data. We cannot really answer this for you. Only practice and trials and errors will actually help you doing this.

For binary classification, you can choose among a very diverse range of models, from Logistic Regression to SVMs to Random Forests to Neural Networks. As a rule of thumb, you can use Occam's Razor => for two models giving the same performance, always choose the simplest one.

So my advice is: try out a few model, compare their performance on a testing set and select whichever works best for you...

$\endgroup$
2
  • $\begingroup$ Thanks for the suggestion id, I did try decision tree and it just didn't impress me. Now trying out logistic regression. will come back and update my results for further opinion. cheers $\endgroup$ – Vadiraj Joshi Oct 20 '18 at 20:26
  • $\begingroup$ One thing to note is severity and severity_id seem to be the same thing. For a decision tree I would exclude the sevirity_id column and encode the severity as an integer in an order which represents increasing severity (i.e. extreme > minor) [also in your example urg_id also seems to be 1:1 related to the severity]. Event on the other hand doesn't seem to have a natural order so I'd one-hot encode this. $\endgroup$ – David Waterworth Jan 13 '20 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.