Skip to content

Commit

Permalink
Merge pull request #4 from MaastrichtU-CDS/implementation/algorithm-s…
Browse files Browse the repository at this point in the history
…tore

Implementation/algorithm store
  • Loading branch information
VarshaGouthamchand authored Oct 1, 2024
2 parents a90ec00 + 01a7646 commit 9f4b127
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 43 deletions.
127 changes: 88 additions & 39 deletions algorithm_store.json
Original file line number Diff line number Diff line change
@@ -1,69 +1,118 @@
{
"name": "coxph",
"image": "v6-coxph",
"name": "Cox Proportional Hazards",
"code_url": "https://github.com/MaastrichtU-CDS/v6-coxph",
"documentation_url": "https://github.com/MaastrichtU-CDS/v6-coxph/wiki",
"vantage6_version": "4.3",
"partitioning": "horizontal",
"description": "Time to event analysis through Cox proprotional hazards",
"image": "ghcr.io/maastrichtu-cds/v6-coxph:2.1.0",
"functions": [
{
"name": "central",
"description": "Federated algorithm for baseline hazard curve in Vantage6 v4",
"type": "central",
"databases": [],
"arguments": [
{
"name": "time_col",
"type": "",
"description": ""
"description": "The name of the variable that contains the time data.",
"type": "string"
},
{
"name": "outcome_col",
"type": "",
"description": ""
"description": "The name of the variable that contains the event/outcome data.",
"type": "string"
},
{
"name": "expl_var",
"type": "",
"description": ""
"name": "expl_vars",
"description": "A list of explanatory variables to be used in the computation.",
"type": "string_list"
},
{
"name": "organization_ids",
"type": "",
"description": ""
}
]
},
{
"name": "get_unique_event_times",
"description": "",
"type": "federated",
"databases": [
"name": "baseline_hf",
"description": "A flag to include the cumulative baseline hazard function in the results. Defaults to True.",
"type": "boolean"
},
{
"name": "Database 1"
"name": "binning",
"description": "A boolean flag to enable binning of event times for added privacy. Defaults to True.",
"type": "boolean"
},
{
"name": "Database 2"
}
],
"arguments": [
"name": "bin_type",
"description": "The type of binning to use for event times (\"Fixed\" or \"Quantile\"). Defaults to \"Fixed\".",
"type": "string"
},
{
"name": "time_col",
"type": "",
"description": ""
"name": "differential_privacy",
"description": "A boolean flag to enable differential privacy on the aggregates. Defaults to True",
"type": "boolean"
},
{
"name": "outcome_col",
"type": "",
"description": ""
"name": "privacy_target",
"description": "The target of the differential privacy (\"predictors\" or \"aggregates\"). Defaults to \"predictors\".",
"type": "string"
},
{
"name": "expl_var",
"type": "",
"description": ""
"name": "sensitivity",
"description": "The sensitivity of the Cox model coefficients for differential privacy. ",
"type": "float"
},
{
"name": "epsilon",
"description": "The desired epsilon value for differential privacy.",
"type": "float"
},
{
"name": "organization_ids",
"type": "",
"description": ""
"description": " A list of organization IDs to run the analysis on.",
"type": "organization_list"
}
],
"type": "central",
"databases": [
{
"name": "Database",
"description": "Database to perform the time to event analysis on"
}
],
"description": "Performs the main computation and coordination tasks.",
"ui_visualizations": [
{
"name": "CoxPH model",
"type": "table",
"schema": {
"location": [
"coxph_results"
],
"columns": []
},
"description": "The main result of the CoxPH model."
},
{
"name": "Cumulative Baseline Hazard",
"type": "line",
"schema": {
"location": [
"cumulative_baseline_hazard"
],
"x": "time",
"y": "hazard",
"y_axis_min": 0,
"y_axis_max": 1.2
},
"description": "The cumulative baseline hazard at each unique event time."
},
{
"name": "Baseline Survival Function",
"type": "line",
"schema": {
"location": [
"baseline_survival_function"
],
"x": "time",
"y": "survival",
"y_axis_min": 0,
"y_axis_max": 1
},
"description": "Baseline survival curve at each unique event time."
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions coxph/central.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@ def central(
unique_time_events, summed_agg1)

return {"included_organizations": ids, "excluded_organizations": excluded_ids,
"cumulative_baseline_hazard": cumulative_hazard.to_dict(),
"baseline_survival_function": survival_function.to_dict(),
"coxph_results": results.to_dict()
"cumulative_baseline_hazard": cumulative_hazard.to_json(),
"baseline_survival_function": survival_function.to_json(),
"coxph_results": results.to_json()
}

return {"included_organizations": ids, "excluded_organizations": excluded_ids, "coxph_results": results.to_dict()}
return {"included_organizations": ids, "excluded_organizations": excluded_ids, "coxph_results": results.to_json()}


@algorithm_client
Expand Down

0 comments on commit 9f4b127

Please sign in to comment.