8000 ENH Optimize dot product order for LogisticRegression for dense matrices by jjerphan · Pull Request #19571 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

ENH Optimize dot product order for LogisticRegression for dense matrices #19571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jjerphan
Copy link
Member
@jjerphan jjerphan commented Feb 26, 2021

Reference Issues/PRs

Contributes to solve #17684 for sklearn/linear_model/_logistic.py.

What does this implement/fix? Explain your changes.

np.linalg.multi_dot quickly chooses the best order for the multiplication of three dense matrices, see its implementation.

This PR uses it for the Hessian and gradient dot product.

Any other comments?

Sparse matrices are to be explored in another PR.

@jjerphan jjerphan changed the title EHN Optimize dot product order for LogisticRegression ENH Optimize dot product order for LogisticRegression Feb 26, 2021
@jjerphan jjerphan force-pushed the logreg_hessian_grad_multi_dot branch from 3b60347 to 22a620d Compare February 26, 2021 15:46
@jjerphan
Copy link
Member Author
jjerphan commented Feb 26, 2021

Here are some results of a first simple benchmark on dense matrices.

$ asv run -b MultiDotLogReg
· Creating environments
· Discovering benchmarks
· Running 1 total benchmarks (1 commits * 1 environments * 1 benchmarks)
[  0.00%] ·· Benchmarking conda-py3.9-cython-joblib-numpy-scipy-threadpoolctl
[100.00%] ··· multi_dot_logreg.MultiDotLogReg.time_hessian_grad_prod                                                                                                                                                                                                                                                         ok
[100.00%] ··· =========== ============ ==================== ===================== ================== =================== ================== ===================
              --                                                                    s_n_cols_prop / mult_strategy                                              
              ------------------------ ------------------------------------------------------------------------------------------------------------------------
               n_samples   n_features   0.5 / chain_np_dot   0.5 / use_multi_dot   1 / chain_np_dot   1 / use_multi_dot   2 / chain_np_dot   2 / use_multi_dot 
              =========== ============ ==================== ===================== ================== =================== ================== ===================
                  100         100           96.3±20μs              126±30μs            158±10μs            183±10μs           278±30μs            257±60μs     
                  100         1000          5.63±0.9ms             6.46±2ms            15.8±5ms            15.0±4ms           37.6±6ms            33.0±4ms     
                  1000        100           939±400μs             1.84±0.5ms          1.44±0.5ms          811±200μs           3.10±1ms           877±200μs     
                  1000        1000          55.5±10ms             50.9±10ms            117±10ms            114±9ms            234±20ms            169±20ms     
                 10000        100            9.85±1ms            10.00±0.2ms           14.8±2ms            6.97±1ms           27.2±3ms           6.56±0.3ms    
                 10000        1000           550±50ms              689±30ms           1.31±0.03s           740±50ms          2.55±0.09s           710±30ms     
                 100000       100            107±7ms               123±20ms            199±30ms            75.3±8ms           346±40ms            102±20ms     
                 100000       1000          5.98±0.1s             5.62±0.4s           13.9±0.5s           6.66±0.07s         27.5±0.4s           6.74±0.06s    
              =========== ============ ==================== ===================== ================== =================== ================== ===================

Edit: link to the first revision of the asv script.

@ogrisel
Copy link
Member
ogrisel commented Feb 26, 2021

Nice 4x speed-up!

@jjerphan
Copy link
Member Author

Nice 4x speed-up!

Note that this speed-up is present only for some matrices that are sufficiently big, and large for s.

We, yet, have no clue for performances regarding sparse matrices as-well. 😉

@thomasjpfan
Copy link
Member

Does the benchmark results change if the matrices were f-ordered?

@jjerphan
Copy link
Member Author

Does the benchmark results change if the matrices were f-ordered?

I just have updated the asv benchmark script to introduce memory layouts.

Though the performances are a bit different in some configurations with Fortran-ordered matrices, It comes with speed-up for most cases.

