MDS: supply Gram matrix directly
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- julia
- Lĩnh vực
- data-visualization
Hướng nghiên cứu
Bắt đầu bằng cách xác định các điểm vào hiện có của MDS fit và các phép chuyển đổi dmat2gram và gram2dist được đề cập trong issue. So sánh các đường đi hiện tại của tọa độ và khoảng cách trước khi quyết định API gắn thẻ đầu vào; công việc được xem là hoàn tất khi hỗ trợ đầu vào Gramian trực tiếp mà không làm hỏng hành vi hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Currently the pipeline for MDS is X -> D -> G -> M, where X is a coordinate representation of the data, D is the pairwise distance matrix, G is the Gram matrix, and M is the final MDS model. One can alternatively go D -> G -> M by supplying the distances=true keyword. However, there are applications where the natural thing to supply is G. For example, if you are working with objects for which there is a natural inner product, and you want to visualize these objects in a lower-dimensional space, you're going to first compute G, and it would be quite silly to use fit(MDS, gram2dist(G); distances=true) when the first thing that will happen inside fit is to convert the distances back into the Gram matrix.
I know there isn't a ton of stuff inside fit that happens after you have G, but from the standpoint of keeping things in sync I think it would be best to expose this to the user instead of forcing them to create their own private version of fit.
The only hard problem is deciding the API. I think a good design would be
struct Distances{M<:AbstractMatrix}
D::M
end
struct Gramian{M<:AbstractMatrix}
G::M
end
fit(::Type{MDS}, X::AbstractMatrix) = fit(MDS, Distances(L2distance(X)))
fit(::Type{MDS}, D::Distances) = fit(MDS, Gramian(dmat2gram(D.D)))
function fit(::Type{MDS}, G::Gramian)
# the "main" implementation
end
Then users call one of:
fit(MDS, X)fit(MDS, Distances(D))fit(MSD, Gramian(G))
depending on what kind of starting point they have.
One alternative approach is to use a keyword argument, but here we would run into a compatibility problem: if we add gramian::Bool=false as a keyword, then we have to look for the case where distances == gramian == true and throw an error. This is not a big deal but it feels a bit ugly. Alternatively we could add interpretation=:coordinates and support the settings :distances and :gramian but that would be a breaking change. We can do a breaking change, but it seems to be a bit silly for a very minor change. With the "type tagging" of the input data, we could have fit(::Type{MDS}, X::AbstractMatrix) still support the distances kwarg but give a deprecation warning, and then we can remove that API whenever other more substantive changes force a breaking release.
- Ngôn ngữ chính
- Julia
- Star
- 387
- Fork
- 83
- 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
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của JuliaStats/MultivariateStats.jl
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
tagbot-manual
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
JuliaStats/MultivariateStats.jl#238 · 1 bình luận ·
-
Return a result even when MetricMDS does not convergeCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
JuliaStats/MultivariateStats.jl#233 · 1 bình luận ·
-
How to use MetricMDSĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
JuliaStats/MultivariateStats.jl#231 · 2 bình luận ·
Tất cả issue của JuliaStats/MultivariateStats.jl
Issue tương tự
-
`AMSGrad` state starts at `epsilon` instead of zero, so zero gradients move parameters and small gradients are dampedCó thể đã có người làm @parth-patel010 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
FluxML/Optimisers.jl#247 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
OpenFUSIONToolkit/GPEC#644 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
An unknown `wellformed` level is accepted, so a misspelled `:strict` skips the strict checksĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
SciML/DataDrivenDiffEq.jl#694 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
JuliaLang/LinearAlgebra.jl#1834 ·
Maintainer thường phản hồi trong vòng 1 ngày