Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aliviahossain/Disease-prediction
/ functions
Functions
597 in github.com/aliviahossain/Disease-prediction
⨍
Functions
597
◇
Types & classes
52
↳
Endpoints
60
↓ 1 callers
Method
sigmoid
Sigmoid activation function for logistic regression
backend/models/ml_model.py:1006
↓ 1 callers
Function
survival_chance
(prior, sensitivity, specificity, test_result)
app.py:31
↓ 1 callers
Function
test_age_bias
()
verify_age_bias.py:4
↓ 1 callers
Method
to_dict
(self)
backend/models/prediction.py:142
↓ 1 callers
Function
validateProfileForm
()
backend/static/profile.js:96
↓ 1 callers
Method
verify_order_invariance
Verify Bayesian posterior stability across symptom order permutations.
backend/utils/calculator.py:133
↓ 1 callers
Function
verify_signup
()
verify_signup.py:11
↓ 1 callers
Function
viewEntry
(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
Method
abs_contribution
(value)
backend/models/ml_model.py:1122
Function
add_history_entry
()
backend/routes/history_routes.py:172
Function
adjust_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
Function
app
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
Function
app
(monkeypatch, tmp_path)
backend/tests/test_csrf.py:10
Function
app
Create and configure a test application instance with an isolated SQLite DB.
backend/tests/test_doctor_dashboard.py:17
Function
app
()
tests/test_disease_routes.py:6
Function
app
()
tests/test_history_routes.py:6
Function
apply_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
Function
attachResetOnInput
()
backend/static/script.js:114
Function
auth
()
backend/routes/auth_routes.py:152
Function
auth_client
Create an authenticated test client.
backend/tests/test_doctor_dashboard.py:68
Function
bias_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
Function
bias_dashboard
Render the bias analysis dashboard page.
backend/routes/bias_routes.py:15
Function
buildConfidenceMeter
(confidence)
backend/static/assets/js/uncertainty_ui.js:112
Function
calc
()
tests/test_calculator.py:60
Function
calculateDisease
()
backend/static/script.js:370
Method
calculate_posterior
Calculates the posterior probability using Bayes' Theorem for ML models.
backend/utils/calculator.py:90
Function
calculate_symptom_contributions
Calculate log-odds contribution of each symptom.
backend/services/contribution_analyzer.py:4
Method
calculate_with_test_result
Calculate posterior probability based on diagnostic test result.
backend/utils/calculator.py:212
Function
calculator
()
backend/routes/disease_routes.py:70
Method
can_rollback
Check if rollback is possible.
backend/services/model_version_manager.py:56
Function
changeRecommendationLanguage
()
backend/static/script.js:563
Function
chat
API endpoint to handle chatbot messages. Expected JSON payload: { "messages": "History of chat" }
backend/routes/chat_routes.py:11
Function
clearAll
()
backend/static/js/history.js:304
Function
clear_history
()
backend/utils/history_manager.py:51
Function
clear_history
()
backend/routes/history_routes.py:157
Function
client
(app)
backend/tests/test_patient_history.py:78
Function
client
(monkeypatch, tmp_path)
backend/tests/test_profile_validation.py:15
Function
client
Create test client with test database
backend/tests/test_fetch_endpoints.py:15
Function
client
()
backend/tests/test_integration.py:9
Function
client
(app)
backend/tests/test_csrf.py:23
Function
client
Create a test client.
backend/tests/test_doctor_dashboard.py:48
Function
client
(app)
tests/test_disease_routes.py:14
Function
client
(app)
tests/test_history_routes.py:14
Function
close
()
backend/static/profile.js:19
Function
compute_confidence_interval
Compute 95% confidence interval using bootstrap resampling. Returns {point, lower, upper, confidence_level}
backend/services/bootstrap_service.py:4
Function
connect
()
backend/routes/general_routes.py:27
Function
contact
()
backend/routes/disease_routes.py:191
Function
cors_headers
Decorator to add CORS headers to response. Example: @app.route('/api/data') @cors_headers def get_data():
backend/middleware/security.py:662
Method
critical
Log critical message.
backend/middleware/logger.py:135
Function
decorated_function
(*args, **kwargs)
backend/middleware/error_handler.py:360
Function
decorated_function
(*args, **kwargs)
backend/middleware/security.py:533
Function
decorated_function
(*args, **kwargs)
backend/middleware/logger.py:307
Function
decorator
(f)
backend/middleware/error_handler.py:431
Function
decorator
(f)
backend/middleware/security.py:531
Method
decrypt
(self, text)
backend/services/encryption_service.py:25
Function
delete_history_entry
(entry_id: int)
backend/routes/history_routes.py:144
Function
disease
()
backend/routes/disease_routes.py:120
Function
disease_detection_dashboard
()
backend/routes/disease_routes.py:483
Function
display_results
Display the posterior probabilities.
backend/utils/calculator.py:50
Function
doctor_dashboard
Render the doctor dashboard page
backend/routes/doctor_routes.py:132
Function
downloadResults
(format)
backend/static/script.js:1015
Function
download_ml_results
()
backend/routes/disease_routes.py:347
Function
download_results
()
backend/routes/disease_routes.py:246
Function
edge_cases
Generate edge cases for model testing.
backend/routes/synthetic_routes.py:79
Method
encrypt
(self, text)
backend/services/encryption_service.py:18
Function
error_response
Create a standardized error response. Args: message: Error message status_code: HTTP status code **kwargs: Additiona
backend/middleware/error_handler.py:477
Function
explain_prediction
SHAP-based prediction explainability endpoint.
backend/routes/ml_routes.py:647
← previous
next →
201–300 of 597, ranked by callers