CoolFace
Apppublic

Aadityapoddar/are_you_in_a_healthy_relationship

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

❤️Are you in a Healthy Relationship?

This is a project which helps you to identify your relationship type, whether it is healthy, neutral or toxic💔!!! <br> You are asked to rate some basic parameters of your relationship between 1 to 10, and the model predicts your relationship health.

❤️‍🔥Making of the project

🚀Dataset

Since it is difficult to find dataset online for such type of projects so here the dataset is synthetically generated in Generate_data.ipynb. <br> The dataset contains of 1000 rows and 8 columns and includes important parameters to judge a relationship.

⭐Model

Data Visualisation, Data Preprocessing, Model Selection and Model Training takes place in Healthy_Relationship?.ipynb.<br>

Data Visualisation

A countplot is plotted to see how balanced the data is.<br> A heatmap is plotted to check correlation between different features. We can see moderate to high correlation between many features. The highest correlation is between mutualrespect and trustlevel.

Data Preprocessing

Since the data is synthetic so we dont find any null values in the dataset.<br> Due to very high correlation between mutualrespect and trustlevel we have to drop one feature, here we drop mutual_respect.

Model Selection

Since this model requires a multi class-classification algorithm, We will check the accuracy of 5 different algorithm (SVM, Random Forest, AdaBoost, XGBoost, KNN) <br> We will be using StratifiedKFold and crossvalscore <br> crossvalscore implicitly uses StratifiedKFold but it does not shuffle, so to overcome that here we are explicitly using StratifiedKFold<br> SVM: Mean Accuracy = 1.0000<br> Random Forest: Mean Accuracy = 0.9990<br> AdaBoost: Mean Accuracy = 0.9990<br> XGBoost: Mean Accuracy = 0.9960<br> KNN: Mean Accuracy = 1.0000<br>

Model Training

SVM and KNN both gave the highest accuracy. But since SVM is faster, more memory efficient and less prone to noise, here we are choosing SVM for our model training.

Model Evaluation

We will be printing confusionmatrix and classificationreport to check the model performance.

🔥Deployment

The model is deployed on hugging face, streamlit is used for the interface.<br> app.py contains the code for the interface.<br> The interface contains sliders for feature input and a predict button.<br> You can check the deployment here.

😊Scope for Improvement

The dataset here is generated synthetically, it would have been better if the model is trained on a publically collected data.<br> The Interface could be further imporoved to provide better user experience.