The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [polynomial]

A mathematical expression w/ >1 term containing the same variable (eg, x & x^2). Polynomials are commonly used to model curvilinear relationships.

279 questions
Filter by
Sorted by
Tagged with
10 views

Is it possible to train an RNN to predict projectile motion?

Projectile motion is given by a function $y = -9.81 x^2 + ax + b$ for some parameters $a$ and $b$. I'll simply assume for $x$ values to be distanced by 1, so $x_t = t$. I can then easily generate ...
22 views

Time series plots, polynomial coefficients and PCA

I have several time series plots that I have their polynomial coefficients (curve fitting using Matlab polyfit). Is it possible and valid to use Principal Component Analysis (PCA) to try to classify ...
27 views

Perfect multicollinearity with a cubic term in the model?

I'm trying to figure out why adding a cubic term in the model doesn't guarantee a perfect multicollinearity. If $X$ is known, then $X^3$ is known in both magnitude and sign and vice versa. It may not ...
28 views

Feature selection (backward elimination) in polynomial regression

I have a polynomial multiple (univariate) regression with 2nd degree (for example) as below. Question. When I execute backward elimination to select features, should I remove features from the ...
23 views

Can I transform a few features to polynomial in multi regression?

Let's say I have 3 features in my ols model as below. model = sm.ols(formula='y ~ a + b + c', data=df) Question 1. If I want to transform the feature 'a' as ...
33 views

Questions re. fitting a polynomial: Runge's phenomenon solutions

I have data on hospital treatment times. I would like to fit a polynomial to the data using least-squares. In a previous question raised before I have already been advised against this, but ...
731 views

Can you add polynomial terms to multiple linear regression?

I am a little confused about when you should or shouldn't add polynomial terms to a multiple linear regression model. I know polynomials are used to capture the curvature in the data, but it always ...
36 views

Can I use polynomial regression with categorical variabels? [closed]

I'm trying to learn a polynomial model of degree 2, but apparently it doesn't work well for dummy variables, as they present only 2 possible values (0 or 1) thus not being able to properly create a ...
26 views

Are the following is a good wrap of a comparison between all linear regression types (single, multiple and polynomial)?

I am new to machine learning and it's hard to find an instructor to help you with theory based questions. If this question does not fit to this site feel free to remove it. I am comparing the 3 types ...
74 views

Questions re. fitting a polynomial: smoothing, cross-validation, etc

I have data on hospital treatment times. I would like to fit a polynomial to the data. My data comes in 5 minute increments and it is very noisy. It looks like this: I can aggregate to a higher ...
10 views

Finding out how change in other variables influence change in target variable

I have data in form of time series that consist 2 variables for 3 different products. First variable is quantity sold and the second is price for each month. And that is repeated for every product. So ...
17 views

Polynomial and simple contrasts for anova

Im wondering if anyone can help me. Im trying to do a 2x16 repeated measures ANOVA with two conditions across 16 timepoints. The main effect of time came out as significant and I was interested in ...
32 views

Why prefer poly() to I() ? Are they different? [duplicate]

A post "Fitting Polynomial Regression in R" used two ways to model the polynomial regression: (a) poly(..., ...); (b) I(...). ...
327 views

An easy decision when to use a spline or a polynomial

I read a lot about polynomials and splines (and in case of the latter also lots of it derivates) and often some special cases were introduced to explain, mostly, why a spline is more suitable than a ...
24 views

What is the best correlation coefficient to use in order to compare how similar two second degree polynomial functions are?

This will likely be a lament question, but then again I am a lament in the area of statistics. Please accept my apologies for that in advance. :) Suppose you have 2 data sets: Dataset 1: some values ...
24 views

How does Polynomial Regression work? [duplicate]

My input data ...
30 views

R - Interpretation of coefficients and written form of fitted model in lm() linear regression when using poly()

I've tried reading several resources on poly(), I'm not able to see an answer to my question. My question pertains how I might present my fitted linear model in a way that the coefficients are ...
34 views

Poly() function in R for linear models

I am working with some data on which I used the poly() function to get 4th degree polynomials. I had one model that only had significance for the first degree, so I ...
21 views

Polynomial Regression with grouped independent observations

I am trying to model how porosity changes across burn up levels of a fuel pellet. I have 300 observations at varying levels of burn up. The way my data is collected makes burn up appear as a ...
55 views

How to explain the result of this polynomial equation?

Lets say that I predicted plant productivity (logy) by precipitation (logx1) and moisture content of soil (logx2). my original data gives me the best result only after taking logarithm on both side of ...
29 views

Is it ok to use polynomial model to fit logarithmically transformed data?

