on the above line of code is there a particular rule in assigning the channel scaling values or is there any material that I can reference that will help beginners better understand how this values are handled.
Using the above line of code I got from MNE website, I could generate a plot that shows all my channels despite the called out channels on this code differs from the channels on my dataset. below are my channel names and also see the attached picture for plot.
It seems that all your channels are stored as type “EEG”, because the plot only shows one scale bar (the pink 200.0µV label). You can see that this corresponds to the eeg=1e-4 (i.e. 100µV) setting, which is one half of the visualized scale.
Despite your channels being labeled “EMG”, “EOG”, and “ECG”, they seem to have been assigned to EEG. You can always change this after importing using raw.set_channel_types(). Depending on how you imported this file, channel types should be recognized automatically in some cases (especially if you import an EDF file). Can you show the code you used to load the file?
from glob import glob
import os
import mne
import numpy as np
import pandas
import matplotlib.pyplot as plt
from mne.time_frequency import psd_welch
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score
from sklearn.metrics import confusion_matrix
from sklearn.metrics import classification_report
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import FunctionTransformer
dataset= glob ('recordings/*edf') #data address
print(len(dataset))
raw_train = mne.io.read_raw_edf(dataset[0], preload=True, stim_channel='Event marker', misc=['Temp rectal'])
dataset[0]
annot_train = mne.read_annotations(dataset[1])
raw_train.set_annotations(annot_train, emit_warning=False)
#raw_train.info
# plot some data
# scalings were chosen manually to allow for simultaneous visualization of
# different channel types in this specific dataset
raw_train.plot(start=60, duration=60,
scalings=dict(eeg=1e-4, resp=1e3, eog=1e-4, emg=1e-7,
misc=1e-1))
Above is the section of the code on how I imported the data.
This looks good! Your channel names start with “EEG”, “EMG”, and so on, indicating the type. To use this information in MNE, you need to set infer_types=True in your call to mne.io.read_raw_edf().
Each type has a specific default scaling. If a default is not appropriate, you can change it by passing the scalings argument with appropriate values. With infer_types=True, you get more channels parsed with the correct type, and therefore a corresponding default scaling. However, the defaults can still be bad, so in your case I’d try to manually find better values.
You can also pass the value of ‘auto‘ to get most data points of each trace displayed These automatically determines values then depend on the specific dataset you’re currently viewing