0% found this document useful (0 votes)
8 views2 pages

ML 5.0

The document contains code for analyzing and visualizing distributions of various variables from a dataset using seaborn. It then prints classification metrics from model training and defines DataFrames to store and display performance metrics for different classifiers.

Uploaded by

Sai Srivatshav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

ML 5.0

The document contains code for analyzing and visualizing distributions of various variables from a dataset using seaborn. It then prints classification metrics from model training and defines DataFrames to store and display performance metrics for different classifiers.

Uploaded by

Sai Srivatshav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

a = sns.

distplot(hd_df['Salary'], kde_kws = {'bw' : 1}, ax=axes[0][0])


a.set_title("Salary Distribution",fontsize=10)

a = sns.boxplot(hd_df['Salary'] , orient = "v" , ax=axes[0][1])


a.set_title("Salary Distribution",fontsize=15)

a = sns.distplot(hd_df['age'], kde_kws = {'bw' : 1}, ax=axes[1][0])


a.set_title("age Distribution",fontsize=10)

a = sns.boxplot(hd_df['age'] , orient = "v" , ax=axes[1][1])


a.set_title("age Distribution",fontsize=10)

a = sns.distplot(hd_df['educ'], kde_kws = {'bw' : 1}, ax=axes[2][0])


a.set_title("educ Distribution",fontsize=10)

a = sns.boxplot(hd_df['educ'] , orient = "v" , ax=axes[2][1])


a.set_title("educ Distribution",fontsize=10)

a = sns.distplot(hd_df['no_young_children'], kde_kws = {'bw' : 1}, ax=axes[3][0])


a.set_title("no_young_children Distribution",fontsize=10)

a = sns.boxplot(hd_df['no_young_children'] , orient = "v" , ax=axes[3][1])


a.set_title("no_young_children Distribution",fontsize=10)

a = sns.distplot(hd_df['no_older_children'], kde_kws = {'bw' : 1}, ax=axes[4][0])


a.set_title("no_older_children Distribution",fontsize=10)

a = sns.boxplot(hd_df['no_older_children'] , orient = "v" , ax=axes[4][1])


a.set_title("no_older_children Distribution",fontsize=10)

print(classification_report(y_train, ytrain_predict),'\n');

index=['Accuracy', 'AUC', 'Recall','Precision','F1 Score']


data = pd.DataFrame({'LR Train':
[lr_train_acc,lr_train_auc,lr_train_recall,lr_train_precision,lr_train_f1],
'LR Test':[lr_test_acc,lr_test_auc,lr_test_recall,lr_test_precision,lr_test_f1],
'LDA Train':
[lda_train_acc,lda_train_auc,lda_train_recall,lda_train_precision,lda_train_f1],
'LDA Test':
[lda_test_acc,lda_test_auc,lda_test_recall,lda_test_precision,lda_test_f1],},index=index)
round(data,2)

index=['Accuracy', 'AUC', 'Recall','Precision','F1 Score']


hd5_data = pd.DataFrame({'LR Train':
[hd_train_acc,hd_train_auc,lr_train_recall,lr_train_precision,lr_train_f1],
'LR Test':[hd_test_acc,hd_test_auc,lr_test_recall,lr_test_precision,lr_test_f1],
'LDA Train':
[lda_train1_acc,hd_train1_auc,hd1_train_recall,hd1_train_recall,hd1_train_f1],
'LDA Test':
[lda_test1_acc,hd_test1_auc,hd1_test_recall,hd1_test_precision,hd1_test_f1],},index=ind
ex)
round(data,2)

Recommendations
• To improve Holiday Packages over the age of 50 we can provide religious
destination places.
2. For people earning more than 150000 we can provide vacation holiday packages.
3. For Employee having more than number of older children we can provide packages
in holiday vacation places.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy