# Questions tagged [basis-function]

A basis function is an element of a set of functions that span a function space.

55 questions
Filter by
Sorted by
Tagged with
303 views

### Understanding spline transformation and regression coefficients

I do not understand properly what a spline does even in a simple situation of a piecewise regression, and I need some help. Consider the following basic example: ...
• 191
102 views

### Implications of keeping a "low" basis dimension in GAMM

Some of the smooths in my generalized additive mixed model (GAMM) indicate in mgcv::k.check(m) they want to be more wiggly, but I don't think I have enough data to ...
• 1,529
93 views

### Basis dimension (k) low but unable to increase it

I have a GAM of the form: Abundance ~ Treatment + s(KelpCover) + s(DayofYear, by=Treatment) Where Abundance is a count of ...
117 views

### How to transform basis functions to satisfy a restriction

I am trying to find a way to methodically transform a set of basis functions to satisfy a restriction so that the coefficient of the first basis function at a specific value of $x$ can have a special ...
• 92.4k
69 views

### Empirical basis functions

Preliminary Consider $n$ individuals each with observed data $Z_i, i = 1, \ldots, n$. For each individual $i$, the longitudinal predictor $Z_i = \{Z_i(t_{i1}), \ldots, Z_i(t_{i,R_i})\}$ is measured ...
• 731
66 views

### How to construct cardinal spline bases

I would like to know how to algebraically construct cardinal spline bases, as I would like to make a prediction with a natural cubic spline model which uses them; however, the only source I have found ...
• 153
14 views

### Short linear basis expansion for support vector regression

In support vector regression (SVR), I know that many different linear basis expansions for the predictors can be used. I am interested in a basis expansion that is as algebraically short as possible ...
• 153
54 views

### Interpretation of basis functions in a logistic regression: can we test for univariate and multivariate/copula differences between the categories?

O'Brien (1988) has shown that a strong method for doing multivariate testing is to reverse the problem. That is, instead of seeing if the category impacts the measured values, see how the measured ...
• 62.7k
296 views

### Spline basis explicitly including a linear term; basis functions generated by the default call to "s()" function of mgcv package

I'm curious about the basis functions generated by the call to "s()" function with default parameter values, but even more specifically I'm curious about a smoother for a single variable ...
• 139
1 vote
87 views

### EDF and basis functions in GAMs with factor-smooth interactions

I am trying to use a GAM to model average daily water temperature against day and habitat type in an estuary. I have temperature logger data over 115 days across three habitat types. I am using a GAM ...
• 11
272 views

### Second differences notion behind GAM penalties

I'm going back through Simon Wood's book on generalized additive models (GAMs) and came back across the definition of the penalty term employed, which is supposed to combat overfitting of smooths. The ...
• 13.8k
1 vote
52 views

### Kernelization vs pre-defined basis functions: which one is better and why?

I am learning about kernels and how linear models can use them to model nonlinear data. Consider, for example, linear regression for nonlinear function $y(\textbf{x})$. The idea is to project the ...
• 217
47 views

### Covariance matrix of linear estimator of basis

I am reading Elements of Statistical Learning, specifically section 5.2.2, an example on the South African Heart Disease dataset. The idea is to model the logit of the conditional probability of the ...
• 113
70 views

### Why do we multiply the centered data with eigen vector instead of taking inverse of the eigen vector while performing PCA

The question may sound stupid but I really don't understand the logic behind this. Whenever we do a PCA, we take a covariance matrix on the centered data and do eigen decomposition. In order to ...
1 vote
71 views

### Linear regression using two different classes of basis functions

Let's say we have 1D data $Y = \{ y_i \mid y_i \in \mathbb{R} \}$, and regressors $X = \{ x_i \mid x_i \in \mathbb{R} \}$, and we try doing basis regression. Suppose we find that we can perfectly ...
• 221
1 vote
304 views

### Effect of basis functions on the dimension of a linear regression model

In Scikit-learn I can use polynomial features to create polynomial linear regression models. Scikit-learn transforms my original ...
• 216
116 views

### Determining spline basis dimension using Wood's statistical test

In Simon Wood's book Generalized Additive Models (2nd ed.) on page 243, he describes the following procedure for checking that the basis dimension is too small: Fortunately informal checking that the ...
• 1,343
1k views

### What is the relationship between knots and cubic spline basis functions in GAMs?

I do not understand the relationship between knots and basis functions in Generalized Additive Models (hereafter GAM). In Chapter 4 of S. Wood's book "Generalized Additive Models - An ...
• 1,229
2k views

### How to correctly use I-Splines for monotone non-decreasing/ increasing regression?

I have the following data to which I want to fit a monotone non-decreasing spline. ...
• 259
131 views

