`argtrig` is not what it claims

Đang mở
#477 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
julia
Lĩnh vực
testing-qa

Hướng nghiên cứu

Start by comparing the argtrig implementation in both ADNLPProblems and PureJuMP with the cited MGH problem and CUTEst definitions; the issue links the ADNLPProblems source and describes the discrepancies. Then inspect the metadata and the PureJuMP docstring, which the issue says is copied from arglina. Done when the function, metadata, and docstring consistently describe the intended problem; the issue does not specify which formulation should be authoritative.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

argtrig (both ADNLPProblems and PureJuMP) minimizes the scalar function https://github.com/JuliaSmoothOptimizers/OptimizationProblems.jl/blob/739fc30814878775f500d76284834b366fcdcc68/src/ADNLPProblems/argtrig.jl#L5

The metadata cites problem 26 of Moré, Garbow and Hillstrom (1981) and CUTEst:ARGTRIG, but this function matches neither:

  • MGH problem 26 (the trigonometric function) is a nonlinear least-squares problem with n residuals r_i(x) = n - sum_j cos x_j + i (1 - cos x_i) - sin x_i, objective sum_i r_i^2, and minimum 0.
  • CUTEst's ARGTRIG.SIF poses these residuals as a system of n nonlinear equations (classification NOR2-AN-V-V), but multiplies sin x_i by i. ARGTRIGLS.SIF is the least-squares form of ARGTRIG. ARGTRIG2 and ARGTRIGLS2 use the coefficient 1 on sin x_i from the source.

argtrig's f looks like the sum of the residuals (not their squares), with i replaced by j. It equals n - n(n+1)/2 + sum_j [(j-1) cos x_j + sin x_j], which is separable, and its minimum is n - n(n+1)/2 - sum_j sqrt((j-1)^2 + 1): -92.306 for n = 10 and -9903.48 for n = 100. The metadata's :best_known_upper_bound => 0.0 is the minimum of the MGH problem, not of this function.

The metadata are also inconsistent. The notes (copied from the SIF header) describe "a sum of n least-squares groups" with classification NOR2-AN-V-V, while :objtype => :other and :ncon => 0. The PureJuMP docstring, "Linear function with n parameters and m observations - full rank", is the one for arglina.

Ngôn ngữ chính
Julia
Star
90
Fork
48
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của JuliaSmoothOptimizers/OptimizationProblems.jl

Tất cả issue của JuliaSmoothOptimizers/OptimizationProblems.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.