$ asv run -b MultiDotLogReg
· Creating environments
· Discovering benchmarks
· Running 1 total benchmarks (1 commits * 1 environments * 1 benchmarks)
[  0.00%] · For scikit-learn commit 94abe05b <main>:
[  0.00%] ·· Benchmarking conda-py3.9-cython-joblib-numpy-scipy-threadpoolctl
[100.00%] ··· multi_dot_logreg.MultiDotLogReg.time_hessian_grad_prod                                                                ok
[100.00%] ··· =============== =========== ============ =============== ============== ===============
              --                                                               mult_strategy         
              -------------------------------------------------------- ------------------------------
               memory_layout   n_samples   n_features   s_n_cols_prop   chain_np_dot   use_multi_dot 
              =============== =========== ============ =============== ============== ===============
                     C            100         100            0.5          110±9μs         133±10μs   
                     C            100         100             1           181±20μs        259±40μs   
                     C            100         100             2           320±40μs        297±50μs   
                     C            100         1000           0.5         6.22±0.6ms      15.4±10ms   
                     C            100         1000            1           16.9±6ms        25.8±8ms   
                     C            100         1000            2          32.7±10ms        27.1±2ms   
                     C            1000        100            0.5         1.01±0.3ms       3.84±1ms   
                     C            1000        100             1           4.08±2ms        860±50μs   
                     C            1000        100             2          2.87±0.3ms      1.03±0.1ms  
                     C            1000        1000           0.5         68.7±20ms       54.5±10ms   
                     C            1000        1000            1           105±5ms         103±4ms    
                     C            1000        1000            2           236±20ms        175±10ms   
                     C           10000        100            0.5         10.3±0.8ms      10.2±0.6ms  
                     C           10000        100             1           15.3±1ms        13.9±6ms   
                     C           10000        100             2           27.8±3ms       7.46±0.6ms  
                     C           10000        1000           0.5          599±80ms        581±70ms   
                     C           10000        1000            1          1.23±0.1s        722±60ms   
                     C           10000        1000            2          2.70±0.08s       786±70ms   
                     C           100000       100            0.5          143±30ms        132±40ms   
                     C           100000       100             1           258±60ms       87.0±20ms   
                     C           100000       100             2           379±60ms        116±40ms   
                     C           100000       1000           0.5         5.54±0.3s       7.86±0.4s   
                     C           100000       1000            1          12.3±0.4s       7.90±0.3s   
                     C           100000       1000            2          25.2±0.8s       7.87±0.6s
              =============== =========== ============ =============== ============== ===============   
                     F            100         100            0.5          179±40μs        213±70μs   
                     F            100         100             1           252±70μs        279±30μs   
                     F            100         100             2          436±100μs        380±60μs   
                     F            100         1000           0.5          8.41±3ms        8.27±2ms   
                     F            100         1000            1           14.3±2ms        14.2±2ms   
                     F            100         1000            2          35.8±10ms       33.4±10ms   
                     F            1000        100            0.5         1.04±0.2ms      1.15±0.3ms  
                     F            1000        100             1          1.72±0.3ms      1.05±0.1ms  
                     F            1000        100             2           3.55±1ms        2.08±1ms   
                     F            1000        1000           0.5         58.8±20ms        54.8±3ms   
                     F            1000        1000            1           163±30ms        146±40ms   
                     F            1000        1000            2           266±30ms        214±50ms   
                     F           10000        100            0.5          10.5±1ms        11.7±3ms   
                     F           10000        100             1           15.8±1ms        8.52±8ms   
                     F           10000        100             2          52.6±20ms        13.0±4ms   
                     F           10000        1000           0.5          707±50ms        673±50ms   
                     F           10000        1000            1          1.29±0.06s       665±50ms   
                     F           10000        1000            2          2.36±0.04s       699±30ms   
                     F           100000       100            0.5          113±40ms        140±40ms   
                     F           100000       100             1           230±50ms        126±40ms   
                     F           100000       100             2           454±90ms       89.0±20ms   
                     F           100000       1000           0.5         6.81±0.4s       7.23±0.2s   
                     F           100000       1000            1          11.8±0.5s       6.18±0.4s   
                     F           100000       1000            2           26.1±1s        7.20±0.4s   
              =============== =========== ============ =============== ============== ===============

@jjerphan
Copy link
Member Author
jjerphan commented Feb 28, 2021

Note that in both cases, as n_samples increases, using multi_dot comes with shorter runtimes.

