netneurotools.stats.get_dominance_stats
- netneurotools.stats.get_dominance_stats(X, y, use_adjusted_r_sq=True, verbose=False, n_jobs=1)[source]
Return the dominance analysis statistics for multilinear regression.
This is a rewritten & simplified version of [DA1]. It is briefly tested against the original package, but still in early stages. Please feel free to report any bugs.
Warning: Still work-in-progress. Parameters might change!
- Parameters:
X ((N, M) array_like) – Input data
y ((N,) array_like) – Target values
use_adjusted_r_sq (bool, optional) – Whether to use adjusted r squares. Default: True
verbose (bool, optional) – Whether to print debug messages. Default: False
n_jobs (int, optional) – The number of jobs to run in parallel. Default: 1
- Returns:
model_metrics (dict) – The dominance metrics, currently containing individual_dominance, partial_dominance, total_dominance, and full_r_sq.
model_r_sq (dict) – Contains all model r squares
Notes
Example usage
from netneurotools.stats import get_dominance_stats from sklearn.datasets import load_boston X, y = load_boston(return_X_y=True) model_metrics, model_r_sq = get_dominance_stats(X, y)
To compare with [DA1], use use_adjusted_r_sq=False
from dominance_analysis import Dominance_Datasets from dominance_analysis import Dominance boston_dataset=Dominance_Datasets.get_boston() dominance_regression=Dominance(data=boston_dataset, target='House_Price',objective=1) incr_variable_rsquare=dominance_regression.incremental_rsquare() dominance_regression.dominance_stats()
References