<jupyter_start><jupyter_text>Cortical control in SCCwm-DBS Classifying Target Engagement OverviewHow can we be sure we're stimulating the SCCwm?What signal can we use to optimize our therapeutic parameters, including location, voltage, and frequency?In this notebook we'll address this question by developing a classifier capable of specifically identifying SCCwm-DBS. Methods<jupyter_code>import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning) 

import DBSpace as dbo
from DBSpace.visualizations import EEG_Viz
from DBSpace.control import proc_dEEG
import numpy as np


import matplotlib.pyplot as plt
import seaborn as sns

from sklearn.decomposition import PCA, FastICA

sns.set_context('paper')
sns.set(font_scale=4)
sns.set_style('white')<jupyter_output>Using DBSpace LATEST
Importing from DBSpace.control...<jupyter_text>Binary Classification<jupyter_code>all_pts = ['906','907','908']
EEG_analysis = proc_dEEG.proc_dEEG(pts=all_pts,procsteps='conservative',condits=['OnT','OffT'])
#%%
EEG_analysis.train_binSVM(mask=False)
EEG_analysis.oneshot_binSVM()
EEG_analysis.bootstrap_binSVM()
EEG_analysis.OnT_dr(data_source=EEG_analysis.SVM_coeffs)
EEG_analysis.learning_binSVM()<jupyter_output>DOING BINARY - Learning Curve<jupyter_text>Salient Channels<jupyter_code>EEG_analysis.analyse_binSVM()<jupyter_output>/home/virati/py_37_env/lib/python3.7/site-packages/mne/utils/docs.py:830: DeprecationWarning: Function read_montage is deprecated; ``read_montage`` is deprecated and will be removed in v0.20. Please use ``read_dig_fif``, ``read_dig_egi``, ``read_custom_montage``, or ``read_dig_captrack`` to read a digitization based on your needs instead; or ``make_standard_montage`` to create ``DigMontage`` based on template; or ``make_dig_montage`` to create a ``DigMontage`` out of np.arrays
  warnings.warn(msg, category=DeprecationWarning)
/home/virati/py_37_env/lib/python3.7/site-packages/mne/utils/docs.py:813: DeprecationWarning: Class Montage is deprecated; Montage class is deprecated and will be removed in v0.20. Please use DigMontage instead.
  warnings.warn(msg, category=DeprecationWarning)
{'fraction_non_alphanumeric': 0.09530516431924882, 'fraction_numerical': 0.014084507042253521, 'mean_word_length': 7.879166666666666, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '265344', 'license': 'MIT', 'n_tokens_mistral': 745, 'n_tokens_neox': 705, 'n_words': 170, 'path': 'Notebooks/.ipynb_checkpoints/CC_Classifier-checkpoint.ipynb', 'repo_name': 'virati/cortical_signatures', 'size': '2130'}