Stochastic signal generation

Good day!

Can one introduce randomness (variance) in the generation of DataRequests (metrics of interest)? If so, how might that be accomplished without the use of Actions, via the toolkit (underlying XML) or programmatically via the SDK? For context, from some simple tests of mine, signals for heart rate and respiration rate do not change in the output (regardless of sampling rate) unless an Action (other than advancing time or serializing state) is introduced. Guidance appreciated.

Thanks much, Brent

(BioGears is awesome! Keep up the great work!)

Best Answer

  • abairdabaird Moderator
    Answer ✓
    Hi Brent!

    So great to hear from you and we are really excited that you are using and enjoying BioGears. Since we solve a deterministic system (and don't currently have probabilistic models in the engine) a run with the same patient and all the same parameters will give you same wave form (what you're seeing). When you say variance in the generation of dataRequests, do you mean random sampling during a simulation?

    For this scenario:
    Our XML scenarios don't allow for specification of sampling rate, this is done by the default engine time step. In the SDK you could advance time using a random variable, then use a string stream to stream data requests (although I haven't implemented this but you can utilize the PhysiologyEngineTrack classes to specify a time variable in the SDK). You could also run a simulation, then load the data as a script and create a new datafile with certain randomly sampled data points (maybe a quick python script could do this)?

    Or, are you asking about adding variability to the actual wave form?

    For this scenario:
    We don't currently support parameter override during a simulation, so you won't be able to change the heart rate or respiration rate unless you run an action. If you'd like variability in the data requests you can also run randomized patients. This requires creating a new patient file where you randomize one of the input parameters (these parameters will affect the various waveforms you are sampling). I created a quick python tool that will randomly generate a patient file based on a user specified parameter (https://github.com/ajbaird/RandPatientXML). For example, if you wanted a collection of random heart rates you can create a series of patients using that tool and run BioGears for each generated patient, then collect the heart rate waveforms (maybe compile them into a multicolumn file?) then you have a random collection of the waveform of your choice (here you could generate random patients by changing their heart rate baselines or their pressures).

    Let me know how it works out, using BioGears to train ML tools to get guidance for noisey signal detection could be a really cool project! (not sure if that's what your working on just a shot in the dark).

    As always feel free to reach out to me personally at abaird@ara.com if you have any other questions, or post more on the forums!

    Austin Baird
    PI BioGears

Answers

  • Thanks much, Austin, for your comprehensive response, your support, _and_ for whipping up a new tool in short order! I hadn't considered the random patient approach; but I'm glad it exists now as a possible solution. :) We're trying to simulate variability in physiological sensor output toward development of an ML tool for use in the field. The variability's important, in part, because sensors can fail or send errant signals, not simply because a patient's physiological state may change from moment to moment. We wouldn't expect BioGears to manage all of that; but we do need to account for it.

    BTW, any plans to model seizures (or are they known in BioGears by another name)?

    Sincerely,
    Brent
  • Hi Brent,

    Really sorry for the slow response here, things have been a bit busy recently! Always feel free to reach out if you'd like to talk more about something and we don't seem to be responding quickly enough on the forums: abaird@ara.com.

    I think ML applications using BioGears is a really really exciting direction to be using the engine. I think the patient variability will get you a short ways there but it does seem like errant signalling would be something we'd have to think about. I guess this could come from manually manipulating the output files (put some random noise on top of the signal) but then I guess you're the one specifying the noise and it doesn't create an interesting problem! Any luck with the variability allowing for deviations of the output? There are actually a couple people at ARA who have used BioGears as a training set of data to predict patient outcomes during hemorrhage, his name is Charlie Fisher and I'm sure he'd also love to chat about ML applications if you wanted someone to bounce ideas off of: cfisher@ara.com.

    We don't have plans to model seizures in the immediate term but are interfacing with a manikin training platform who may require it in the future! It would def be something we are interested in. We've been wanting to add more nervous functionality to the patient so it's certainly something we have our eyes on.

    Hope everything is going well!

    Cheers,
    Austin Baird
    BioGears PI
Sign In or Register to comment.