I'd like to create an algorithm in javascript that can be regressed with any graph, such as scipy.optimize.curve_fit (I'd like you to tell me a library that corresponds to that). Or I would like you to tell me an algorithm for regression specifically for sigmoid functions.) )

Asked 2 years ago, Updated 2 years ago, 282 views

I would like to create an algorithm in javascript that can be regressed with any graph, such as scipy.optimize.curve_fit.The library I found is at the following URL:

https://www.npmjs.com/package/regression

However, this can only be a specific graph regression, such as a simple linear regression or logarithmic regression.
The reference graph (the code part is written in python) that I want to go back to is

sigmoid function
http://ailaby.com/sigmoid_coef/

def pf(x, alpha, beta):
    return 1/(1+np.exp (-alpha-beta*x))

will be .
So what I want to do is
1, I would like you to tell me an algorithm that can be regressed with any graph, such as scipy.optimize.curve_fit.
If 2, 1 is difficult, please tell me an algorithm for regression that is specific to sigmoid functions only.

That's all.Thank you for your cooperation.

python javascript deep-learning scipy

2022-09-30 22:04

1 Answers

The algorithm used by scipy.optimize.curve_fit is described in the document: https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html

method {'lm', 'trf', 'dogbox'}

Each method is as follows:

  • 'trf': Trust Region Reflective algorithm, particularly sustainable for large sparse problems with bounds.Generally robust method.
  • 'dogbox': dogleg algorithm with rectangular trust regions, typical use case is small problems with bounds. Not recommended for problems with rank-deficit Jacobian.
  • 'lm': Levenberg-Marquardt algorithm as implemented in MINPACK.Doesn't handle bound and sparse Jacobians.Usually the most efficient method for small unconstrained problems.


2022-09-30 22:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.