Moreover, the runtimes for multi_dot are similar for varying shapes for s (s_n_cols_prop); this is not the case for the current implementation matrices multiplication chain (chain_np_dot). This shows that using the other order (i.e (X.T @ dX) @ s_trimmed) is thus more appropriate here.

Copy link
Member
@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am +1 with moving forward with this since it is already a net benefit for dense matrices.

We can explore sparse matrices in another PR.

@jjerphan jjerphan changed the title ENH Optimize dot product order for LogisticRegression ENH Optimize dot product order for LogisticRegression for dense matrices Mar 8, 2021
@jjerphan jjerphan marked this pull request as ready for review March 8, 2021 07:26
@jjerphan
Copy link
Member Author
jjerphan commented Mar 8, 2021

@thomasjpfan: I have modified the title and description of the PR accordingly.

@jjerphan jjerphan requested a review from thomasjpfan March 8, 2021 07:28
Copy link
Member
@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an entry to the change log at doc/whats_new/v1.0.rst with tag |Efficiency|. Like the other entries there, please reference this pull request with :pr: and credit yourself (and other contributors if applicable) with :user:.

(It would be interesting to try the out parameter of multi_dot but it is only for np >= 1.19)

@ogrisel
Copy link
Member
ogrisel commented Mar 8, 2021

(It would be interesting to try the out parameter of multi_dot but it is only for np >= 1.19)

+1 for adding a TODO comment explicitly mentioning the minimum numpy version requirement.

Copy link
Member
@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also +1 once with the what's new entry for 1.0.

@rth
Copy link
Member
rth commented Mar 10, 2021

We, yet, have no clue for performances regarding sparse matrices as-well. wink

If we have not benchmarked the sparse case, why are we changing that code path? We have changed the operation order for the sparse case unless I'm missing something? I would rather we reverted to the previous code for sparse.

@thomasjpfan
Copy link
Member

We have changed the operation order for the sparse case unless I'm missing something? I would rather we reverted to the previous code for sparse.

I agree with @rth. The order should be kept the same for the sparse case.

@jjerphan
Copy link
Member Author

Alternatively, and if we aren't in a rush, can we have the sparse matrices case(s) treated in this PR as well?

IMO, this would avoid adding intermediary commits meant to preserve the code path for sparse matrices, which might add complexity to the implementation.

What do you think?

@rth
Copy link
Member
rth commented Mar 10, 2021

Alternatively, and if we aren't in a rush, can we have the sparse matrices case(s) treated in this PR as well?

I looked at it briefly at the time and as far as as I can tell the sparse case is not obvious, because it might depend on both matrix dimensions and sparsity of each array. It would probably be better to look into it in a separate PR in any case.

IMO, this would avoid adding intermediary commits meant to preserve the code path for sparse matrices, which might add complexity to the implementation.

I'm not sure I follow, it would be,

--- a/sklearn/
8000
linear_model/_logistic.py
+++ b/sklearn/linear_model/_logistic.py
@@ -233,7 +233,10 @@ def _logistic_grad_hess(w, X, y, alpha, sample_weight=None):
 
     def Hs(s):
         ret = np.empty_like(s)
-        ret[:n_features] = X.T.dot(dX.dot(s[:n_features]))
+        if sparse.issparse(X):
+            ret[:n_features] = X.T.dot(dX.dot(s[:n_features]))
+        else:
+            ret[:n_features] = np.linalg.multi_dot([X.T, dX, s[:n_features]])
         ret[:n_features] += alpha * s[:n_features]
 
         # For the fit intercept case.

wouldn't it? We don't care about individual commits since PRs are squashed anyway.

@lorentzenchr
Copy link
Member

Before we merge this quickly, can we first benchmark with n_classes=10. IIUC, s_n_cols_prop is multiplied by n_features, so the smallest n_classes=50. I guess there a lot of use cases with small n_classes.

@lorentzenchr
Copy link
Member

Also, if the logic is as simple as https://github.com/numpy/numpy/blob/860c8b82939d1535351f7b651c284a55efe21b10/numpy/linalg/linalg.py#L2742, we can put that before def Hs(s) such that it is not executed every time Hs is called.

