Skip to content

Commit 044b987

Browse files
authored
Merge pull request #47 from devcolor/rebranding/task-5-ml-pipeline
Task 5: Update ML pipeline for Bishop State
2 parents 6b1b664 + 7ae2f90 commit 044b987

3 files changed

Lines changed: 23 additions & 23 deletions

File tree

ai_model/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
"""
2-
KCTCS Student Success Prediction - AI Model Package
3-
====================================================
2+
Bishop State Student Success Prediction - AI Model Package
3+
==========================================================
44
55
This package contains machine learning models for predicting student success
6-
at Kentucky Community and Technical College System (KCTCS).
6+
at Bishop State Community College (BSCC).
77
88
Modules:
99
--------
1010
- complete_ml_pipeline.py: Complete ML pipeline with 5 prediction models
11-
- merge_kctcs_data.py: Data merging and preprocessing script
11+
- merge_bishop_state_data.py: Data merging and preprocessing script
1212
1313
Models:
1414
-------

ai_model/complete_ml_pipeline.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
"""
2-
Complete ML Pipeline for KCTCS Student Success Prediction
3-
==========================================================
2+
Complete ML Pipeline for Bishop State Student Success Prediction
3+
================================================================
44
Models:
55
1. Retention Prediction (Binary Classification)
66
2. Early Warning System (Binary Classification)
77
3. Time-to-Credential Prediction (Regression)
88
4. Credential Type Prediction (Multi-class Classification)
99
5. Course Success Prediction (Regression)
1010
11-
Output: Predictions saved to MariaDB database tables
11+
Output: Predictions saved to Supabase Postgres tables
1212
"""
1313

1414
import pandas as pd
@@ -71,7 +71,7 @@
7171
print("=" * 80)
7272

7373
print("\nLoading student-level dataset...")
74-
student_file = os.path.join(DATA_DIR, 'kctcs_student_level_with_zip.csv')
74+
student_file = os.path.join(DATA_DIR, 'bishop_state_student_level_with_zip.csv')
7575
print(f"Reading from: {student_file}")
7676
df = pd.read_csv(student_file)
7777
print(f"Loaded {len(df):,} students with {len(df.columns)} features")
@@ -1075,7 +1075,7 @@ def assign_alert_level(risk_score):
10751075
USE_DATABASE = False
10761076

10771077
# Always save CSV files for backup and local analysis
1078-
output_file = os.path.join(DATA_DIR, 'kctcs_student_level_with_predictions.csv')
1078+
output_file = os.path.join(DATA_DIR, 'bishop_state_student_level_with_predictions.csv')
10791079
df.to_csv(output_file, index=False)
10801080
print(f"\n✓ Saved student-level predictions to CSV:")
10811081
print(f" File: {output_file}")
@@ -1090,7 +1090,7 @@ def assign_alert_level(risk_score):
10901090
print("=" * 80)
10911091

10921092
print("\nLoading course-level merged file...")
1093-
merged_file = os.path.join(DATA_DIR, 'kctcs_merged_with_zip.csv')
1093+
merged_file = os.path.join(DATA_DIR, 'bishop_state_student_level_with_zip.csv')
10941094
print(f"Reading from: {merged_file}")
10951095
merged_df = pd.read_csv(merged_file)
10961096
print(f"Loaded {len(merged_df):,} course records")
@@ -1123,7 +1123,7 @@ def assign_alert_level(risk_score):
11231123
print(f" Columns: {len(merged_with_predictions.columns)}")
11241124

11251125
# Always save CSV files for backup and local analysis
1126-
output_file = os.path.join(DATA_DIR, 'kctcs_merged_with_predictions.csv')
1126+
output_file = os.path.join(DATA_DIR, 'bishop_state_merged_with_predictions.csv')
11271127
merged_with_predictions.to_csv(output_file, index=False)
11281128
print(f"\n✓ Saved course-level predictions to CSV:")
11291129
print(f" File: {output_file}")
@@ -1138,7 +1138,7 @@ def assign_alert_level(risk_score):
11381138
print("=" * 80)
11391139

11401140
summary_report = f"""
1141-
KCTCS ML PIPELINE - SUMMARY REPORT
1141+
BISHOP STATE ML PIPELINE - SUMMARY REPORT
11421142
{'=' * 80}
11431143
Generated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}
11441144
@@ -1324,7 +1324,7 @@ def assign_alert_level(risk_score):
13241324
db_connected = 1 if USE_DATABASE else 0
13251325
print(f"\nDatabase Connection Status: {db_connected}")
13261326
if db_connected == 1:
1327-
print(" ✓ Successfully connected to MariaDB")
1327+
print(" ✓ Successfully connected to Supabase Postgres")
13281328
print(f" ✓ Database: {DB_CONFIG['database']}")
13291329
print(f" ✓ Host: {DB_CONFIG['host']}")
13301330
else:

