{ "cells": [ { "cell_type": "markdown", "id": "ed73287e-2270-4fde-b11f-2a8cf5a61d74", "metadata": {}, "source": [ "## Spline\n", "\n", "`lamatrix` provides a Spline model which can be used to capture smoothly varying trends in time. B-Splines are useful because they are flexible, linear, and simple to fit. They are defined by the user by setting the widths of \"knots\", which tunes the scale of the variability." ] }, { "cell_type": "code", "execution_count": 1, "id": "5dfa6e3c-508b-45c6-b05e-83726a740e2e", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "x = np.arange(-10, 10, 0.01)\n", "\n", "\n", "from lamatrix import Spline" ] }, { "cell_type": "code", "execution_count": 2, "id": "7cae91be-7e48-4e0d-8303-3c0ab7552c9c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "