Package: cerebralcortex-kernel
CerebralCortex KernelCerebral Cortex is the big data cloud companion of mCerebrum designed to support population-scale
data analysis, visualization, model development, and intervention design for mobile sensor data.You can find more information about MD2K software on oursoftware websiteor the MD2K organization on ourMD2K website.CerebralCortex Kernel is part of ourCerebralCortex cloud platform.
CerebralCortex-Kernel is capable of parallelizing tasks and scale a job to n-number of cores/machines. CerebralCortex Kernel offers some builtin features as follows:InstallationDependenciesCerebralCortex Kernel requiresjava 8to run. Java 8 prior to version 8u92 support is deprecated as of CerebralCortex-Kernel 3.3.0.check java version -java -versionsetJAVA_HOMEtojava 8OR start python shell withJAVA_HOME=/path/to/java/Home python3Install using pipCerebralCortex-Kernel requires minimumPython3.6. To install CerebralCortex-Kernel as an API:pip3 install cerebralcortex-kernelNote: please use appropriate pip (e.g., pip, pip3, pip3.6 etc.) installed on your machineInstall from source codeClone repo -git clone https://github.com/MD2Korg/CerebralCortex-Kernel.gitcd CerebralCortex-Kernelpython3 setup.py installUsagefrom cerebralcortex.kernel import Kernel
CC = Kernel(cc_configs="default")

# to view default configs
print(CC.config)

# default data storage path is
# /user/home/folder/cc_dataBy default Kernel will load default configs. Please have a look at all availableconfigurationsfor CerebralCortex-Kernel.
You may also load config files as:CC = Kernel(configs_dir_path="dir/path/to/configs/", new_study=True)How to use builtin algorithmsUsing builtin algorithms are as easy as loading data, passing it to algorithm and get the results.
Below is an example on how to compute CGM Glucose Variability Metrics.Download Glucose Data. The device used to collect glucose was theDexcom G6 Continuous Glucose MonitorInstall Cerebral Cortex Kernelpip install cerebralcortex-kernelOpen terminal and start python3 shellPython Code# import packages
from cerebralcortex.kernel import Kernel
from cerebralcortex.algorithms.glucose.glucose_variability_metrics import glucose_var

# Create Kernel object
CC = Kernel(cc_configs="default", new_study=True)

# Read sample CSV data
ds = CC.read_csv("/path/of/the/downloaded/file/sample.csv", stream_name="cgm_glucose_variability_metrics", header=True)

# view sample data
ds.show(2)

# Apply glucose_variability_metrics algorithm on the data
results = glucose_var(ds)

# view results
results.show(2)

# save computed data 
CC.save_stream(results)Please have a look atjupyter notebookfor basic operation that could be perform on DataStream object.Algorithms to  Analyze Sensor DataExternal CerebralCortex-Kernel offers following builtin algorithms to analyze sensor data.ECG sensor data qualityECG RR Interval ComputationHeart Rate Variability Feature ComputationCGM Glucose Variability MetricsGPS Data ClusteringSensor Data InterpolationStatistical Features ComputationList of all available algorithmsMarkers with ML ModelsStress Detection using ECG datamContain Social CrowdingBrushing Detection using Accelerometer and Gyro Data (TODO)VisualizationBasic Plots for Timeseries DataPlot GPS Clusters on MapStress VisualizationImport and Document DataImport CSV Data in CerebralCortex-Kernel FormatDocument imported Data using MetaData ModuleExternal CerebralCortex-Kernel Supported PlatformsmProvmFlowExamplesJupyter NotebooksDocumentationSource code documentationDeploy on CloudCerebralCortex-Kernel is a part of CerebralCortex cloud platform. To test the complete cloud platform, please visitCerebralCortex.FAQ1 - Do I need whole CerebralCortex cloud platform to use CerebralCortex-Kernal?No! If you want to use CerebralCortex-Kernel independently.2 - How can I change NoSQL backend storage layer?CerebralCortex-Kernel follows component based structure. This makes it easier to add/remove features.Add a new class inData manager-Raw.New class must have read/write methods. Here is a sampleskeleton classwith mandatory methods required in the new class.Create an object of new class inData-Rawwith appropriate parameters.Add appropriate configurations incerebralcortex.ymlin (NoSQL Storage)[https://github.com/MD2Korg/CerebralCortex-Kernel/blob/master/conf/cerebralcortex.yml#L8] section.3 - How can I replace MySQL with another SQL storage system?Add a new class inData manager-SQL.New class must implement all of the methods available instream_handler.pyclass.Create an object of new class inData-SQLwith appropriate parameters.Add appropriate configurations incerebralcortex.ymlinRelational Storagesection.4 - Where are all the backend storage related classes/methods?InData manager-Raw. You can add/change any backend storage.ContributingPlease read ourContributing Guidelinesfor details on the process for submitting pull requests to us.We use thePython PEP 8 Style Guide.OurCode of Conductis theContributor Covenant.Bug reports can be submitted throughJIRA.Our discussion forum can be foundhere.VersioningWe useSemantic Versioningfor versioning the software which is based on the following guidelines.MAJOR.MINOR.PATCH (example: 3.0.12)MAJOR version when incompatible API changes are made,MINOR version when functionality is added in a backwards-compatible manner, andPATCH version when backwards-compatible bug fixes are introduced.For the versions available, seethis repository's tags.ContributorsLink to thelist of contributorswho participated in this project.LicenseThis project is licensed under the BSD 2-Clause - see thelicensefile for details.AcknowledgmentsNational Institutes of Health-Big Data to Knowledge InitiativeGrants: R01MD010362, 1UG1DA04030901, 1U54EB020404, 1R01CA190329, 1R01DE02524, R00MD010468, 3UH2DA041713, 10555SCNational Science FoundationGrants: 1640813, 1722646Intelligence Advanced Research Projects ActivityContract: 2017-17042800006