MCPcopy Create free account

hub / github.com/aliviahossain/Disease-prediction / functions

Functions597 in github.com/aliviahossain/Disease-prediction

↓ 1 callersMethodsigmoid
Sigmoid activation function for logistic regression
backend/models/ml_model.py:1006
↓ 1 callersFunctionsurvival_chance
(prior, sensitivity, specificity, test_result)
app.py:31
↓ 1 callersFunctiontest_age_bias
()
verify_age_bias.py:4
↓ 1 callersMethodto_dict
(self)
backend/models/prediction.py:142
↓ 1 callersFunctionvalidateProfileForm
()
backend/static/profile.js:96
↓ 1 callersMethodverify_order_invariance
Verify Bayesian posterior stability across symptom order permutations.
backend/utils/calculator.py:133
↓ 1 callersFunctionverify_signup
()
verify_signup.py:11
↓ 1 callersFunctionviewEntry
(id)
backend/static/js/history.js:328
Method__init__
( self, confidence_threshold: float = CONFIDENCE_THRESHOLD, margin_threshold: float =
backend/utils/uncertainty_handler.py:55
Method__init__
(self)
backend/utils/calculator.py:76
Method__init__
Initialize validation error. Args: message: Error message field: Field that failed validation **
backend/middleware/error_handler.py:45
Method__init__
Initialize not found error. Args: resource: Resource type (e.g., 'Disease', 'Patient') resource_id: Resource
backend/middleware/error_handler.py:63
Method__init__
Initialize unauthorized error.
backend/middleware/error_handler.py:85
Method__init__
Initialize forbidden error.
backend/middleware/error_handler.py:94
Method__init__
Initialize rate limit error. Args: retry_after: Seconds until retry is allowed
backend/middleware/error_handler.py:102
Method__init__
Initialize prediction error. Args: message: Error message model_name: Name of the model that failed
backend/middleware/error_handler.py:116
Method__init__
Initialize error handler. Args: app: Flask application instance
backend/middleware/error_handler.py:135
Method__init__
(self, cleanup_interval=60)
backend/middleware/security.py:25
Method__init__
(self, redis_url="redis://localhost:6379/0")
backend/middleware/security.py:127
Method__init__
(self, db_path="backend/rate_limit.db", cleanup_interval=60)
backend/middleware/security.py:167
Method__init__
Initialize rate limiter with configured backend selection.
backend/middleware/security.py:278
Method__init__
Initialize security validator.
backend/middleware/security.py:397
Method__init__
Initialize structured logger. Args: name: Logger name log_dir: Directory for log files
backend/middleware/logger.py:21
Method__init__
Initialize request logger. Args: app: Flask application instance
backend/middleware/logger.py:425
Method__init__
(self, ml_model)
backend/analysis/bias_analysis.py:34
Method__init__
(self, version: str, trained_date: str, accuracy: float, source: str)
backend/services/model_version_manager.py:15
Method__init__
(self)
backend/services/model_version_manager.py:34
Method__init__
(self)
backend/services/synthetic_patient_service.py:13
Method__init__
(self)
backend/services/encryption_service.py:8
Method__init__
(self)
backend/src/calculator.py:57
Method__init__
(self, **kwargs)
backend/models/user.py:24
Method__init__
(self, **kwargs)
backend/models/prediction.py:127
Method__init__
(self)
backend/models/ml_model.py:15
Method__repr__
(self)
backend/models/user.py:27
Method__repr__
(self)
backend/models/prediction.py:130
Method__repr__
(self)
backend/models/patient_history.py:116
Method_loads
(blob)
backend/models/patient_history.py:91
Function_make
(email=None, password="hunter22")
backend/tests/test_patient_history.py:97
Function_make_session_permanent
()
backend/__init__.py:257
Method_periodic_cleanup
(self)
backend/middleware/security.py:35
Method_periodic_cleanup
(self)
backend/middleware/security.py:198
Methodabs_contribution
(value)
backend/models/ml_model.py:1122
Functionadd_history_entry
()
backend/routes/history_routes.py:172
Functionadjust_prediction_threshold
Get adjusted threshold for disease prediction. Uses class-specific thresholds to balance sensitivity vs specificity. For critical di
backend/services/sensitivity_optimizer.py:8
Functionapp
Flask app bound to an isolated SQLite DB. Windows-safe teardown: - close the mkstemp file handle immediately (otherwise it holds a
backend/tests/test_patient_history.py:37
Functionapp
(monkeypatch, tmp_path)
backend/tests/test_csrf.py:10
Functionapp
Create and configure a test application instance with an isolated SQLite DB.
backend/tests/test_doctor_dashboard.py:17
Functionapp
()
tests/test_disease_routes.py:6
Functionapp
()
tests/test_history_routes.py:6
Functionapply_ensemble_voting
Apply ensemble voting to reduce false negatives. Combines multiple models: Naive Bayes, Random Forest, SVM. Prediction: "positive" i
backend/services/sensitivity_optimizer.py:26
FunctionattachResetOnInput
()
backend/static/script.js:114
Functionauth
()
backend/routes/auth_routes.py:152
Functionauth_client
Create an authenticated test client.
backend/tests/test_doctor_dashboard.py:68
Functionbias_analysis_api
API endpoint that returns the full bias analysis as JSON. Used by the dashboard frontend to populate charts and tables.
backend/routes/bias_routes.py:21
Functionbias_dashboard
Render the bias analysis dashboard page.
backend/routes/bias_routes.py:15
FunctionbuildConfidenceMeter
(confidence)
backend/static/assets/js/uncertainty_ui.js:112
Functioncalc
()
tests/test_calculator.py:60
FunctioncalculateDisease
()
backend/static/script.js:370
Methodcalculate_posterior
Calculates the posterior probability using Bayes' Theorem for ML models.
backend/utils/calculator.py:90
Functioncalculate_symptom_contributions
Calculate log-odds contribution of each symptom.
backend/services/contribution_analyzer.py:4
Methodcalculate_with_test_result
Calculate posterior probability based on diagnostic test result.
backend/utils/calculator.py:212
Functioncalculator
()
backend/routes/disease_routes.py:70
Methodcan_rollback
Check if rollback is possible.
backend/services/model_version_manager.py:56
FunctionchangeRecommendationLanguage
()
backend/static/script.js:563
Functionchat
API endpoint to handle chatbot messages. Expected JSON payload: { "messages": "History of chat" }
backend/routes/chat_routes.py:11
FunctionclearAll
()
backend/static/js/history.js:304
Functionclear_history
()
backend/utils/history_manager.py:51
Functionclear_history
()
backend/routes/history_routes.py:157
Functionclient
(app)
backend/tests/test_patient_history.py:78
Functionclient
(monkeypatch, tmp_path)
backend/tests/test_profile_validation.py:15
Functionclient
Create test client with test database
backend/tests/test_fetch_endpoints.py:15
Functionclient
()
backend/tests/test_integration.py:9
Functionclient
(app)
backend/tests/test_csrf.py:23
Functionclient
Create a test client.
backend/tests/test_doctor_dashboard.py:48
Functionclient
(app)
tests/test_disease_routes.py:14
Functionclient
(app)
tests/test_history_routes.py:14
Functionclose
()
backend/static/profile.js:19
Functioncompute_confidence_interval
Compute 95% confidence interval using bootstrap resampling. Returns {point, lower, upper, confidence_level}
backend/services/bootstrap_service.py:4
Functionconnect
()
backend/routes/general_routes.py:27
Functioncontact
()
backend/routes/disease_routes.py:191
Functioncors_headers
Decorator to add CORS headers to response. Example: @app.route('/api/data') @cors_headers def get_data():
backend/middleware/security.py:662
Methodcritical
Log critical message.
backend/middleware/logger.py:135
Functiondecorated_function
(*args, **kwargs)
backend/middleware/error_handler.py:360
Functiondecorated_function
(*args, **kwargs)
backend/middleware/security.py:533
Functiondecorated_function
(*args, **kwargs)
backend/middleware/logger.py:307
Functiondecorator
(f)
backend/middleware/error_handler.py:431
Functiondecorator
(f)
backend/middleware/security.py:531
Methoddecrypt
(self, text)
backend/services/encryption_service.py:25
Functiondelete_history_entry
(entry_id: int)
backend/routes/history_routes.py:144
Functiondisease
()
backend/routes/disease_routes.py:120
Functiondisease_detection_dashboard
()
backend/routes/disease_routes.py:483
Functiondisplay_results
Display the posterior probabilities.
backend/utils/calculator.py:50
Functiondoctor_dashboard
Render the doctor dashboard page
backend/routes/doctor_routes.py:132
FunctiondownloadResults
(format)
backend/static/script.js:1015
Functiondownload_ml_results
()
backend/routes/disease_routes.py:347
Functiondownload_results
()
backend/routes/disease_routes.py:246
Functionedge_cases
Generate edge cases for model testing.
backend/routes/synthetic_routes.py:79
Methodencrypt
(self, text)
backend/services/encryption_service.py:18
Functionerror_response
Create a standardized error response. Args: message: Error message status_code: HTTP status code **kwargs: Additiona
backend/middleware/error_handler.py:477
Functionexplain_prediction
SHAP-based prediction explainability endpoint.
backend/routes/ml_routes.py:647
← previousnext →201–300 of 597, ranked by callers