In [7]:
Copied!
import pandas as pd
from lactopy.lactate_models.general.OBLA import OBLA
import pandas as pd
from lactopy.lactate_models.general.OBLA import OBLA
In [8]:
Copied!
df = pd.read_csv('../tests/test_data/lactate_test_data copy.csv')
df = pd.read_csv('../tests/test_data/lactate_test_data copy.csv')
In [ ]:
Copied!
# fit model returns a scikit learn like model object
obla = OBLA()
obla.fit(df['watt'], df['lactate'])
# fit model returns a scikit learn like model object
obla = OBLA()
obla.fit(df['watt'], df['lactate'])
Out[ ]:
OBLA()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
OBLA()
In [ ]:
Copied!
# plot fit of data
obla.plot.plot_fit()
# plot fit of data
obla.plot.plot_fit()
Out[ ]:
<Axes: title={'center': 'Lactate Model Fit'}, xlabel='Intensity', ylabel='Lactate'>
In [ ]:
Copied!
# predict intensity at 4 mmol
obla.predict(4)
# predict intensity at 4 mmol
obla.predict(4)
Out[ ]:
np.float64(145.93695290778828)
In [ ]:
Copied!
# Plot the prediction at 4 mmol
obla.plot.plot_predictions(4)
# Plot the prediction at 4 mmol
obla.plot.plot_predictions(4)
Out[ ]:
<Axes: title={'center': 'Lactate Model Fit'}, xlabel='Intensity', ylabel='Lactate'>