Questions tagged [nonlinear-functions]

A function that does not validate the additivity or homogeneity properties is characterized as non-linear.

In mathematics, a linear function (or map) f(x) is one which satisfies both of the following properties:

  • Additivity or superposition: f(x + y) = f(x) + f(y)
  • Homogeneity: f(alpha * x) = alpha * f(x)

A function that does not confirm the above is characterized as non-linear.

374 questions
5
votes
2 answers

ERROR: MethodError: no method matching zero(::Type{Any})

I am very new to Julia. I am trying to solve a system of nonlinear equations to find a vector (p_new). Below a simplified version of my problem. The issue is that I get this message: "ERROR: MethodError: no method matching zero(::, Type{Any})". I…
5
votes
1 answer

An SVM implementation supporting non-linear kernels and multi-label on a one-vs.-rest

I'm looking for a SVM implementation with support for non-linear kernels and one-vs-rest scenario, to perform a multi-label classification. Preferably, written in Python, or that I can call from Python with wrappers. I was looking into sklearn, and…
5
votes
1 answer

Using Z3 QFNRA tactic with datatypes: interaction or inlining

In Non-linear arithmetic and uninterpreted functions, Leonardo de Moura states that the qfnra-nlsat tactic hasn't been fully integrated with the rest of Z3 yet. I thought that the situation has changed in two years, but apparently the integration is…
Skiminok
  • 2,801
  • 1
  • 24
  • 29
5
votes
1 answer

Non-linear regression line and R² in ggplot2

I have the following data: dput(dat) structure(list(Band = c(1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930 ), Reflectance = c(25.296494, 21.954657, 18.981184, 15.984661, 14.381341,…
pat-s
  • 5,992
  • 1
  • 32
  • 60
4
votes
0 answers

nlme error "Invalid formula for groups" although random effect specified

I have done some searching for this, but the mailing list posts I have found are associated with the person not specifying a random effect in nlme whereas I have done this. I also own the book Mixed Effect Models in S and S-Plus by Pinheiro and…
Michelle
  • 1,281
  • 2
  • 16
  • 31
4
votes
1 answer

Solve a system of nonlinear equations with trigonometric functions

I've got the following equations: q1dd,b1,q2,q3,v1,q2dd,a1,a2,b2 = symbols('\ddot{q}_1 b1 q2 q3 v1 \ddot{q}_2 a1 a2 b2') eq1 = -q1dd+b1*cos(q2)*sin(q3)*v1 eq2 = -q2dd+a1*sin(q2)+a2*cos(q2) + b2*cos(q3)*v1 display(eq1) display(eq2) According to…
mike
  • 791
  • 11
  • 26
4
votes
1 answer

How to select starting value for covariates in NLME

library(nlme) Loblolly$age2 <- as.factor(ifelse(Loblolly$age < 12.5, 0, 1)) Here I define a binary covariate that I'm interested in. model <- nlme(height ~ (R0) + 1, data = Loblolly, fixed = list(R0 ~ 1 + (age2)), …
Adrian
  • 9,229
  • 24
  • 74
  • 132
4
votes
1 answer

Solve a Non-linear Equation of one variable but written in a summation form, in "R"

This is the Non-Linear Equation in "mu" which I want to solve numerically using R. All of the paired (x, y) are known. So the only variable is "mu" Now, I have written the function in R. Then, I am trying to get the root by using "rootSolve"…
4
votes
2 answers

How to solve risk parity allocation using Python

I would like to solve risk parity problem using python. Risk parity is a classic approach for portfolio construction in finance. The basic idea is to make sure the risk contribution for each asset is equal. For example, suppose there're 3 assets,…
cone001
  • 1,143
  • 3
  • 13
  • 15
4
votes
1 answer

Reaction-diffusion parallel growing method

I've created many types of reaction-diffusion patterns using different parameters for death and feed rates etc. Working with them on Ready by GollyGang (a simple C++ software that can grow the patterns based on parameters and code) However, they all…
ofer dofer
  • 631
  • 2
  • 11
  • 28
4
votes
1 answer

How do you do nonlinear shading in OpenGL?

I am developing a visualization tool in OpenGL to visualize the output of a 3d finite element modeling application. The application uses a tetrahedral mesh (but I am only viewing the exterior facets, which are triangles). The output is a scalar…
Alex319
  • 3,818
  • 9
  • 34
  • 40
4
votes
3 answers

Non-linear equation solving Sympy Python for hydraulics - Need resolve TypeError("can't convert expression to float")

I am trying to write a piece of python script to automate a quite time consuming task in some hydraulics problems, that occur in civil engineering. The equation is from Colebrook-White, and is the following: I have written the following code: from…
4
votes
0 answers

cvFit() cross-validation error for nls model: "Error: object of type 'symbol' is not subsettable"

I have this nls() model running pretty smoothly, and I want to be able to do a cross-validation using the cvTools package, but I get this error when I run the cvFit() function: Error: object of type 'symbol' is not subsettable RStudio…
Chris. Z
  • 365
  • 1
  • 7
  • 17
4
votes
2 answers

PROC NLIN from SAS to R

I have been currently assigned a work where I need to translate a SAS code to R. I have been able to successfully do 80% of it and now I am stuck at the part where PROC NLIN is used. From what I read, PROC NLIN is used to fit Non-Linear Models andI…
RHelp
  • 815
  • 2
  • 8
  • 23
4
votes
2 answers

Python AttributeError:cos

I'm trying to solve numerically an equation using Python2.7. This is the whole code: from sympy import * from sympy import Symbol from sympy.solvers import nsolve from scipy import * from pylab import * import numpy as np # Symbols theta =…
aymenbh
  • 151
  • 4
  • 10
1
2
3
24 25