st.markdown("<h1 style='text-align: center;'>Welcome To The Smart Labour Turnover Solution System</h1>",unsafe_allow_html=True)
st.markdown("* This system is mainly capable of Finding employees with a higher possibility of leaving the company using artificial intelligence (AI).")
st.markdown("""* After you have uploaded your .csv file, our system will find the patterns in your data using machine learning techniques and present the list of employees, including their names and ID, who are more likely to leave the company""")
st.markdown("""* Moreover, the system will provide an analytical Overview that will help you deep dive into your data in an easy graphical way. Such as,
- Correlation for the each and every attribute in your dataset.
- Feature importance for the whole dataset.
- Top 15 feature distribution for employee turnover.""")
withinput_file:
st.subheader("1. Please Upload Your Dataset in .csv Format")
input=st.file_uploader("Choose the file")
ifinputisnotNone:
df=pd.read_csv(input)
st.text("** Below is your uploaded file. Please cancel the upload and reupload the file if it is not the correct one.** ")
st.markdown("* Feature Importance shows the most critical attributes for your companies' Employee Turnover. The features are listed here in descending order.")
#st.write("%d. %s (%f)" % (i + 1 , test.columns[ind[i]], coef[ind[i]]))
x=range(test.shape[1])
y=coef[ind][:test.shape[1]]
#plot the feature importance
fi_fig=plt.figure(figsize=(6,8))
plt.title("Feature importances")
ax=plt.subplot()
plt.barh(x,y)
ax.set_yticks(x)
ax.set_yticklabels(test.columns[ind])
plt.gca().invert_yaxis()
st.pyplot(fi_fig)
withfeature_dist:
st.markdown("<h3 style='text-align: center;'>3.3 Top 15 Feature's Values Distribution.</h3>",unsafe_allow_html=True)
st.markdown("* By exploring the histograms below, you can find out the most common values or value ranges for each attribute and make decisions accordingly to decrease your organization's employee turnover rate. ")