mirror of
https://github.com/andwati/predictive_analysis.git
synced 2026-10-18 16:52:51 +00:00
- Created `streamlit_app.py` for a user-friendly dashboard to predict student outcomes using a Random Forest model. - Added `requirements.txt` to specify necessary Python packages for the application. - Implemented `train_and_save_model.py` to train the Random Forest model and save it along with preprocessing information. - Included detailed user input forms for various student characteristics and academic performance metrics. - Added custom styling for better UI/UX in the Streamlit app. - Integrated prediction results display with probability metrics and model performance insig
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
"""
|
|
Simple setup script to test if required packages are available
|
|
Run this first to check your environment
|
|
"""
|
|
|
|
def check_dependencies():
|
|
"""Check if all required packages are available"""
|
|
required_packages = [
|
|
'pandas', 'numpy', 'sklearn', 'streamlit', 'plotly'
|
|
]
|
|
|
|
missing_packages = []
|
|
|
|
for package in required_packages:
|
|
try:
|
|
if package == 'sklearn':
|
|
import sklearn
|
|
else:
|
|
__import__(package)
|
|
print(f"✅ {package} is available")
|
|
except ImportError:
|
|
print(f"❌ {package} is missing")
|
|
missing_packages.append(package)
|
|
|
|
if missing_packages:
|
|
print(f"\n📦 To install missing packages, run:")
|
|
if 'sklearn' in missing_packages:
|
|
missing_packages.remove('sklearn')
|
|
missing_packages.append('scikit-learn')
|
|
print(f"pip install {' '.join(missing_packages)}")
|
|
else:
|
|
print("\n🎉 All dependencies are available!")
|
|
print("You can now run: python train_and_save_model.py")
|
|
|
|
if __name__ == "__main__":
|
|
check_dependencies() |