Comparing`fit!` and `evaluate!` for `LogisticClassifier` with scikit-learn
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
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- machine-learning, performance
Hướng nghiên cứu
Bắt đầu với Gist được liên kết và tái hiện so sánh thời gian giữa Julia và Python bằng các phiên bản được liệt kê trong issue. Đọc issue liên quan #14 và kiểm tra cách LogisticClassifier cung cấp các thiết lập cho solver, tolerance và iteration. Được xem là hoàn tất khi đã ghi lại một so sánh tương đương hoặc xác định một vấn đề hiệu năng cụ thể và phạm vi của vấn đề đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
This issue is closely related to https://github.com/alan-turing-institute/MLJLinearModels.jl/issues/14
I'm trying to compare performance of fit! and evaluate! in Julia and analogous methods in scikit-learn in Python. The code and data are available by the link: https://gist.github.com/irublev/6e8f928ef78993922aa4b5d735bf3efc
What concerns Julia code, I run it in Windows 10, Julia version 1.6.1 (2021-04-23), MLJ v0.16.4, MLJBase v0.18.6, MLJLinearModels v0.5.4 (and the Python code was run in Python 3.8.6, scikit-learn 0.23.2, numpy 1.19.2).
And the results are as follows:
| Julia | Python | |
|---|---|---|
fit!/fit |
[ Info: Training Machine{LogisticClassifier,…} @116.0.211018 seconds (6.75 k allocations: 23.712 MiB) |
Training took 0.07000088691711426 seconds |
evaluate!/cross_val_score |
Evaluating over 10 folds: 100%[=========================] Time: 0:00:011.343403 seconds (94.58 k allocations: 232.942 MiB, 0.60% gc time) |
Scoring took 0.5599837303161621 seconds |
It should be noted that the corresponding Julia code marked with @time (see https://gist.github.com/irublev/6e8f928ef78993922aa4b5d735bf3efc) was executed several times to exclude compilation time.
And the question I'd like to answer is why MLJ is 2.5-3 times slower than scikit-learn. I tried to make parameters of models in Julia and in Python as close as possible.
But I have not found the way to configure solvers. In Python we have the following list of parameters:
classifier.get_params()
Out[82]:
{'C': 0.1,
'class_weight': None,
'dual': False,
'fit_intercept': True,
'intercept_scaling': 1,
'l1_ratio': None,
'max_iter': 100,
'multi_class': 'auto',
'n_jobs': None,
'penalty': 'l2',
'random_state': None,
'solver': 'lbfgs',
'tol': 0.0001,
Thus, we have here maximal number of iterations, tolerance, etc. And I'm not sure the comparison above is correct, because I do not know what are the values of the respective parameters for LFBGS solver in Julia.
Could you please say how to make sure that all is configured in Julia exactly as it is in Python? And what may be the reason for such performance of Julia? May it be improved somehow? It does not looke as expect on par or better as pointed in https://github.com/alan-turing-institute/MLJLinearModels.jl/issues/14
- Ngôn ngữ chính
- Julia
- Star
- 86
- Fork
- 16
- 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 JuliaAI/MLJLinearModels.jl
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
JuliaAI/MLJLinearModels.jl#187 · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
JuliaAI/MLJLinearModels.jl#180 ·
-
help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
JuliaAI/MLJLinearModels.jl#163 · 4 bình luận ·
-
Warning: f_tol is deprecated.Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
JuliaAI/MLJLinearModels.jl#160 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
JuliaAI/MLJLinearModels.jl#159 · 3 bình luận ·
Tất cả issue của JuliaAI/MLJLinearModels.jl
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Sienna-Platform/PowerSimulations.jl#1737 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
FluxML/Optimisers.jl#254 ·
-
Minor: floodplain warning percentage, scalar output error message and a never-true identity checkĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
JuliaAI/MLJTransforms.jl#101 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
@contents blocks fail to render on Julia 1.14Có thể đã có người làm @sbfnk đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
LuxDL/DocumenterVitepress.jl#410 ·