Skip to main content

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)

Release files for mindstrong 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mindstrong 1.0
File Size Uploaded
mindstrong-1.0.tar.gz 883.9 kB Details

Release files / mindstrong-1.0.tar.gz

Download URL mindstrong-1.0.tar.gz
Size 883.9 kB
Tags Source
SHA-256 checksum
How to use checksums
09abb3d605bde6875c3dabffc07effeac01b8c7c10860ef39fe62d7d23da32b3
BLAKE2b-256 checksum
How to use checksums
11902a6171749e2c2be9c26d505b04c629c8a145d4c6445431eb5e23bc8fb03c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page