DIVORCE PREDICTION

AIM

The objective of the assignment is to train a machine learning algorithm which can predict whether they are about to get divorce or not.

DATASET

The dataset has been taken from UCI which consist of a CSV file and a excel file of the same dataset. I have taken 80% and 20% for training and testing respectively. There are 54 number of attributes in total with no missing values. With the help of these attribute we need to predict the divorce. The output to be predicted will in binary form, either ‘Yes’ or ‘No’.

1. When one of our apologies apologies when our discussions go in a bad direction, the issue does not extend.

2. I know we can ignore our differences, even if things get hard sometimes.

3. When we need it, we can take our discussions with my wife from the beginning and correct it.

4. When I argue with my wife, it will eventually work for me to contact him.

5. The time I spent with my wife is special for us.

6. We don’t have time at home as partners.

7. We are like two strangers who share the same environment at home rather than family.

8. I enjoy our holidays with my wife.

9. I enjoy traveling with my wife.

10. My wife and most of our goals are common.

11. I think that one day in the future, when I look back, I see that my wife and I are in harmony with each other.

12. My wife and I have similar values in terms of personal freedom.

13. My husband and I have similar entertainment.

14. Most of our goals for people (children, friends, etc.) are the same.

15. Our dreams of living with my wife are similar and harmonious

16. We’re compatible with my wife about what love should be

17. We share the same views with my wife about being happy in your life

18. My wife and I have similar ideas about how marriage should be

19. My wife and I have similar ideas about how roles should be in marriage

20. My wife and I have similar values in trust

21. I know exactly what my wife likes.

22. I know how my wife wants to be taken care of when she’s sick.

23. I know my wife’s favourite food.

24. I can tell you what kind of stress my wife is facing in her life.

25. I have knowledge of my wife’s inner world.

26. I know my wife’s basic concerns.

27. I know what my wife’s current sources of stress are.

28. I know my wife’s hopes and wishes.

29. I know my wife very well.

30. I know my wife’s friends and their social relationships.

31. I feel aggressive when I argue with my wife.

32. When discussing with my wife, I usually use expressions such as “you always“ or “you neverâ€.

33. I can use negative statements about my wife’s personality during our discussions.

34. I can use offensive expressions during our discussions.

35. I can insult our discussions.

36. I can be humiliating when we argue.

37. My argument with my wife is not calm.

38. I hate my wife’s way of bringing it up.

39. Fights often occur suddenly.

40. We’re just starting a fight before I know what’s going on.

41. When I talk to my wife about something, my calm suddenly breaks.

42. When I argue with my wife, it only snaps in and I don’t say a word.

43. I’m mostly thirsty to calm the environment a little bit.

44. Sometimes I think it’s good for me to leave home for a while.

45. I’d rather stay silent than argue with my wife.

46. Even if I’m right in the argument, I’m thirsty not to upset the other side.

47. When I argue with my wife, I remain silent because I am afraid of not being. able to control my anger.

48. I feel right in our discussions.

49. I have nothing to do with what I’ve been accused of.

50. I’m not actually the one who’s guilty about what I’m accused of.

51. I’m not the one who’s wrong about problems at home.

52. I wouldn’t hesitate to tell her about my wife’s inadequacy.

53. When I discuss it, I remind her of my wife’s inadequate issues.

54. I’m not afraid to tell her about my wife’s incompetence.

ANALYSING AND PRE PROCESSING THE DATASET

# Importing the dataset and adding some necessary Library and Separating the predictor variable.

MACHINE LEARNING MODELS

LINEAR REGRESSION

RANDOM FOREST REGRESSION

SVR MODEL

DECISION TREE CLASSIFIER

LOGISTIC REGRESSION

RESULTS

1] LINEAR REGRESSION MODEL: 86%

2] RANDOM FOREST REGRESSION: 87%

3] SVR MODEL: 97%

4] DECISION TREE : 100%

5] LOGISTIC REGRESSION: 97%

CONJECTURE

Based on the results , we can conclude that one of the training models was able to predict with the highest accuracy would be the DECISION TREE MODEL with an accuracy of 100% but decision tree has a high chances of overfitting so I’ll go with Logistic Regression which is also giving a pretty good accuracy .

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store