Spaces:
Sleeping
Sleeping
Final commit
Browse files- eda.py +15 -6
- model_svm.pkl +2 -2
eda.py
CHANGED
@@ -30,6 +30,7 @@ def run():
|
|
30 |
df = pd.read_csv('P1G5_Set_1_yudis_aditya.csv')
|
31 |
df['group_age'] = df['age'].apply(filter_group_age)
|
32 |
|
|
|
33 |
st.write('### Distribution Data Age')
|
34 |
# This cell is used to create histogram column age
|
35 |
data = df['age']
|
@@ -56,7 +57,7 @@ def run():
|
|
56 |
plt.title("Pie Chart Data based on Group Age")
|
57 |
st.pyplot(plt)
|
58 |
|
59 |
-
st.write('From Graph "
|
60 |
|
61 |
|
62 |
st.write('### Distribution Data Marital Status')
|
@@ -70,7 +71,7 @@ def run():
|
|
70 |
plt.title("Distribution data person based on marital status")
|
71 |
st.pyplot(fig)
|
72 |
|
73 |
-
st.write('From Graph above we can see that person who single is more to use credit card than married. person who has marital_status others has not really significant')
|
74 |
|
75 |
st.write('### Distribution Data Gender')
|
76 |
data = df.groupby('sex').size()
|
@@ -83,7 +84,9 @@ def run():
|
|
83 |
plt.title("Distribution data person based on gender")
|
84 |
st.pyplot(fig)
|
85 |
|
86 |
-
st.write('From Graph above we can see that female is more using credit card than male')
|
|
|
|
|
87 |
st.write('### Total People who pay duly on April - September in 2005')
|
88 |
fig = plt.figure(figsize=(15,5))
|
89 |
# This cell is used to create line chart to know total status payment duly in 2005
|
@@ -113,7 +116,7 @@ def run():
|
|
113 |
plt.plot(x,y)
|
114 |
plt.title("Total status payment duly in 2005")
|
115 |
st.pyplot(fig)
|
116 |
-
st.write('From Graph above we can know that Total people who pay duly are increased significant from April 2005 until September 2005. ')
|
117 |
|
118 |
st.write('### Median Bill Amount on April - September in 2005')
|
119 |
fig = plt.figure(figsize=(15,5))
|
@@ -144,7 +147,7 @@ def run():
|
|
144 |
plt.bar(x,y)
|
145 |
plt.title("Median Bill amount from April - September 2005")
|
146 |
st.pyplot(fig)
|
147 |
-
st.write('From graph above i use median instead mean because distribution data is not normal. We can see that median bill amount from april until September is decrased. That visualize that most people has decrased bill amount every month, which is good.')
|
148 |
|
149 |
st.write('### Total people who pay and not pay for next month (October) 2005')
|
150 |
fig = plt.figure(figsize=(15,5))
|
@@ -156,7 +159,13 @@ def run():
|
|
156 |
plt.bar(x,y)
|
157 |
plt.title('Total people who pay and dont pay on October 2005')
|
158 |
st.pyplot(fig)
|
159 |
-
st.write('From Graph above we know that more people pay for next month (October) than not pay. It is good result because that indicate client good behaviour')
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
|
161 |
if __name__ == '__main__':
|
162 |
run()
|
|
|
30 |
df = pd.read_csv('P1G5_Set_1_yudis_aditya.csv')
|
31 |
df['group_age'] = df['age'].apply(filter_group_age)
|
32 |
|
33 |
+
st.write('## Customer Segmentation')
|
34 |
st.write('### Distribution Data Age')
|
35 |
# This cell is used to create histogram column age
|
36 |
data = df['age']
|
|
|
57 |
plt.title("Pie Chart Data based on Group Age")
|
58 |
st.pyplot(plt)
|
59 |
|
60 |
+
st.write('From Graph "Distribution Data Group Age" we can know that majority significant people who use credit card is in group age adults. and The second is youth but not really significant. And group age "seniors" is rare to use credit card. So i dont recommend to target youth and seniors for promotion')
|
61 |
|
62 |
|
63 |
st.write('### Distribution Data Marital Status')
|
|
|
71 |
plt.title("Distribution data person based on marital status")
|
72 |
st.pyplot(fig)
|
73 |
|
74 |
+
st.write('From Graph above we can see that person who single is more to use credit card than married. person who has marital_status others has not really significant. So i recommend to make promotion product like accesoris, game, outfit, etc that related for increase status social with using pay credit')
|
75 |
|
76 |
st.write('### Distribution Data Gender')
|
77 |
data = df.groupby('sex').size()
|
|
|
84 |
plt.title("Distribution data person based on gender")
|
85 |
st.pyplot(fig)
|
86 |
|
87 |
+
st.write('From Graph above we can see that female is more using credit card than male. So we can make promotion for product that used for woman with pay using credit.')
|
88 |
+
|
89 |
+
st.write('## Customer Behaviour')
|
90 |
st.write('### Total People who pay duly on April - September in 2005')
|
91 |
fig = plt.figure(figsize=(15,5))
|
92 |
# This cell is used to create line chart to know total status payment duly in 2005
|
|
|
116 |
plt.plot(x,y)
|
117 |
plt.title("Total status payment duly in 2005")
|
118 |
st.pyplot(fig)
|
119 |
+
st.write('From Graph above we can know that Total people who pay duly are increased significant from April 2005 until September 2005. It indicate that client has good behaviour to pay their bill, so the way to selection client who can have credit card is already good.')
|
120 |
|
121 |
st.write('### Median Bill Amount on April - September in 2005')
|
122 |
fig = plt.figure(figsize=(15,5))
|
|
|
147 |
plt.bar(x,y)
|
148 |
plt.title("Median Bill amount from April - September 2005")
|
149 |
st.pyplot(fig)
|
150 |
+
st.write('From graph above i use median instead mean because distribution data is not normal. We can see that median bill amount from april until September is decrased. That visualize that most people has decrased bill amount every month, which is good. ')
|
151 |
|
152 |
st.write('### Total people who pay and not pay for next month (October) 2005')
|
153 |
fig = plt.figure(figsize=(15,5))
|
|
|
159 |
plt.bar(x,y)
|
160 |
plt.title('Total people who pay and dont pay on October 2005')
|
161 |
st.pyplot(fig)
|
162 |
+
st.write('From Graph above we know that more people pay for next month (October) than not pay. It is good result because that indicate client good behaviour and prove that process selection client who can use credit card is success.')
|
163 |
+
|
164 |
+
st.markdown('---')
|
165 |
+
st.write('# Conclusion')
|
166 |
+
st.write('From analysis and creating visualize from my dataset , This is a important point that i can share:')
|
167 |
+
st.write("- For promotion , don't target for group age old and young. And we can make deal promotion with product that focus on increase status life style like accesoris, outfit, etc using credit card. Also deal promotion with product that related with woman like makeup, salon , etc.")
|
168 |
+
st.write('- For April until September 2005, we can see that our client summarize has good behavior because dominant pay dully and decrase bill amount for every month. It is indicate the process selection client who can use credit card is good.')
|
169 |
|
170 |
if __name__ == '__main__':
|
171 |
run()
|
model_svm.pkl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2237242fbdc426ed8e1dbf2c8aa5253b7d0ce9b420e93fc31674c536392ad094
|
3 |
+
size 289072
|