@jjerphan
Copy link
Member Author
jjerphan commented Mar 11, 2021

@rth: I misread what you wrote initially; I agree with you.

@lorentzenchr has a good point. We could have the test executed once by defining Hs dynamically based on the shape of X and s if those properties do not change.

Please note that my benchmarks aren't comparing running times of this code path for LogisticRegression (that is for solver==newton-cg and multi_class!='multinomial'). It's yet likely that those changes aren't totally relevant as @lorentzenchr pointed out.

I would suggest inspecting running times for smaller n_classes and for this configuration of LogisticRegression before integrating those changes for fairer comparisons.

Let me know if it is a high priority as I am currently busy. If it's the case and if people want to have it move forward, I am not against other developers contributing to this PR. 🙂

Copy link
Member
@lorentzenchr lorentzenchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This small change (back) in addition to a benchmark with s_n_cols_prop=0.1 and we're good to merge, I think.

@ogrisel
Copy link
Member
ogrisel commented Mar 12, 2021

+1 for reverting the sparse case to the original code as suggested in #19571 (review) and merge the multi_dot optim for the dense case.

jjerphan and others added 2 commits March 12, 2021 23:29
@jjerphan
Copy link
Member Author

Sorry for this week hiccups; here are the raw results from the latest benchmark with, as requested, s_n_cols_prop=0.1 and the alternative order (i.e (X.T @ dX) @ s_trimmed):