ai_model/complete_ml_pipeline_csv_only.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Complete ML Pipeline for KCTCS Student Success Prediction (CSV Output Only)
2+
Complete ML Pipeline for Bishop State Student Success Prediction (CSV Output Only)
33
==========================================================
44
Models:
55
1. Retention Prediction (Binary Classification)
@@ -50,7 +50,7 @@
5050
print("=" * 80)
5151

5252
print("\nLoading student-level dataset...")
53-
student_file = os.path.join(DATA_DIR, 'kctcs_student_level_with_zip.csv')
53+
student_file = os.path.join(DATA_DIR, 'bishop_state_student_level_with_zip.csv')
5454
print(f"Reading from: {student_file}")
5555
df = pd.read_csv(student_file)
5656
print(f"Loaded {len(df):,} students with {len(df.columns)} features")
@@ -1040,7 +1040,7 @@ def assign_alert_level(risk_score):
10401040
print("=" * 80)
10411041

10421042
# Save student-level predictions with all columns
1043-
output_file = os.path.join(DATA_DIR, 'kctcs_student_level_with_predictions.csv')
1043+
output_file = os.path.join(DATA_DIR, 'bishop_state_student_level_with_predictions.csv')
10441044
df.to_csv(output_file, index=False)
10451045
print(f"\n✓ Saved student-level predictions to CSV:")
10461046
print(f" File: {output_file}")
@@ -1071,7 +1071,7 @@ def assign_alert_level(risk_score):
10711071
predictions_df = df[prediction_columns].copy()
10721072

10731073
print("\nLoading course-level merged file...")
1074-
merged_file = os.path.join(DATA_DIR, 'kctcs_merged_with_zip.csv')
1074+
merged_file = os.path.join(DATA_DIR, 'bishop_state_student_level_with_zip.csv')
10751075
print(f"Reading from: {merged_file}")
10761076
merged_df = pd.read_csv(merged_file)
10771077
print(f"Loaded {len(merged_df):,} course records")
@@ -1091,7 +1091,7 @@ def assign_alert_level(risk_score):
10911091
)
10921092

10931093
# Save course-level predictions
1094-
output_file = os.path.join(DATA_DIR, 'kctcs_merged_with_predictions.csv')
1094+
output_file = os.path.join(DATA_DIR, 'bishop_state_merged_with_predictions.csv')
10951095
merged_with_predictions.to_csv(output_file, index=False)
10961096
print(f"\n✓ Saved course-level predictions to CSV:")
10971097
print(f" File: {output_file}")
@@ -1106,7 +1106,7 @@ def assign_alert_level(risk_score):
11061106
print("=" * 80)
11071107

11081108
summary_report = f"""
1109-
KCTCS ML PIPELINE - SUMMARY REPORT (CSV OUTPUT ONLY)
1109+
BISHOP STATE ML PIPELINE - SUMMARY REPORT (CSV OUTPUT ONLY)
11101110
{'=' * 80}
11111111
Generated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}
11121112
@@ -1221,12 +1221,12 @@ def assign_alert_level(risk_score):
12211221
summary_report += f"""
12221222
OUTPUT: CSV FILES
12231223
{'-' * 80}
1224-
1. kctcs_student_level_with_predictions.csv
1224+
1. bishop_state_student_level_with_predictions.csv
12251225
- Student-level data with all predictions
12261226
- {len(df):,} students
12271227
- {len(df.columns)} columns
12281228
1229-
2. kctcs_merged_with_predictions.csv
1229+
2. bishop_state_merged_with_predictions.csv
12301230
- Course-level data with predictions
12311231
- {len(merged_with_predictions):,} records
12321232
- {len(merged_with_predictions.columns)} columns
@@ -1294,8 +1294,8 @@ def assign_alert_level(risk_score):
12941294
print("=" * 80)
12951295
print(f"\nCompleted: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
12961296
print("\nOutput files:")
1297-
print(f" 1. {os.path.join(DATA_DIR, 'kctcs_student_level_with_predictions.csv')}")
1298-
print(f" 2. {os.path.join(DATA_DIR, 'kctcs_merged_with_predictions.csv')}")
1297+
print(f" 1. {os.path.join(DATA_DIR, 'bishop_state_student_level_with_predictions.csv')}")
1298+
print(f" 2. {os.path.join(DATA_DIR, 'bishop_state_merged_with_predictions.csv')}")
12991299
print(f" 3. {os.path.join(DATA_DIR, 'model_comparison_results.csv')}")
13001300
print(f" 4. {report_file}")
13011301
print("=" * 80)

0 commit comments

Comments
 (0)