Can we use polynomial regression using logarithmically transformed data. I transformed both y and x1 and x2 variables by natural log. After this, I used polynomial regression to fit. when using poly(...
46 views

Why are polynomial activation functions not used

Why are polynomial functions bad as activations?
74 views

If the quadratic term is significant but the linear term is not, we must add the linear term to the model too?

I have a linear mixed effect model and I add the quadratic term of time in my model and it was significant and improve the AIC & BIC of the model, but the problem is that the linear term of time ...
69 views

Choosing a significance test, trend appears either linear or quadratic

I am testing a one-sided hypothesis of association between two variables. I want to know if I increase variable A, then will variable B also increase? For my experimental design, I increase the ...
11 views

Response surface analysis and simple slope analysis - contradicting results

I performed a multi-level polynomial regression (two IVs, one DV) with some control variables, and also computed the response surface coefficients a1 to a4 alongside simple slope coefficients (+/- ...
572 views

What makes linear regression with polynomial features curvy?

The following is my understanding of what happens: if I take a "two dimensional problem" e.g. I have $X$ as inputs and Y as the outcome and I add a feature $x^2$. This gives a problem an additional ...
45 views

Polynomial regression in a circular data set

I'm working on a data set where I have a set of events per time of the day (in a 1h time slot). I made the sum of the events and plotted a bar as show below. In order to define an equation that could ...
54 views

Polynomial Regression model fits poorly

I was reading ISLR and implemented the least squares approach for a linear regression model on the autos data set which comes with the book. For the least squares approach I used only one predictor(...
40 views

How can I use polynomial distributed lag models for longitudinal categorical exposure?

I have SHS data from 13 time points and i want to describe the relationship between this cumulative exposure and health outcome after the 13th time point. It seems the ...
64 views

Calculating predicted value from polynomial regression by hand

I have the following output from from R. I know we can calculate predicted values using the predict() function. How can we calculate the predicted value by hand if X=2 or 3? I'm using the below ...
15 views

Unclear “mathematical notation” in a polynomial

Although, the Enigma here is a protocol for enhancing the privacy in blockchain; however, the question is about mathematical notation, where we want to calculate the coefficients in a polynomial. ...
32 views

ANCOVA with Polynomial Categorical Variable

I have a homework problem that asks me to fit a one way ANCOVA model to a set of data (which I feel comfortable with). The model is represented as yij = μi + γzij + eij where i indicates ...
124 views

Using a given polynomial formula in a lm() model in R

I am currently trying to fit a polynomial model to measurement data using the lm() function. fit_poly4 <- lm(y ~ poly(x, degree = 4, raw = T), weights = w) ...
19 views

Package to perform 2nd degree polynomial regression with L1 penalty for use of the 2nd degree

I'm trying to fit either a straight line or 2nd degree polynomial through many sets of points (2-dimensional data). I would much prefer a straight line over a polynomial, so am trying to penalize the ...
41 views

test for moderation in a quadratic regression model

I am trying to test for moderation in a quadratic regression model. my results show significant evidence of a quadratic relationship on one of the independent variables (x1) and also significant ...
21 views

How to automatically identify degree of multiple independent variables of Polynomial Regression in R

In the dataset, there are 8 independent variable and 1 dependent variable. I want to use polynomial regression to find the relationship between independent variables and the dependent variable. The ...
64 views

Quadratic polynomial - how to test correlation between x and y?

I have one dependent variable (fish abundance) and one independet variable (time), both continuous. I would like to test the correlation between them because I expect that the abudance changes over ...
68 views

30 views

What is the consequence from building polynomial regression with multiple ind. variables?

I'm exploring polynomial regression. I understand how to execute it for cases with one independent variable. What about cases with multiple independent variables? I'm working with the boston housing ...
31 views

Selection optimum polynomial fit

I have fitted polynomial model of orders 1-4. I have three predictors with 7 levels and my response is 400 values from 0.6-0.9, which seems to be bad for information criterions. I am interested in ...
81 views

Interpreting linear and polynomial predictors in LMM

I am using linear mixed models to investigate change over time on the score on a questionnaire, which was administered at 5 points in time. While I hypothesized a decline, I had no a priori ...
223 views

Catboost Regression. Function Extrapolation

I'm new at ML and have a problem with catboost. So, I want to predict function value (For example cos | sin etc.). I went over everything but my prediction is always straight line Is it possible and ...
139 views

Fitting multiple polynomial regression

I hope someone could advise to interpret and report outputs of the multiple polynomial regression fit. I am trying to do a simple sensitivity analysis of an empirical threshold-based ecological model ...