Loading and Saving Data

The Bristlecone.Data namespace includes methods for saving Bristlecone results and diagnostics, and loading saved results for further analysis at a later date.

Estimation Results

Saving and loading estimation results is conducted as follows:

open Bristlecone
open Bristlecone.Data

let resultsDirectory = "/some/data/dir"
let thinTraceBy = 1000 // Only trace every n iterations to save disk space
let subject = "Mosquito population" // The name of the 'subject' of analysis
let modelName = "Logistic growth"

/// Output three files: the maximum likelihood estimate,
/// a trace of the optimisation process, and the estimated vs
/// observed time series.
fun result ->
    EstimationResult.saveAll resultsDirectory subject modelName thinTraceBy result

Other statistics with save functions

Bristlecone.Data includes methods for saving results from the following statistical functions that Bristlecone performs:

// Save confidence intervals:

// Save convergence statistics based on multiple 'chains'
// of analysis on the same subject and model:

// Save Akaike weights calculated for model selection:
namespace Bristlecone
Multiple items
module Bristlecone from Bristlecone

namespace Bristlecone
namespace Bristlecone.Data
val resultsDirectory : string
val thinTraceBy : int
val subject : string
val modelName : string
val result : ModelSystem.EstimationResult
module EstimationResult from Bristlecone.Data
val saveAll : directory:string -> subject:string -> modelId:string -> thinTraceBy:int -> result:ModelSystem.EstimationResult -> unit
<summary> Save the Maximum Likelihood Estimate, trace of the optimisation procedure, and time-series. </summary>
module Confidence from Bristlecone.Data
val save : directory:string -> subject:string -> modelId:string -> runId:System.Guid -> result:CodedMap<Optimisation.ConfidenceInterval.ConfidenceInterval> -> unit
module Convergence from Bristlecone.Data
val save : directory:string -> result:seq<seq<Diagnostics.Convergence.ConvergenceStatistic>> -> unit
module ModelSelection from Bristlecone.Data
val save : directory:string -> result:seq<string * string * ModelSystem.EstimationResult * ModelSelection.Akaike.AkaikeWeight> -> unit