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
↓ 2 callers
Method
prune_stale_entries
(self)
backend/middleware/security.py:205
↓ 2 callers
Function
renderSensitivityChart
(currentPrior, sensitivity, falsePositive, testResult)
backend/static/script.js:182
↓ 2 callers
Function
showToast
(message, type)
backend/static/profile.js:8
↓ 2 callers
Method
to_dict
Serialise to a plain dict for JSON responses.
backend/models/patient_history.py:87
↓ 2 callers
Function
updateInteractiveResult
(prior, posterior, testResult = 'positive')
backend/static/script.js:871
↓ 2 callers
Method
validate_input
Validate input data for security threats. Args: data: Input data to validate field_name: Name of the field b
backend/middleware/security.py:401
↓ 1 callers
Method
_add_console_handler
Add console handler with colored output.
backend/middleware/logger.py:49
↓ 1 callers
Method
_add_file_handlers
Add file handlers for different log levels.
backend/middleware/logger.py:62
↓ 1 callers
Method
_analyze_class_distribution
Analyze how diseases are distributed based on symptom count and weight magnitude. Since the model uses hardcoded weights rather than
backend/analysis/bias_analysis.py:100
↓ 1 callers
Method
_analyze_disease_complexity
Rank diseases by diagnostic complexity based on symptom overlap with other diseases.
backend/analysis/bias_analysis.py:458
↓ 1 callers
Method
_analyze_symptom_coverage
Analyze which symptoms appear across how many diseases and their average weight.
backend/analysis/bias_analysis.py:141
↓ 1 callers
Method
_analyze_symptom_overlap
Create a summary of the symptom overlap between diseases. (Full matrix can be large, so we return top overlapping pairs.)
backend/analysis/bias_analysis.py:518
↓ 1 callers
Method
_build_histogram
Create a histogram of symptom counts.
backend/analysis/bias_analysis.py:134
↓ 1 callers
Method
_calculate_bmi
(self, height_cm: float, weight_kg: float)
backend/models/ml_model.py:1018
↓ 1 callers
Method
_calculate_confidence
( self, num_symptoms: int, probability: float, bmi: float = None )
backend/models/ml_model.py:1287
↓ 1 callers
Method
_compute_balance_score
An overall 0-100 balance score for the model. Higher = more balanced.
backend/analysis/bias_analysis.py:429
↓ 1 callers
Method
_compute_bias_indicators
Compute overall bias indicators across the model.
backend/analysis/bias_analysis.py:374
↓ 1 callers
Function
_compute_gradcam_heatmap
Core Grad-CAM computation. 1. Build a sub-model that outputs (conv_activations, final_predictions). 2. Forward-pass with GradientTape to
backend/utils/gradcam.py:132
↓ 1 callers
Function
_compute_scorecam_heatmap
Score-CAM heatmap computation for a TFLite interpreter. Parameters ---------- interpreter : Allocated TFLite Interpreter.
backend/utils/gradcam.py:371
↓ 1 callers
Function
_dob_year_options
()
backend/routes/auth_routes.py:132
↓ 1 callers
Function
_ensure_user_profile_columns
Add profile columns to existing SQLite databases created before this model update.
backend/__init__.py:36
↓ 1 callers
Function
_find_last_conv_layer
Walk the model layers in reverse and return the name of the last Conv2D (or Depthwise/Separable Conv) layer. For ResNet50 this is reliab
backend/utils/gradcam.py:77
↓ 1 callers
Function
_find_tflite_feature_tensor
Find a tensor index that has live runtime data after invoke(). We do a dummy forward pass first, then check which 4-D spatial tensors act
backend/utils/gradcam.py:284
↓ 1 callers
Method
_find_underrepresented_diseases
Identify diseases that may be underrepresented due to: - Very few symptoms (below MIN_SYMPTOMS_THRESHOLD) - All low weights
backend/analysis/bias_analysis.py:183
↓ 1 callers
Method
_find_underrepresented_symptoms
Identify symptoms that appear in only one disease or have consistently low weights.
backend/analysis/bias_analysis.py:238
↓ 1 callers
Method
_generate_summary
High-level summary statistics.
backend/analysis/bias_analysis.py:68
↓ 1 callers
Method
_generate_symptom_names
Auto-generate display names from symptom keys
backend/models/ml_model.py:997
↓ 1 callers
Method
_generate_vitals
Generate realistic vitals based on disease and age.
backend/services/synthetic_patient_service.py:61
↓ 1 callers
Method
_get_all_other_symptoms
Get all symptoms from all diseases except the given one.
backend/analysis/bias_analysis.py:508
↓ 1 callers
Method
_get_identifier
Get unique identifier for the request. The identifier is based solely on the client IP address. Using User-Agent as part of
backend/middleware/security.py:309
↓ 1 callers
Function
_get_tflite_interpreter
Load a fresh TFLite interpreter for Score-CAM. XNNPACK is explicitly disabled because it optimises away intermediate tensor buffers, mak
backend/utils/gradcam.py:267
↓ 1 callers
Method
_gini_coefficient
Compute the Gini coefficient (0 = perfect equality, 1 = total inequality).
backend/analysis/bias_analysis.py:417
↓ 1 callers
Method
_global_bmi_effect
Global BMI impact on disease risk.
backend/models/ml_model.py:1024
↓ 1 callers
Method
_init_db
(self)
backend/middleware/security.py:182
↓ 1 callers
Function
_profile_dob_bounds
()
backend/routes/auth_routes.py:127
↓ 1 callers
Method
_simulate_per_disease_metrics
Simulate predictions with random symptom subsets to estimate per-disease performance characteristics (since we don't have a test data
backend/analysis/bias_analysis.py:277
↓ 1 callers
Function
_tflite_infer_with_feature
Forward pass that also captures the intermediate feature tensor. Returns ------- feature_map : float32 array of shape (H_feat, W_fea
backend/utils/gradcam.py:346
↓ 1 callers
Function
_validate_dob
(value, errors)
backend/routes/auth_routes.py:63
↓ 1 callers
Function
_validate_image_magic
Return True only if the leading bytes identify a supported image format.
backend/routes/predict_disease_type_routes.py:163
↓ 1 callers
Function
add_posterior_column
Add posterior probability column to dataframe
backend/src/calculator.py:174
↓ 1 callers
Method
after_request
Log after request. Args: response: Flask response object Returns: Response object
backend/middleware/logger.py:453
↓ 1 callers
Method
analyze_history_trends
Process user's chronological prediction history, calculating: 1. progression timeline with timestamps 2. vitals trend progres
backend/utils/temporal_analysis.py:269
↓ 1 callers
Function
bayesian_survival
Calculate posterior probability using Bayes' Theorem.
backend/utils/calculator.py:6
↓ 1 callers
Method
before_request
Log before request.
backend/middleware/logger.py:448
↓ 1 callers
Function
buildUncertaintyCard
(result)
backend/static/assets/js/uncertainty_ui.js:65
↓ 1 callers
Method
build_explanation_summary
Build a concise explanation summary for the diagnosis.
backend/models/ml_model.py:1160
↓ 1 callers
Function
build_hospital_data
()
data/preprocess.py:71
↓ 1 callers
Function
calculateInteractive
()
backend/static/script.js:798
↓ 1 callers
Method
check_rate_limit
(self, identifier, endpoint_type, max_requests, window)
backend/middleware/security.py:135
↓ 1 callers
Method
check_rate_limit
Check if request is within rate limit. Args: endpoint_type: Type of endpoint (default, prediction, ml_analysis, report)
backend/middleware/security.py:341
↓ 1 callers
Function
clean_data
Clean and validate data
backend/src/calculator.py:148
↓ 1 callers
Function
clean_disease
(value: Any, required: bool = True)
backend/preprocessing/cleaning.py:69
↓ 1 callers
Function
clean_int
( value: Any, field_name: str, min_value: int, max_value: int, )
backend/preprocessing/cleaning.py:117
↓ 1 callers
Function
clean_symptoms
( symptoms: Any, valid_symptoms: Optional[Iterable[str]] = None, max_count: int = 50, )
backend/preprocessing/cleaning.py:76
↓ 1 callers
Function
clearFieldErrors
()
backend/static/profile.js:87
↓ 1 callers
Function
deleteEntry
(id)
backend/static/js/history.js:283
↓ 1 callers
Function
delete_user
(email)
delete_user.py:11
↓ 1 callers
Function
esc
(str)
backend/static/assets/js/uncertainty_ui.js:59
↓ 1 callers
Function
formatMarkdownToHTML
(text)
backend/static/script.js:569
↓ 1 callers
Function
generate_chat_response
Generate a chat response using Gemini API, restricted to medical/health domain. Args: message: The user's query history: Op
backend/utils/gemini_helper.py:162
↓ 1 callers
Function
generate_recommendations
Generate AI-powered recommendations using Gemini API based on disease probability results. Args: disease_name: Name of the disease
backend/utils/gemini_helper.py:34
↓ 1 callers
Function
generate_tts_audio
Generate Text-to-Speech audio from the provided text using gTTS. Args: text (str): The text to be converted to speech. langu
backend/utils/tts_helper.py:6
↓ 1 callers
Function
getAIRecommendations
()
backend/static/script.js:477
↓ 1 callers
Function
get_analyzer
Get or create the singleton BiasAnalyzer instance.
backend/analysis/bias_analysis.py:561
↓ 1 callers
Method
get_current_version
Get current active model version.
backend/services/model_version_manager.py:46
↓ 1 callers
Function
get_patient_dashboard_data
Fetch dashboard data specific to a patient (user). Args: user_id: The ID of the currently logged-in user Returns: dict:
backend/routes/doctor_routes.py:144
↓ 1 callers
Function
get_real_dashboard_data
Fetch real dashboard data from the PredictionHistory table. Returns: dict: Dashboard metrics and risk distribution data from databas
backend/routes/doctor_routes.py:19
↓ 1 callers
Method
get_top_feature_impacts
Return the strongest positive and negative feature impacts.
backend/models/ml_model.py:1116
↓ 1 callers
Method
get_version_history
Get all version history.
backend/services/model_version_manager.py:52
↓ 1 callers
Function
initDarkMode
()
backend/static/script.js:22
↓ 1 callers
Function
initDashboardMenu
()
backend/static/script.js:58
↓ 1 callers
Function
initInteractiveSliders
()
backend/static/script.js:652
↓ 1 callers
Method
init_app
Initialize error handlers for Flask app. Args: app: Flask application instance
backend/middleware/error_handler.py:146
↓ 1 callers
Function
initialize_history_file
()
backend/utils/history_manager.py:13
↓ 1 callers
Function
is_safe_url
(target)
backend/routes/auth_routes.py:145
↓ 1 callers
Function
load_diseases
()
backend/routes/disease_routes.py:47
↓ 1 callers
Function
load_tflite_model
(model_type)
backend/routes/predict_disease_type_routes.py:92
↓ 1 callers
Method
log_error
Log error with details. Args: error_type: Type of error message: Error message **kwargs: Additio
backend/middleware/logger.py:180
↓ 1 callers
Method
log_prediction
Log disease prediction. Args: disease: Disease name symptoms: List of symptoms probability: Pred
backend/middleware/logger.py:159
↓ 1 callers
Method
log_security_event
Log security event. Args: event_type: Type of security event message: Event message severity: Ev
backend/middleware/logger.py:196
↓ 1 callers
Function
normalizePhoneInput
(value)
backend/static/profile.js:59
↓ 1 callers
Method
predict_multiple_diseases
( self, symptoms: List[str], age: int = None, height_cm: float = None,
backend/models/ml_model.py:1307
↓ 1 callers
Function
preprocess_image
(file, model_type)
backend/routes/predict_disease_type_routes.py:112
↓ 1 callers
Function
process_breast_cancer
(raw_path)
data/preprocess.py:51
↓ 1 callers
Function
process_diabetes
(raw_path)
data/preprocess.py:25
↓ 1 callers
Function
process_heart_disease
(raw_path)
data/preprocess.py:4
↓ 1 callers
Function
process_history
(messages)
backend/utils/gemini_helper.py:141
↓ 1 callers
Function
read_data
Read CSV data for batch processing
backend/src/calculator.py:134
↓ 1 callers
Function
renderEmpty
()
backend/static/js/history.js:95
↓ 1 callers
Function
renderList
(items)
backend/static/js/history.js:155
↓ 1 callers
Function
renderModal
(entry)
backend/static/js/history.js:174
↓ 1 callers
Function
renderPagination
()
backend/static/js/history.js:163
↓ 1 callers
Method
run_full_analysis
Execute a complete bias and coverage analysis. Returns a comprehensive result dictionary suitable for JSON serialization and dashboar
backend/analysis/bias_analysis.py:39
↓ 1 callers
Function
run_keras_inference
(model_type, img_array)
backend/routes/predict_disease_type_routes.py:128
↓ 1 callers
Function
run_tflite_inference
(model_type, img_array)
backend/routes/predict_disease_type_routes.py:135
↓ 1 callers
Function
save_history
(entry)
backend/utils/history_manager.py:38
↓ 1 callers
Function
save_results
Save results to CSV
backend/src/calculator.py:188
↓ 1 callers
Function
seed
()
seed_diseases.py:13
↓ 1 callers
Function
showDownloadSection
()
backend/static/script.js:1007
↓ 1 callers
Function
showUpdatingState
()
backend/static/script.js:620
← previous
next →
101–200 of 597, ranked by callers