mescla.uncertainty.resampling.jackknife_endmembers¶
- mescla.uncertainty.resampling.jackknife_endmembers(endmember_samples, samples, sd_samples=None, estimator=None)[source]¶
Leave-one-out uncertainty from the replicates defining each end-member.
Drops one replicate of one end-member at a time, recomputes that end-member’s mean composition, and re-runs the whole mixing calculation. The spread of the resulting fractions is uncertainty that comes from the definition of the end-members, which is the part that usually dominates.
- Parameters:
endmember_samples (dict of {str: array_like}) – One entry per end-member, holding its replicate analyses
(n_replicates, n_species). Every entry must use the same species, in the same order assamples.samples (array_like, DataFrame or ChemTable)
sd_samples (array_like, optional)
estimator (callable, optional) –
estimator(endmembers, samples, sd_samples) -> ratios. Defaults to weighted constrained least squares. Pass a lambda wrappingmix_ml()to jackknife the maximum-likelihood fit.
- Returns:
dict –
ratios(the full-data estimate),sd,lower,upper(mean +/- 1 sd),replicates(all leave-one-out estimates) andn_replicates.