· Running 1 total benchmarks (1 commits * 1 environments * 1 benchmarks)
[  0.00%] · For scikit-learn commit 4beb0c27 <main>:
[  0.00%] ·· Benchmarking conda-py3.9-cython-joblib-numpy-scipy-threadpoolctl
[100.00%] ··· multi_dot_logreg.MultiDotLogReg.time_hessian_grad_prod                                                                                         ok
[100.00%] ··· =============== =========== ============ =============== =============== =============== ===================
              --                                                                          mult_strategy
              -------------------------------------------------------- ---------------------------------------------------
               memory_layout   n_samples   n_features   s_n_cols_prop   use_multi_dot   current_order   alternative_order
              =============== =========== ============ =============== =============== =============== ===================
                     C            100         100            0.1           41.7±1μs        34.0±1μs          128±5μs
                     C            100         100            0.5           130±5μs         111±5μs           144±7μs
                     C            100         100             1            189±9μs         175±9μs           176±9μs
                     C            100         100             2            256±10μs        299±10μs          244±70μs
                     C            100         1000           0.1         1.39±0.05ms     1.34±0.05ms        12.1±0.6ms
                     C            100         1000           0.5          5.69±0.2ms      5.56±0.3ms         29.5±2ms
                     C            100         1000            1           11.0±0.5ms      11.1±0.4ms         52.7±3ms
                     C            100         1000            2            23.9±1ms        24.3±1ms          111±4ms
                     C            1000        100            0.1           553±20μs        531±20μs          737±30μs
                     C            1000        100            0.5           917±40μs        898±40μs          747±40μs
                     C            1000        100             1            797±50μs      1.42±0.08ms         782±40μs
                     C            1000        100             2            872±40μs       2.64±0.2ms         834±50μs
                     C            1000        1000           0.1          11.4±0.6ms      11.3±0.5ms         55.1±3ms
                     C            1000        1000           0.5           48.4±2ms        48.0±2ms          74.4±3ms
                     C            1000        1000            1            98.8±4ms        99.8±3ms          98.7±4ms
                     C            1000        1000            2            157±4ms         210±5ms           158±4ms
                     C           10000        100            0.1          5.87±0.1ms      5.90±0.2ms        5.98±0.2ms
                     C           10000        100            0.5          9.08±0.2ms      9.03±0.2ms        6.05±0.2ms
                     C           10000        100             1           6.15±0.2ms      13.3±0.5ms        5.97±0.2ms
                     C           10000        100             2           6.25±0.2ms      23.6±0.9ms        6.13±0.2ms
                     C           10000        1000           0.1           133±1ms         134±1ms           499±6ms
                     C           10000        1000           0.5           525±7ms         511±4ms           513±4ms
                     C           10000        1000            1            537±2ms         982±4ms           549±3ms
                     C           10000        1000            2            600±5ms        2.09±0.01s         628±3ms
                     C           100000       100            0.1           58.3±1ms        57.8±1ms          69.2±2ms
                     C           100000       100            0.5           102±1ms         104±2ms           70.1±2ms
                     C           100000       100             1            69.8±2ms        162±2ms           69.3±2ms
                     C           100000       100             2            69.8±2ms        283±4ms           69.3±2ms
                     C           100000       1000           0.1          1.47±0.01s       1.43±0s          5.01±0.02s
                     C           100000       1000           0.5          5.46±0.1s       5.39±0.01s        5.17±0.03s
                     C           100000       1000            1           5.20±0.04s      10.3±0.05s        5.35±0.07s
                     C           100000       1000            2           5.28±0.01s      22.1±0.3s         5.23±0.03s
                     F            100         100            0.1           46.9±1μs        38.1±1μs          144±6μs
                     F            100         100            0.5           140±7μs         121±5μs           162±8μs
                     F            100         100             1            210±10μs        190±10μs          196±10μs
                     F            100         100             2            284±20μs        318±20μs          262±10μs
                     F            100         1000           0.1         1.50±0.07ms     1.43±0.05ms        12.3±0.5ms
                     F            100         1000           0.5          5.91±0.2ms      5.81±0.2ms         29.3±1ms
                     F            100         1000            1           11.1±0.6ms      11.2±0.6ms         53.6±3ms
                     F            100         1000            2            24.2±1ms        23.9±1ms          111±3ms
                     F            1000        100            0.1           555±20μs        533±20μs          802±40μs
                     F            1000        100            0.5           942±50μs        909±40μs          814±40μs
                     F            1000        100             1            870±50μs      1.44±0.07ms         842±50μs
                     F            1000        100             2            933±40μs       2.58±0.2ms         899±40μs
                     F            1000        1000           0.1          11.1±0.2ms      10.9±0.3ms         54.7±4ms
                     F            1000        1000           0.5           48.1±2ms        49.4±3ms          75.4±3ms
                     F            1000        1000            1            99.4±3ms        98.6±3ms          101±2ms
                     F            1000        1000            2            158±4ms         212±4ms           160±4ms
                     F           10000        100            0.1          5.97±0.1ms      5.98±0.1ms        6.02±0.2ms
                     F           10000        100            0.5          9.23±0.2ms      9.04±0.2ms        5.94±0.3ms
                     F           10000        100             1           6.21±0.3ms      13.5±0.4ms        5.88±0.2ms
                     F           10000        100             2           6.08±0.2ms      23.1±0.9ms        5.99±0.2ms
                     F           10000        1000           0.1           134±1ms         136±2ms           508±6ms
                     F           10000        1000           0.5           519±2ms         515±4ms           531±6ms
                     F           10000        1000            1            542±4ms         987±4ms           542±3ms
                     F           10000        1000            2            599±4ms        2.08±0.01s         609±7ms
                     F           100000       100            0.1          57.6±0.8ms      57.3±0.6ms         63.6±2ms
                     F           100000       100            0.5           95.3±1ms       96.6±0.7ms         63.6±2ms
                     F           100000       100             1            63.4±1ms        156±2ms           68.8±2ms
                     F           100000       100             2            69.7±2ms        287±3ms           70.0±2ms
                     F           100000       1000           0.1          1.50±0.02s      1.44±0.03s        5.13±0.03s
                     F           100000       1000           0.5          5.23±0.01s      5.28±0.01s        5.24±0.01s
                     F           100000       1000            1           5.00±0.02s      10.1±0.02s        5.18±0.01s
                     F           100000       1000            2           5.21±0.01s      22.7±0.3s         5.37±0.05s
              =============== =========== ============ =============== =============== =============== ===================

