polynomial-math Questions
1
How can multivariate linear regression be adapted to do multivariate polynomial regression in Javascript? This means that the input X is a 2-D array, predicting a y target that is a 1-D array.
The...
Raincoat asked 4/11, 2018 at 21:38
2
Solved
I want to use python interpolate polynomial on points from a finite-field and get a polynomial with coefficients in that field.
Currently I'm trying to use SymPy and specifically interpolate (from...
Voidance asked 2/1, 2018 at 17:33
2
I am trying to implement scikit-learn's PolynomialFeatures as a layer in a feedforward neural network in tensorflow and Keras. I'll give an example using NumPy arrays for the sake of simplicity. If...
Veer asked 10/4, 2017 at 0:9
4
Solved
I need to calculate coefficients of polynomial using Lagrange interpolation polynomial, as my homework, I decide to do this in Javascript.
here is definition of Lagrange polynomial (L(x))
Lagra...
Yolande asked 25/3, 2012 at 14:27
2
Solved
I am attempting to read in data and plot them on to a graph using python (standard line graph). Can someone please advise on how I can classify whether certain points in a graph are uptrends or dow...
Adhern asked 10/6, 2014 at 7:7
5
Solved
I'd like to find a least-squares solution for the a coefficients in
z = (a0 + a1*x + a2*y + a3*x**2 + a4*x**2*y + a5*x**2*y**2 + a6*y**2 +
a7*x*y**2 + a8*x*y)
given arrays x, y, and z of lengt...
Seymore asked 27/11, 2015 at 21:19
5
Solved
I've read the answers to this question and they are quite helpful, but I need help.
I have an example data set in R as follows:
x <- c(32,64,96,118,126,144,152.5,158)
y <- c(99.5,104.8,108.5...
Koel asked 29/9, 2010 at 14:24
4
Solved
I want to interpolate a polynomial with the Lagrange method, but this code doesn't work:
def interpolate(x_values, y_values):
def _basis(j):
p = [(x - x_values[m])/(x_values[j] - x_values[m]) fo...
Upspring asked 23/10, 2010 at 11:45
5
Solved
this seems like an obvious question to me, but I couldn't find it anywhere on SO.
I have a cubic polynomial and I need to find real roots of the function. What is THE way of doing this?
I have fou...
Horseplay asked 5/2, 2011 at 11:20
1
Solved
I'm trying to create a non-linear logistic regression, i.e. polynomial logistic regression using scikit-learn. But I couldn't find how I can define a degree of polynomial. Did anybody try it?
Than...
Clerc asked 1/5, 2019 at 13:44
1
Solved
Since NumPy doesn't make use of multiple cores, I'm learning to speed up NumPy code with NumExpr since it has very good support for multithreading. Below is an example that I'm working with:
# inp...
Vinni asked 14/4, 2019 at 12:11
2
Solved
I have these problems about polynomials and I've spent about 4 hours on this, but I just can't get it. I'm new to Python and programming and I've tried working it out on paper, but I just don't kno...
Smudge asked 7/8, 2013 at 2:12
1
Solved
I would like to try to implement Yun's algorithm for square-free factorization of polynomials. From Wikipedia (f is the polynomial):
a0 = gcd(f, f'); b1 = f/a0; c1 = f'/a0; d1 = c1 - b1'; i = 1
re...
Greenberg asked 9/7, 2018 at 17:18
1
Title says it all.
I need to split n as sum of k parts where each part ki should be in the range of
1 <= ki <= ri for given array r.
for example -
n = 4, k = 3 and r = [2, 2, 1]
ans = 2
...
Michael asked 22/12, 2017 at 3:58
1
Solved
I was trying to match the orthogonal polynomials in the following code in R:
X <- cbind(1, poly(x = x, degree = 9))
but in python.
To do this I implemented my own method for giving orthogon...
Copper asked 4/12, 2017 at 7:4
1
I was trying to solve a linear system Xc=y that was square. The methods I know to solve this are:
using inverse c=<X^-1,y>
using Gaussian elimination
using the pseudo-inverse
It seems as ...
Weinberg asked 21/10, 2017 at 3:46
1
Solved
I'm trying to implement fast polynomial division using Fast Fourier Transform (fft).
Here is what I have got so far:
from numpy.fft import fft, ifft
def fft_div(C1, C2):
# fft expects right-most...
Larch asked 27/6, 2017 at 0:31
3
Solved
In R how would one represent polynomial expressions and do polynomial math with the numeric vector objects? For example:
x1 <- c(2,1) # 2 + x
x2 <- c(-1,3) # -1 + 3*x
And want:
x1 * x2 # ...
Luisaluise asked 31/5, 2013 at 19:20
4
Solved
So I have a design which incorporates CRC32C checksums to ensure data hasn't been damaged. I decided to use CRC32C because I can have both a software version and a hardware-accelerated version if t...
Airdrie asked 15/7, 2013 at 0:27
1
Solved
Polynomial: a0x^0 + a1x^1 +a2x^2 + a3x^3 + ... + anx^n
Array: array_a[] = {a0, a1, a2, a3 ... an};
I wrote a function to calculate this polynomial in Java:
public double cal(double x) {
double ...
Partridgeberry asked 30/8, 2016 at 15:13
2
Solved
I'm looking for a speedy algorithm to find the roots of a univariate polynomial in a prime finite field.
That is, if f = a0 + a1x + a2x2 + ... + anxn (n > 0) then an algorithm that finds all r &l...
Walling asked 12/3, 2015 at 3:13
2
I have an polynomial equation of 4th order and I need to find all roots.
Simple example:
from sympy import (Symbol,solve,I)
a=4+5*I; b=3+7*I; c=12-56*I; d=33+56*I; e=345-67*I; x=Symbol('x')
eq=a...
Cork asked 6/2, 2015 at 13:14
1
I am working on my project of Elliptic Curve Cryptography which requires programming on binary fields. It includes basic operations like addition, multiplication, inversion etc w.r.t. an irreducibl...
Emmyemmye asked 14/12, 2015 at 7:56
1
I'm trying to perform a multiplication of polynomials of degree 4096 using ZZ_pEX class from NTL. However, it returns the error "Polynomial too big for FFT", and I couldn't find a way to make it wo...
Refluent asked 10/7, 2015 at 16:33
1
Bairstow's root finding method needs very good initial approximations for the quadratic factors in order to converge.
I tried various constants, random numbers, fractions out of the trailing coeff...
Kimmy asked 25/8, 2015 at 10:3
1 Next >
© 2022 - 2024 — McMap. All rights reserved.