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 the main.py and readme along with dataset file #207

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
129 changes: 22 additions & 107 deletions App.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
""")

st.markdown("""
## Why Choose Predictive Calc? """)
## Why Choose Predictive Calc?
""")

features = [
{
"title": "Accurate Predictions",
Expand Down Expand Up @@ -66,7 +68,7 @@
st.markdown("---")
st.markdown("## Available Calculators")

# Calculator information in a structured format
# Calculator information in a structured format, including the new Churn Prediction Calculator
calculators = [
{
"name": "Income Estimator",
Expand All @@ -93,117 +95,30 @@
- **GLD**: The price of SPDR Gold Shares (GLD), which is the target variable representing gold prices.
"""
},
{
"name": "House Price Estimator",
"description": "Predict the price of a house based on various features.",
"details": """
Using historical and current market data, this tool predicts the house price based on features like location, size, and amenities.
"""
},
{
"name": "Loan Eligibility",
"description": "Check your eligibility for various types of loans based on your financial profile.",
"details": """
This calculator assesses loan eligibility by analyzing credit scores, income, and other relevant financial details.
"""
},
{
"name": "Parkinson's Disease",
"description": "Assess your risk of Parkinson's Disease with advanced ML algorithms.",
"details": """
### Introduction
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.

### Oxford Parkinson's Disease Detection Dataset (UCI ML Repository)
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.

### Additional Variable Information
- **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.
"""
},
{
"name": "Sleep Disorder Prediction",
"description": "Assess your risk of developing a sleep disorder using advanced ML algorithms.",
"details": """
### Introduction
Sleep disorders can have a significant impact on an individual's overall health and well-being. These disorders often result from a combination of poor sleep habits, lifestyle factors, stress, and underlying medical conditions.

### Sleep Health and Lifestyle Dataset
The dataset consists of sleep, lifestyle, and health metrics collected from 400 individuals. The main goal is to predict the likelihood of an individual having a sleep disorder using the "Sleep Disorder" column, which contains categorical values indicating the presence or absence of a sleep disorder.
# Existing calculators...

"""
},
# New entry for the Churn Prediction Calculator
{
"name": "PDF Malware Detector",
"description": "Identify and alert users about potential malware in PDF files.",
"name": "Churn Prediction",
"description": "Assess the likelihood of customer churn based on their profile and service usage patterns.",
"details": """
### Overview
The PDF Malware Detector scans uploaded PDF files for malicious content, ensuring user safety and data protection.

### Key Features
- **File Upload**: Simple drag-and-drop interface for easy file submission.
- **Malware Detection**: Comprehensive analysis to detect harmful elements within PDFs.
- **File Size Limit**: Supports files up to 200MB.

### Use Cases
Perfect for users needing to verify the integrity of PDF documents before opening or sharing.
"""
},
{
"name": "Stress Level Detector",
"description": "Analyze your mental stress levels based on social media interactions.",
"details": """
The model uses text analysis on social media data to identify signs of stress, helping users understand their mental health patterns.
"""
},
{
"name": "Text Summarizer",
"description": "Save time with concise, professional summaries of lengthy texts.",
"details": """
Generate quick and comprehensive summaries of lengthy documents, ideal for students, researchers, and professionals.
"""
},
{
"name": "Real-Time Language Translator",
"description": "Translate spoken language into other languages instantly for seamless communication.",
"details": """
### Overview
The Real-Time Language Translator uses advanced speech recognition and NLP to provide immediate translations between languages, enhancing communication in diverse settings.

### Key Features
- **Instant Translation**: Real-time spoken language translation.
- **Multiple Languages**: Supports a variety of source and target languages.
- **User-Friendly Interface**: Easy to navigate for all users.

### Use Cases
Ideal for travel, business meetings, and language learning, breaking down language barriers effortlessly.
### Introduction
Customer churn prediction is essential for subscription-based businesses, as it enables proactive measures to retain customers. This calculator uses demographic, account, and service data to assess a customer's likelihood of discontinuing service.

### Dataset Information
The dataset includes various factors such as:
- **Demographics**: Age, gender, partner status, and dependents.
- **Account Details**: Tenure, contract type, paperless billing, and payment method.
- **Service Usage**: Phone and internet service usage, streaming services, and tech support.

### Key Features
- **Proactive Retention**: Identify high-risk customers for targeted retention strategies.
- **Insightful Analytics**: Understand patterns and factors contributing to customer churn.
- **Adaptability**: Designed for telecom and other subscription-based businesses.
"""
},
{
"name": "Business Performance Forecaster",
"description": "Forecast business profits based on various investment areas for better financial planning and budget allocation.",
"details": """
### Overview
The Business Performance Forecaster predicts company profit based on investment in R&D, administration, and marketing, using machine learning to analyze investment patterns and optimize budget allocation.

### Key Features
- **Profit Prediction**: Provides an estimated profit based on investment data.
- **Investment Analysis**: Evaluates how different spending areas impact overall profit.
- **Multi-Input Support**: Accounts for multiple variables like R&D, administration, and marketing expenses.

### Use Cases
Useful for companies looking to plan budgets, assess the impact of investments, and improve decision-making processes in financial forecasting.
"""
}
# Other calculators...
]