Copy link
Member
@lorentzenchr lorentzenchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one nitpick.
@jjerphan Thanks you very much.

Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
@lorentzenchr lorentzenchr changed the title ENH Optimize dot product order for LogisticRegression for dense matrices ENH Optimize dot product order for LogisticRegression for dense matrices Mar 14, 2021
@lorentzenchr lorentzenchr merged commit 0c74b8b into scikit-learn:main Mar 14, 2021
@jjerphan jjerphan deleted the logreg_hessian_grad_multi_dot branch March 14, 2021 15:42
marrodion pushed a commit to marrodion/scikit-learn that referenced this pull request Mar 17, 2021
…ces (scikit-learn#19571)

* Use multi_dot for Hessian and gradient product. 
  np.linalg.multi_dot quickly chooses the best order for the multiplication of three matrices.
@glemaitre glemaitre mentioned this pull request Apr 22, 2021
12 tasks
lorentzenchr added a commit to lorentzenchr/scikit-learn that referenced this pull request Nov 28, 2021
agramfort added a commit that referenced this pull request Feb 14, 2022
* ENH replace loss in linear logistic regression

* MNT remove logistic regression's own loss functions

* CLN remove comment

* DOC add whatsnew

* DOC more precise whatsnew

* CLN restore improvements of #19571

* ENH improve fit time by separating mat-vec in multiclass

* DOC update whatsnew

* not only a bit ;-)

* DOC note memory benefit for multiclass case

* trigger CI

* trigger CI

* CLN rename variable to hess_prod

* DOC address reviewer comments

* CLN remove C/F for 1d arrays

* CLN rename to gradient_per_sample

* CLN rename alpha to l2_reg_strength

* ENH respect F-contiguity

* TST fix sag tests

* CLN rename to LinearModelLoss

* CLN improve comments according to review

* CLN liblinear comment

* TST add / move test to test_linear_loss.py

* CLN comment placement

* trigger CI

* CLN add comment about contiguity of raw_prediction

* DEBUG debian-32

* DEBUG test only linear_model module

* Revert "DEBUG test only linear_model module"

This reverts commit 9d6e698.

* DEBUG test -k LogisticRegression

* Revert "DEBUG test -k LogisticRegression"

This reverts commit c203167.

* Revert "DEBUG debian-32"

This reverts commit ef0b98f.

* DEBUG set n_jobs=1

* Revert "DEBUG set n_jobs=1"

This reverts commit c7f6f72.

* CLN always use n_threads=1

* CLN address review

* ENH avoid array copy

* CLN simplify L2 norm

* CLN rename w to weights

* CLN rename to hessian_sum and hx_sum

* CLN address review

* CLN rename to init arg and attribute to base_loss

* CLN apply review suggestion

Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>

* CLN base_loss instead of _loss attribute

Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
thomasjpfan pushed a commit to thomasjpfan/scikit-learn that referenced this pull request Mar 1, 2022
* ENH replace loss in linear logistic regression

* MNT remove logistic regression's own loss functions

* CLN remove comment

* DOC add whatsnew

* DOC more precise whatsnew

* CLN restore improvements of scikit-learn#19571

* ENH improve fit time by separating mat-vec in multiclass

* DOC update whatsnew

* not only a bit ;-)

* DOC note memory benefit for multiclass case

* trigger CI

* trigger CI

* CLN rename variable to hess_prod

* DOC address reviewer comments

* CLN remove C/F for 1d arrays

* CLN rename to gradient_per_sample

* CLN rename alpha to l2_reg_strength

* ENH respect F-contiguity

* TST fix sag tests

* CLN rename to LinearModelLoss

* CLN improve comments according to review

* CLN liblinear comment

* TST add / move test to test_linear_loss.py

* CLN comment placement

* trigger CI

* CLN add comment about contiguity of raw_prediction

* DEBUG debian-32

* DEBUG test only linear_model module

* Revert "DEBUG test only linear_model module"

This reverts commit 9d6e698.

* DEBUG test -k LogisticRegression

* Revert "DEBUG test -k LogisticRegression"

This reverts commit c203167.

* Revert "DEBUG debian-32"

This reverts commit ef0b98f.

* DEBUG set n_jobs=1

* Revert "DEBUG set n_jobs=1"

This reverts commit c7f6f72.

* CLN always use n_threads=1

* CLN address review

* ENH avoid array copy

* CLN simplify L2 norm

* CLN rename w to weights

* CLN rename to hessian_sum and hx_sum

* CLN address review

* CLN rename to init arg and attribute to base_loss

* CLN apply review suggestion

Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>

* CLN base_loss instead of _loss attribute

Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0