mimic3-benchmarks
mimic3-benchmarks copied to clipboard
Add DB/SQL support
Is there a way to support the reading of data directly from a database instead of from csv files? Our lab hosts MIMIC3 data in an SQL database, so it would be very helpful for us.
Perhaps some optional argument that takes in key information to set up the connection, which could be passed in to functions in mimic3csv.py? Or maybe some kind of check for a global config file that sets up connection to MIMIC3 database?
I assume that the dataframe returned from the CSV would be the same as the dataframe from a pd.read_sql("SELECT * FROM
@Saqibm128 it looks like pandas has support for reading the results of a SQL query into a DataFrame, so that should be doable: http://pandas.pydata.org/pandas-docs/version/0.20/generated/pandas.read_sql.html.
That said, we don't have the bandwidth to implement this ourselves (expanding the benchmark to include other variables, treatments, etc., are higher priorities). We would happily accept a pull request, however!
Related to PR currently under review: https://github.com/YerevaNN/mimic3-benchmarks/pull/22
We should make this merge now that the 1.0 release is done. @Harhro94