Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Use posterior functions where possible / avoid duplication of code

Đang mở
#408 1 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
40/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
r
Lĩnh vực
data

Hướng nghiên cứu

The issue names is_constant and n_pareto in loo, which duplicate helpers in posterior such as ps_tail_length. Grep loo's R sources for these definitions and compare each with the matching exported function in posterior, noting which ones are exact copies. Done means the duplicate definitions are removed in favour of calls to posterior, and the existing test suite still passes. Confirm the posterior version is suitable before replacing anything.

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

Mô tả

Description

We have certain functions in loo that are more or less copies from code in posterior.
For loo v3.0.0, we need to inspect the loo code base and replace all function definitions that can be replaced by exporting the equivalent function from posterior. This avoids code duplication and reduces maintainability effort.

Example functions

  • is_constant (loo/posterior)
  • posterior:::ps_tail_length vs. loo:::n_pareto
Ngôn ngữ chính
R
Star
159
Fork
37
Merge trung bình
2 ngày 13 giờ
Pull request đã merge (30 ngày)
5

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 stan-dev/loo

Tất cả issue của stan-dev/loo

Issue tương tự

Thêm issue về R

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.