MCPcopy Create free account

hub / github.com/aliviahossain/Disease-prediction / types & classes

Types & classes52 in github.com/aliviahossain/Disease-prediction

↓ 12 callersClassUncertaintyHandler
Evaluates whether a prediction is confident enough to show the user. Parameters ---------- confidence_threshold : float Absolute m
backend/utils/uncertainty_handler.py:45
↓ 10 callersClassPreprocessingError
Raised when a prediction payload cannot be cleaned safely.
backend/preprocessing/cleaning.py:24
↓ 9 callersClassPredictionHistory
backend/models/prediction.py:76
↓ 8 callersClassSyntheticPatientGenerator
Generate synthetic patient profiles for model testing.
backend/services/synthetic_patient_service.py:10
↓ 7 callersClassUser
backend/models/user.py:6
↓ 7 callersClassValidationError
Exception for validation errors.
backend/middleware/error_handler.py:42
↓ 5 callersClassInMemoryBackend
Thread-safe in-memory rate limit backend. Uses a background thread to prune stale entries periodically.
backend/middleware/security.py:19
↓ 4 callersClassBayesCalculator
Bayesian probability calculator for disease prediction. Compatible with ML model integration.
backend/src/calculator.py:51
↓ 4 callersClassRateLimiter
Token bucket rate limiter for API endpoints. Implements per-IP and per-endpoint rate limiting using pluggable backends.
backend/middleware/security.py:272
↓ 3 callersClassDiseaseMLModel
Machine Learning model for disease prediction based on symptoms. Uses logistic regression-style weighted scoring.
backend/models/ml_model.py:9
↓ 3 callersClassPatientHistory
A single saved prediction / calculation entry for a user. One row is created per call to the Bayesian calculator or the image-based disease-t
backend/models/patient_history.py:18
↓ 3 callersClassSQLiteBackend
SQLite-based rate limit backend. Uses WAL mode for high concurrency support among Gunicorn workers.
backend/middleware/security.py:161
↓ 2 callersClassRedisBackend
Distributed Redis rate limit backend using TTL-based keys and an atomic Lua script.
backend/middleware/security.py:94
↓ 1 callersClassBiasAnalyzer
Analyzes bias and coverage in the disease prediction model's dataset. Generates metrics including: - Class distribution across diseases
backend/analysis/bias_analysis.py:16
↓ 1 callersClassCleanedPredictionInput
backend/preprocessing/cleaning.py:31
↓ 1 callersClassDisease
backend/models/disease.py:4
↓ 1 callersClassEncryptionService
backend/services/encryption_service.py:7
↓ 1 callersClassErrorHandler
Centralized error handler for Flask application.
backend/middleware/error_handler.py:130
↓ 1 callersClassJsonFormatter
JSON formatter for structured logging.
backend/middleware/logger.py:216
↓ 1 callersClassModelVersion
Manages model versions and metadata.
backend/services/model_version_manager.py:12
↓ 1 callersClassModelVersionManager
Manages model versions and training cycles.
backend/services/model_version_manager.py:31
↓ 1 callersClassNotFoundError
Exception for resource not found errors.
backend/middleware/error_handler.py:60
↓ 1 callersClassSecurityValidator
Security validation for API requests. Prevents common attacks like XSS, SQL injection, etc.
backend/middleware/security.py:375
↓ 1 callersClassStructuredLogger
Structured logger with JSON formatting and multiple log levels.
backend/middleware/logger.py:16
↓ 1 callersClassUnauthorizedError
Exception for unauthorized access errors.
backend/middleware/error_handler.py:82
↓ 1 callersClassWeird
backend/tests/test_patient_history.py:204
ClassAppError
Base exception class for application errors.
backend/middleware/error_handler.py:13
ClassBayesCalculator
Bayesian probability calculator for disease prediction. Enhanced with data types, risk stratification, and backwards compatibility.
backend/utils/calculator.py:70
ClassForbiddenError
Exception for forbidden access errors.
backend/middleware/error_handler.py:91
ClassPredictionError
Exception for prediction/ML model errors.
backend/middleware/error_handler.py:113
ClassRateLimitError
Exception for rate limit exceeded errors.
backend/middleware/error_handler.py:99
ClassRequestLogger
Request logger middleware for Flask.
backend/middleware/logger.py:420
ClassRiskLevel
backend/services/risk_stratification_service.py:4
ClassTemporalAnalysisEngine
Advanced engine to process sequential patient history, analyze vital trends, and compute dynamic survival probabilities.
backend/utils/temporal_analysis.py:13
ClassTestBayesianCalculator
backend/tests/test_calculator.py:39
ClassTestConfiguration
backend/tests/test_uncertainty_handler.py:26
ClassTestDoctorDashboardAPI
Tests for the Doctor Dashboard API endpoint.
backend/tests/test_doctor_dashboard.py:126
ClassTestDoctorDashboardPage
Tests for the Doctor Dashboard page rendering.
backend/tests/test_doctor_dashboard.py:318
ClassTestErrorHandling
Test proper error handling across endpoints
backend/tests/test_fetch_endpoints.py:180
ClassTestHighConfidencePredictions
backend/tests/test_uncertainty_handler.py:125
ClassTestHistoryAPI
backend/tests/test_patient_history.py:244
ClassTestHistoryAPIStandalone
backend/tests/test_patient_history.py:233
ClassTestHistoryEndpoint
Test /api/history endpoint fetch error handling
backend/tests/test_fetch_endpoints.py:45
ClassTestHomePageFetch
Test home page fetch error handling
backend/tests/test_fetch_endpoints.py:127
ClassTestLowConfidenceDetection
backend/tests/test_uncertainty_handler.py:54
ClassTestMLSymptomsEndpoint
Test /api/ml/symptoms endpoint for home page
backend/tests/test_fetch_endpoints.py:85
ClassTestPatientHistoryModelStandalone
These tests insert PatientHistory rows with a synthetic user_id that isn't tied to a real User row. They exercise the model's serialization an
backend/tests/test_patient_history.py:126
ClassTestPredictionHistoryModel
Tests for the PredictionHistory model.
backend/tests/test_doctor_dashboard.py:268
ClassTestPredictionPersistence
Tests for prediction persistence in the ML predict endpoint.
backend/tests/test_doctor_dashboard.py:203
ClassTestResponseOkCheck
Test that frontend can properly check response.ok
backend/tests/test_fetch_endpoints.py:223
ClassTestSaveHistoryServiceStandalone
backend/tests/test_patient_history.py:174
ClassTestUserFacingMessages
backend/tests/test_uncertainty_handler.py:94