After cleaning my EEGs Iād like to append them to a sort of databank or list that I could call for plotting or statistics with pandas and numpy.
I dont want sthing huge and specific like SQL, ORACLE , etc (time consuming). Iāve tryed sqlite, but Iām still confused about the best option. Is it possible to use sqlite? If I append Pandas in a list,what happens to raw.info? Can I append in a list or databank mne.numpy? The main question is which one is the smothest way to do it? I couldnāt find any related tutorial on google .
Sorry if the question is the dummy, but my background is neurology. Thanks in advance.
Ok. For instance, I have some rest awake EEG CDR, MMSE and psychological evaluation of patients with Alzheimerās disease (AD).
( Kanda, Paulo Afonso Medeiros, et al. āClinicianās road map to wavelet EEG as an Alzheimerās disease biomarker.ā Clinical EEG and neuroscience 45.2 (2014): 104-112.)
With WEKA and support vector machine We had an accuracy of 92.72% separating AD from normals. Unfortunately I used a very laborious and specific technique to do it. I want to bring it to clinicians. For example, if I have a databank of EEGs from AD the clinician could (clicking some tkinter buttons) compare the EEG of 1 patient (with possible memory loss) with some parameters of the databank (associated with the clinical evaluation) and estimate the risk to dementia. By the way, resting EEG is powerful in the evaluation of such patients. In case it works, I could try it in vascular diseases, attention deficit disorder and so on. In such cases it would not be feasible if each time Iām evaluating a new person I had to call, lets say, 250 EEG.fif records, append all, and re apply the Support Vector Machine algorythm to compare to the proband EEG record. Besides as ānā in databank increases (normals, children with learning disabilities, temporal lobe epilepsy databanks) parametric, nonparametric statistics become stronger. To sum, I need strong consolidated result of means of homogeneos and specific groups of patients, for comparison with 1 new individual person in risk of an event. Thanks for any hint.
It sounds like you want some sort of trained model / classifier that you could easily apply to new data, through a GUI. If thatās right, then once the model is trained, do you even need the training data available anymore (e.g. in a database) for the GUI to work? In other words, when you say
I wonder why you need to re-load the training data for each new patient, if the model has already been trained?
Of course you still need to get the training data into the correct form to create the model in the first place. For that we have a few examples in our docs (two tutorials and twelve examples) most of which will have some variation on the following:
in other words, training data is a NumPy array, in this case acquired using epochs.get_data(), and (for supervised learning) the labels are provided by the epochs events array (though one could just as easily use epochs metadata).
Hopefully this helpsā¦ if not, maybe @agramfort is more familiar with the kinds of things you might want to do here, and can offer better suggestions. If Iāve missed the point, please try again to rephrase what it is you want to be able to do @PauloKanda.
" Iād like to append them to a sort of databank or list that I could call for plotting or statistics with pandas and numpy."
I had a similar requirement wherein I had to read through individual subjectsā fdt data, do the epoching and apply feature extraction / classification. So as I read through each subjectās .FDT (eeglab) file and did the epoch, I converted them into pandas dataframe using to_data_frame, concatenated each subjectās data using pandas.concat and saved them as .csv (added a āsubjectā column in addition to the pre-generated columns). Now I can visualize individual subjectās data / all subjectsā data and train models on this dataset.
" If I append Pandas in a list,what happens to raw.info? " - I didnāt need the raw.info file once the dataset is created, but if you will still need it, you can save it as a separate text file along with the csv (either for one subject or for all subjects).
And as for your requirements, you could extend this approach by converting the incoming patientās data to a dataframe, and either a) append it to the existing dataset, or b) validate the patientās data using the pre-trained model .
āBesides as ānā in databank increases (normals, children with learning disabilities, temporal lobe epilepsy databanks) parametric, nonparametric statistics become stronger.ā - Similar to adding patientās data the existing dataset (rows), these additional criteria / conditions can be appended as columns for the data for which the criterion is known and fill it with Nan otherwise.
I was wondering about how to do something like that. Accostumed to work with excel I needed something more tangible like you suggest. I really appreciate your help with this subject. Thank you very much.