Examples¶
To start things off, import a few basic
tools, including bayspar
:
In [1]: import numpy as np
In [2]: import matplotlib.pyplot as plt
In [3]: import bayspar as bsr
There are a few options when it comes to prediction with bayspar
.
Below, we use example data - included with the package - to walk through each
type of prediction.
Standard prediction¶
We can access the example data with get_example_data()
and use the
returned stream with pandas.read_csv()
or numpy.genfromtxt()
:
In [4]: example_file = bsr.get_example_data('castaneda2010.csv')
In [5]: d = np.genfromtxt(example_file, delimiter=',', names=True)
This dataset (from Castañeda et al. 2010) has two columns giving sediment age (calendar years BP) and TEX86.
In [6]: d['age'][:5]
Out[6]: array([142., 284., 375., 466., 558.])
In [7]: d['tex86'][:5]