Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Customer Income Prediction Model #55

Merged
merged 6 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 74 additions & 25 deletions App.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,76 @@
import streamlit as st

def home():
st.set_page_config(page_title="Predictive Calc - Machine Learning Models", page_icon="🤖")

st.title("Welcome to Predictive Calc!")
st.image('machine-learning.gif', caption='Your Hub for Predictive Insights', use_column_width=True)

st.markdown("""
## Explore Cutting-edge Machine Learning Models
**Predictive Calc** offers a powerful suite of machine learning models designed to assist you in making informed decisions. Whether it's predicting house prices, determining loan eligibility, or evaluating health risks, we have you covered.
""")

st.markdown("""
## Why Choose Predictive Calc?
- **Accurate Predictions**: Leverage state-of-the-art algorithms for highly accurate predictions.
- **User-friendly Interface**: Seamlessly interact with models tailored for real-world applications.
- **Comprehensive Calculators**: A collection of models designed for diverse decision-making needs.
- **Health & Financial Models**: Predict house prices, assess loan eligibility, and evaluate health risks such as Parkinson's and stress levels.
""")

st.markdown("""
---
**Ready to get started?** Select a calculator from the sidebar to begin your predictive journey!
""")

home()
st.set_page_config(page_title="Predictive Calc - Machine Learning Models", page_icon="🤖")

st.title("Welcome to Predictive Calc!")
st.image('machine-learning.gif', caption='Your Hub for Predictive Insights', use_column_width=True)

st.markdown("""
## Explore Cutting-edge Machine Learning Models
**Predictive Calc** offers a powerful suite of machine learning models designed to assist you in making informed decisions. Whether it's predicting house prices, determining loan eligibility, or evaluating health risks, we have you covered.
""")

st.markdown("""
## Why Choose Predictive Calc?
- **Accurate Predictions**: Leverage state-of-the-art algorithms for highly accurate predictions.
- **User-friendly Interface**: Seamlessly interact with models tailored for real-world applications.
- **Comprehensive Calculators**: A collection of models designed for diverse decision-making needs.
- **Health & Financial Models**: Predict house prices, assess loan eligibility, and evaluate health risks such as Parkinson's and stress levels.
""")

st.markdown("""
---
**Ready to get started?** Select a calculator from the sidebar to begin your predictive journey!
""")

st.markdown("---")

# List of available calculators
st.subheader("Available Calculators:")
st.write(
"- **Customer Income Estimation**: Estimate the annual income of a person based on socio-economic and demographic information."
)
st.write(
"- **House Price Prediction**: Estimate the price of a house based on various features."
)
st.write("- **Loan Eligibility**: Check your eligibility for different types of loans.")
st.write(
"- **Stress Level Detector**: Analyze your mental stress levels based on social media interactions."
)
st.write(
"- **Parkinson's Disease Detector**: Assess your risk of Parkinson's Disease with advanced machine learning algorithms."
)

# Parkinson's Disease Detector Section
with st.expander("Parkinson's Disease Detector - More Information"):
st.subheader("Introduction")
st.write(
"""
Parkinson's disease (PD) is a progressive neurodegenerative disorder that primarily affects movement. It often starts with subtle symptoms such as tremors, stiffness, and slow movement.
"""
)

# Dataset section
st.subheader("Oxford Parkinson's Disease Detection Dataset (UCI ML Repository)")
st.write(
"""
The dataset contains biomedical voice measurements from 31 people, 23 of whom have Parkinson's disease (PD). The main goal is to differentiate between healthy individuals and those with PD using the "status" column, where 0 indicates healthy and 1 indicates PD.
"""
)