### How to calculate basis functions by hand

I am learning about natural splines and basis functions and am struggling with it a lot. I understand the concepts of knots being the part where first and second derivatives are equal on either side. ...
1 vote
28 views

### Parameter estimation for basis function model in Elements of Statistical Learning (ESL)

In the book Elements of Statistical Learning, section 2.8.3 describes Basis Functions, citing an example of a radial basis function as $f_{\theta}(x) = \sum_{m=1}^M \beta_M \sigma(\alpha_m'x + b_m)$, ...
• 725
1 vote
783 views

### How do splines work when being used on the right side of an equation?

I have seen 2 ways of using splines: Spline as the primary model: Here, we use a spline to model y as a function of a single covariate x. That is, it is used as a regression model. The example in the ...
• 113
1 vote
1k views

### Confusion between basis functions and SVM feature mapping

I'm new to Machine Learning. I have just read an article about basis functions. Apparently, the basis functions create a non-linear regression line to capture a variety of differently complicated ...
1 vote
138 views

### Functional Linear Regression without Orthonormal Basis for Prediction

What do you do in functional linear regression when for whatever reason you don't want to use an orthonormal basis expansion? In functional linear regression for scalar on function regression, one may ...
• 492
311 views

### Save computation time with mgcv?

Suppose we have a generalized additive model that is formulated as gam(y~s(x,bs='tp',k=10),...) I need to repeat the computation many times (e.g., 1000) for the ...
• 2,699
1 vote
53 views

### Bivariate basis functions with span invariant to rotation about $z$-axis

Consider the following functions defined over $x,y\in\mathbb{R}$: $f_0(x,y)=1$ $f_1(x,y)=x$ $f_2(x,y)=y$ These functions form a basis with three-dimensional span (the set of all non-vertical planes) ...
• 375
2k views

### How To Solve A Sequence Question [closed]

I'm taking a course on R on edx, but I have been stocked here for days. Please Which integer values are between the maximum and minimum heights? For example, if the minimum height is 10.2 and the ...
621 views

### What is the expanded representation, $\phi(X)$, required to obtain the RBF kernel?

For the two-dimensional case, where $\boldsymbol X=[x_1, x_2]$ and its corresponding expanded represetation $\boldsymbol\phi(X)= [1, \sqrt2 x_1, \sqrt2 x_2, x_1^2, x_2^2, \sqrt2x_1x_2]$, we can ...
• 561
444 views

### How should I understand smoothing in functional data analysis from a modelling perspective (specifically for temperature data)?

The specifics of this question are that I am looking at daily maximum and minimum temperature from the GHCND data set obtained from NOAA's API and I view the temperatures observed at days in a year as ...
• 1,343
1 vote
41 views

27 views

### Generate funciton with specified bases

I am trying to simulate functional data using specified bases and a set of random coefficients. For example, I can generate a function on $[0,1]$ with Fourier basis like f(x) = \sum_{i=0}^k a_i sin(...
365 views

### How to measure the effect of each covariate in GLM

I have a GLM model with two variables (Z1 and Z2). I have also used some basis functions to estimate these variables. In other words, Z1 is substituted by 10 basis functions and Z2 with 12 basis ...
• 169
1 vote
2k views

### Why does it matter that bases are linearly independent?

I am taking an advanced linear algebra course and am once again confused by a lot of the concepts. I understand that the definition of a basis is a set of vectors that spans the vector space and is ...
• 369
3k views

### Is spline basis orthogonal?

When we talk about the basis, we have the concept like orthogonal, unit length etc. for vectors. I think the same concept also exist in Fourier basis and Polynomial basis. But how about spline (Say ...
• 36.9k
2k views

### Gaussian basis function in Bayesian Linear Regression

I am learning about Bayesian Linear Regression from the book "Pattern Recognition And Machine Learning" (Bishop, Christopher M.). I want to recreate graphs from illustration 3.8 and this require to ...
• 21
1k views

### In using a basis model to represent a cubic spline, what is the meaning of the truncated power basis function and its math in lay terms?

I am going over “Introduction to Statistical Learning” (James, et al). While I understand the concept of a spline (piecewise polynomial with continuous 1st and 2nd derivative at each knot), I’ve been ...
373 views

### Regression Spline basis functions

I'm reading this book - Generalized Additive Models by Simon Wood. On page 124, he defines basis for regression spline as (language is R) ...
• 1,389
2k views

### What are periodic version of splines?

In this What's wrong to fit periodic data with polynomials? post, I tried to use Fourier basis expansion and Polynomial basis expansion to fit a toy periodic data (daily temperature data set). I ...
• 36.9k