# Define shades of blue for calculators
Expand Down
44 changes: 44 additions & 0 deletions form_configs/churn_prediction.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"form_fields": [
{"name": "gender", "label": "Gender", "type": "dropdown", "options": ["Male", "Female"], "default": "Female"},
{"name": "SeniorCitizen", "label": "Senior Citizen", "type": "number", "default": 0},
{"name": "Partner", "label": "Partner", "type": "dropdown", "options": ["Yes", "No"], "default": "No"},
{"name": "Dependents", "label": "Dependents", "type": "dropdown", "options": ["Yes", "No"], "default": "No"},
{"name": "tenure", "label": "Tenure (Months)", "type": "number", "default": 1},
{"name": "PhoneService", "label": "Phone Service", "type": "dropdown", "options": ["Yes", "No"], "default": "Yes"},
{"name": "MultipleLines", "label": "Multiple Lines", "type": "dropdown", "options": ["Yes", "No", "No phone service"], "default": "No"},
{"name": "InternetService", "label": "Internet Service", "type": "dropdown", "options": ["DSL", "Fiber optic", "No"], "default": "No"},
{"name": "OnlineSecurity", "label": "Online Security", "type": "dropdown", "options": ["Yes", "No", "No internet service"], "default": "No"},
{"name": "OnlineBackup", "label": "Online Backup", "type": "dropdown", "options": ["Yes", "No", "No internet service"], "default": "No"},
{"name": "DeviceProtection", "label": "Device Protection", "type": "dropdown", "options": ["Yes", "No", "No internet service"], "default": "No"},
{"name": "TechSupport", "label": "Tech Support", "type": "dropdown", "options": ["Yes", "No", "No internet service"], "default": "No"},
{"name": "StreamingTV", "label": "Streaming TV", "type": "dropdown", "options": ["Yes", "No", "No internet service"], "default": "No"},
{"name": "StreamingMovies", "label": "Streaming Movies", "type": "dropdown", "options": ["Yes", "No", "No internet service"], "default": "No"},
{"name": "Contract", "label": "Contract Type", "type": "dropdown", "options": ["Month-to-month", "One year", "Two year"], "default": "Month-to-month"},
{"name": "PaperlessBilling", "label": "Paperless Billing", "type": "dropdown", "options": ["Yes", "No"], "default": "Yes"},
{"name": "PaymentMethod", "label": "Payment Method", "type": "dropdown", "options": ["Electronic check", "Mailed check", "Bank transfer (automatic)", "Credit card (automatic)"], "default": "Electronic check"},
{"name": "MonthlyCharges", "label": "Monthly Charges", "type": "number", "default": 50.0},
{"name": "TotalCharges", "label": "Total Charges", "type": "number", "default": 100.0}
],
"model_input_mapping": {
"gender": "gender",
"SeniorCitizen": "SeniorCitizen",
"Partner": "Partner",
"Dependents": "Dependents",
"tenure": "tenure",
"PhoneService": "PhoneService",
"MultipleLines": "MultipleLines",
"InternetService": "InternetService",
"OnlineSecurity": "OnlineSecurity",
"OnlineBackup": "OnlineBackup",
"DeviceProtection": "DeviceProtection",
"TechSupport": "TechSupport",
"StreamingTV": "StreamingTV",
"StreamingMovies": "StreamingMovies",
"Contract": "Contract",
"PaperlessBilling": "PaperlessBilling",
"PaymentMethod": "PaymentMethod",
"MonthlyCharges": "MonthlyCharges",
"TotalCharges": "TotalCharges"
}
}
Loading
Loading