# Input features section
st.subheader("Additional Variable Information")
st.write(
"""
- **MDVP_Fo(Hz)**: Average vocal fundamental frequency.
- **MDVP_Fhi(Hz)**: Maximum vocal fundamental frequency.
- **MDVP_Flo(Hz)**: Minimum vocal fundamental frequency.
- **MDVP_Jitter(%)**, **MDVP_Jitter(Abs)**, **MDVP_RAP**, **MDVP_PPQ**, **Jitter_DDP**: Measures of variation in fundamental frequency.
- **MDVP_Shimmer**, **MDVP_Shimmer(dB)**, **Shimmer_APQ3**, **Shimmer_APQ5**, **MDVP_APQ**, **Shimmer_DDA**: Measures of variation in amplitude.
- **NHR**, **HNR**: Noise-to-tonal ratio measures in the voice.
- **status**: Health status of the subject (1 - Parkinson's, 0 - healthy).
- **RPDE**, **D2**: Nonlinear dynamical complexity measures.
- **DFA**: Signal fractal scaling exponent.
- **spread1**, **spread2**, **PPE**: Nonlinear measures of fundamental frequency variation.
"""
)
107 changes: 107 additions & 0 deletions form_configs/customer_income.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"Customer Income Estimation Form": {
"Age": {
"field_name": "age",
"type": "number",
"min_value": 18,
"max_value": 100,
"default_value": 30,
"step": 1
},
"Workclass": {
"field_name": "workclass",
"type": "dropdown",
"options": ["Private", "State-gov", "Self-emp-not-inc", "Federal-gov",
"Local-gov", "Self-emp-inc", "Without-pay"],
"default_value": "Private"
},
"Financial Weight (fnlwgt)": {
"field_name": "fnlwgt",
"type": "number",
"min_value": 0,
"max_value": 1000000,
"default_value": 100000,
"step": 1000
},
"Education Level": {
"field_name": "education",
"type": "dropdown",
"options": ["Doctorate", "12th", "Bachelors", "7th-8th", "Some-college",
"HS-grad", "9th", "10th", "11th", "Masters", "Preschool",
"5th-6th", "Prof-school", "Assoc-voc", "Assoc-acdm", "1st-4th"],
"default_value": "Bachelors"
},
"Marital Status": {
"field_name": "marital_status",
"type": "dropdown",
"options": ["Divorced", "Never-married", "Married-civ-spouse", "Widowed",
"Separated", "Married-spouse-absent", "Married-AF-spouse"],
"default_value": "Never-married"
},
"Occupation": {
"field_name": "occupation",
"type": "dropdown",
"options": ["Exec-managerial", "Other-service", "Transport-moving",
"Adm-clerical", "Machine-op-inspct", "Sales", "Handlers-cleaners",
"Farming-fishing", "Protective-serv", "Prof-specialty",
"Craft-repair", "Tech-support", "Priv-house-serv", "Armed-Forces"],
"default_value": "Exec-managerial"
},
"Relationship": {
"field_name": "relationship",
"type": "dropdown",
"options": ["Not-in-family", "Own-child", "Husband", "Wife", "Unmarried",
"Other-relative"],
"default_value": "Unmarried"
},
"Race": {
"field_name": "race",
"type": "dropdown",
"options": ["White", "Black", "Asian-Pac-Islander", "Amer-Indian-Eskimo", "Other"],
"default_value": "White"
},
"Sex": {
"field_name": "sex",
"type": "dropdown",
"options": ["Male", "Female"],
"default_value": "Male"
},
"Capital Gain": {
"field_name": "capital_gain",
"type": "number",
"min_value": 0,
"max_value": 100000,
"default_value": 0,
"step": 1000
},
"Capital Loss": {
"field_name": "capital_loss",
"type": "number",
"min_value": 0,
"max_value": 100000,
"default_value": 0,
"step": 1000
},
"Earn per Hour": {
"field_name": "hours_per_week",
"type": "number",
"min_value": 0,
"max_value": 100,
"default_value": 25,
"step": 1
},
"Native Country": {
"field_name": "native_country",
"type": "dropdown",
"options": ["United-States", "Japan", "South", "Portugal", "Italy", "Mexico",
"Ecuador", "England", "Philippines", "China", "Germany",
"Dominican-Republic", "Jamaica", "Vietnam", "Thailand",
"Puerto-Rico", "Cuba", "India", "Cambodia", "Yugoslavia", "Iran",
"El-Salvador", "Poland", "Greece", "Ireland", "Canada",
"Guatemala", "Scotland", "Columbia", "Outlying-US(Guam-USVI-etc)",
"Haiti", "Peru", "Nicaragua", "Trinadad&Tobago", "Laos", "Taiwan",
"France", "Hungary", "Honduras", "Hong", "Holand-Netherlands"],
"default_value": "United-States"
}
}
}
Loading