在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:ahwillia/NonNegLeastSquares.jl开源软件地址:https://github.com/ahwillia/NonNegLeastSquares.jl开源编程语言:Julia 100.0%开源软件介绍:NonNegLeastSquares.jlSome nonnegative least squares solvers in Julia. Basic Usage:The command Minimize Currently Implemented Algorithms:The code defaults to the "Pivot Method" algorithm.
To specify a different algorithm, use the keyword argument nonneg_lsq(A,b;alg=:nnls) # NNLS
nonneg_lsq(A,b;alg=:fnnls) # Fast NNLS
nonneg_lsq(A,b;alg=:pivot) # Pivot Method
nonneg_lsq(A,b;alg=:pivot,variant=:cache) # Pivot Method (cache pseudoinverse up front)
nonneg_lsq(A,b;alg=:pivot,variant=:comb) # Pivot Method with combinatorial least-squares Default algorithm: nonneg_lsq(A,b) # pivot method The keyword nonneg_lsq(A'*A,A'*b;alg=:nnls,gram=true) # NNLS
nonneg_lsq(A'*A,A'*b;alg=:fnnls,gram=true) # Fast NNLS References
Installation:Pkg.add("NonNegLeastSquares")
Pkg.test("NonNegLeastSquares") Simple Example:using NonNegLeastSquares
A = [ -0.24 -0.82 1.35 0.36 0.35
-0.53 -0.20 -0.76 0.98 -0.54
0.22 1.25 -1.60 -1.37 -1.94
-0.51 -0.56 -0.08 0.96 0.46
0.48 -2.25 0.38 0.06 -1.29 ];
b = [-1.6, 0.19, 0.17, 0.31, -1.27];
x = nonneg_lsq(A,b) Produces: 5-element Array{Float64,1}:
2.20104
1.1901
0.0
1.55001
0.0 Speed Comparisons:Run the
Algorithims That Need Implementing:Pull requests are more than welcome, whether it is improving existing algorithms, or implementing new ones.
See also: |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论