Skip to content

Commit

Permalink
BF: store individual CV fold results
Browse files Browse the repository at this point in the history
  • Loading branch information
anwarnunez committed May 26, 2019
1 parent 2b6fc96 commit 8f9da99
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tikreg/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ def estimate_stem_wmvnp(features_train,
'''
'''
start_time = time.time()
population_mean = not keep_cvfolds
# population_mean = not keep_cvfolds

delays = temporal_prior.delays
ndelays = len(delays)
Expand All @@ -1133,7 +1133,7 @@ def estimate_stem_wmvnp(features_train,
normalize_kernel=normalize_kernel,
temporal_prior=temporal_prior,
feature_priors=feature_priors,
population_mean=population_mean,
population_mean=population_optimal,
folds=folds,
method=method,
verbosity=verbosity,
Expand All @@ -1147,6 +1147,9 @@ def estimate_stem_wmvnp(features_train,

# find optima across cross-validation folds
cvmean = cvresults['cvresults'].mean(0)
if keep_cvfolds is False:
# clear memory
cvresults['cvresults'] = cvmean

if 'dims' in cvresults:
dims = cvresults['dims']
Expand Down

0 comments on commit 8f9da99

Please sign in to comment.