Skip to main content

Mindstrong Digital Biomarker Model Fitting

Project description

This package uses Supervised Kernel Principal Components Analysis with cross validation to fit digital biomarker data to target measurements. The software was written by members of the Mindstrong Health Data Science team:

  • Paul Dagum, MD, PhD

  • Greg Ryslik, PhD, FCAS, MAAA

  • Bob Dougherty, PhD

  • Patrick Staples, PhD

Please contact us at datascience@mindstronghealth.com.

NOTE: If you use this software in your work, please cite the following paper:

Dagum, P. (2018) Digital biomarkers of cognitive function. npj Digital Medicine, issue 1, article 10. DOI: 10.1038/s41746-018-0018-4.

Installation

The easiest way to install the package is via easy_install or pip:

$ pip install mindstrong_biomarker_modelfit

This should also take care of the dependencies (numpy, scipy, pandas, and sklearn).

Usage

Simulated digital biomarker and target measure data are included with the project. To fit a model to these example data:

import numpy as np
import pandas as pd
import os
from mindstrong import mindstrong_modelfit as mindstrong

target_file = mindstrong.get_example_data('example_targets.csv')
feature_file = mindstrong.get_example_data('example_features.csv')
target_colname = 'target1'

# Load target data
target_df = pd.read_csv(target_file)
target_df.set_index('device_id', inplace=True)

# Load Feature Data
feature_df = pd.read_csv(feature_file).set_index(['device_id', 'targetDOY'])

# Cross Validated supervised kernel PCA model-fitting
cvdf, best_model = mindstrong.calculateCrossValidatedCorrelation(target_df,
                                                                 feature_df,
                                                                 target_colname,
                                                                 fold_type='n',
                                                                 n_folds=5,
                                                                 kernel_training='linear',
                                                                 kernel_training_param=1,
                                                                 kernel_target='linear',
                                                                 kernel_target_param=1,
                                                                 regularization=0.1)

# Print the final results
print(best_model)

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mindstrong-1.0.tar.gz (883.9 kB view details)

Uploaded Source

File details

Details for the file mindstrong-1.0.tar.gz.

File metadata

  • Download URL: mindstrong-1.0.tar.gz
  • Upload date:
  • Size: 883.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mindstrong-1.0.tar.gz
Algorithm Hash digest
SHA256 09abb3d605bde6875c3dabffc07effeac01b8c7c10860ef39fe62d7d23da32b3
MD5 01f7769f58e646598e6a153fe4cdfe7a
BLAKE2b-256 11902a6171749e2c2be9c26d505b04c629c8a145d4c6445431eb5e23bc8fb03c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page