lightgbm 0.4.4 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c960e555e0f94299dab5152fec56a02d9e150c51dc39fbebb72d717edfb3608
4
- data.tar.gz: dc1a7552b171ba46202c2d64c0d97301cb7d5f761804269314e0db531c70ae2a
3
+ metadata.gz: e22922b9e4b392378396a7f9dcd91ca1612496aac63358b140fe2bfe4586b640
4
+ data.tar.gz: bffd7bef652e5f41ed3f5a55c0598af572145943a760662e4d5a4991230a47ee
5
5
  SHA512:
6
- metadata.gz: d802c67cf77bc1cfce27f6555dbd1b8618d795af7c391671ba19e9185e26a88847fb08080419d4b0446054d34cf8dd0d51dcb45ca22232103e9573633bd6cbe2
7
- data.tar.gz: 95b30329226473297c9f01b81d35ec72aa00c416ddde447cae447d3e86d22ef5020167915b429bee7cb02ffa24b1495c95a28279b6469eaffb5f76df7d34196c
6
+ metadata.gz: db6993e46627f645a6e759de81fceb9611cdf66ddae4bdde80f308ccdda5d3fd96c53744bec209eaef8030912e0c17b12edffa093ab8546150b9c220df6148a9
7
+ data.tar.gz: 950d5b137ce99d992a2f620199ecb723c6e845e01c9394519cff0276e43159514b8ffe357acd4fc3f69e249f6978bf6f1d2e70dfebc866b6945e950ffa0f2dc6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.5.0 (2026-07-18)
2
+
3
+ - Updated LightGBM to 4.7.0
4
+ - Dropped support for Daru
5
+ - Dropped support for Ruby < 3.3
6
+
1
7
  ## 0.4.4 (2026-02-27)
2
8
 
3
9
  - Fixed memory leak with `cv` method
data/LICENSE.txt CHANGED
@@ -1,7 +1,8 @@
1
1
  The MIT License (MIT)
2
2
 
3
3
  Copyright (c) Microsoft Corporation
4
- Copyright (c) 2019-2025 Andrew Kane
4
+ Copyright (c) The LightGBM developers
5
+ Copyright (c) 2019-2026 Andrew Kane
5
6
 
6
7
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
8
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # LightGBM Ruby
2
2
 
3
- [LightGBM](https://github.com/microsoft/LightGBM) - high performance gradient boosting - for Ruby
3
+ [LightGBM](https://github.com/lightgbm-org/LightGBM) - high performance gradient boosting - for Ruby
4
4
 
5
5
  [![Build Status](https://github.com/ankane/lightgbm-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/lightgbm-ruby/actions)
6
6
 
@@ -141,12 +141,6 @@ Or a Rover data frame
141
141
  Rover.read_csv("houses.csv")
142
142
  ```
143
143
 
144
- Or a Daru data frame
145
-
146
- ```ruby
147
- Daru::DataFrame.from_csv("houses.csv")
148
- ```
149
-
150
144
  ## Helpful Resources
151
145
 
152
146
  - [Parameters](https://lightgbm.readthedocs.io/en/latest/Parameters.html)
@@ -143,12 +143,6 @@ module LightGBM
143
143
  nrow = data.row_count
144
144
  ncol = data.column_count
145
145
  flat_data = data.to_a.flatten
146
- elsif daru?(data)
147
- if @feature_name == "auto"
148
- @feature_name = data.vectors.to_a
149
- end
150
- nrow, ncol = data.shape
151
- flat_data = data.map_rows(&:to_a).flatten
152
146
  elsif numo?(data)
153
147
  nrow, ncol = data.shape
154
148
  elsif rover?(data)
data/lib/lightgbm/ffi.rb CHANGED
@@ -12,7 +12,7 @@ module LightGBM
12
12
  end
13
13
  end
14
14
 
15
- # https://github.com/microsoft/LightGBM/blob/master/include/LightGBM/c_api.h
15
+ # https://github.com/lightgbm-org/LightGBM/blob/master/include/LightGBM/c_api.h
16
16
  # keep same order
17
17
 
18
18
  C_API_DTYPE_FLOAT32 = 0
@@ -33,14 +33,11 @@ module LightGBM
33
33
  predict_type = FFI::C_API_PREDICT_CONTRIB
34
34
  end
35
35
 
36
- if daru?(data)
37
- data = data[*cached_feature_name].map_rows(&:to_a)
38
- singular = false
39
- elsif data.is_a?(Hash) # sort feature.values to match the order of model.feature_name
36
+ if data.is_a?(Hash) # sort feature.values to match the order of model.feature_name
40
37
  data = [sorted_feature_values(data)]
41
38
  singular = true
42
39
  elsif data.is_a?(Array) && data.first.is_a?(Hash) # on multiple elems, if 1st is hash, assume they all are
43
- data = data.map(&method(:sorted_feature_values))
40
+ data = data.map { |v| sorted_feature_values(v) }
44
41
  singular = false
45
42
  elsif rover?(data)
46
43
  # TODO improve performance
@@ -40,10 +40,6 @@ module LightGBM
40
40
  defined?(Matrix) && data.is_a?(Matrix)
41
41
  end
42
42
 
43
- def daru?(data)
44
- defined?(Daru::DataFrame) && data.is_a?(Daru::DataFrame)
45
- end
46
-
47
43
  def numo?(data)
48
44
  defined?(Numo::NArray) && data.is_a?(Numo::NArray)
49
45
  end
@@ -1,3 +1,3 @@
1
1
  module LightGBM
2
- VERSION = "0.4.4"
2
+ VERSION = "0.5.0"
3
3
  end
data/vendor/LICENSE CHANGED
@@ -1,6 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
3
  Copyright (c) Microsoft Corporation
4
+ Copyright (c) The LightGBM developers
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
7
  of this software and associated documentation files (the "Software"), to deal
@@ -497,6 +497,228 @@ of this Software are embedded into a machine-executable object form of such
497
497
  source code, you may redistribute such embedded portions in such object form
498
498
  without including the above copyright and permission notices.
499
499
 
500
+ ================================================================================
501
+ nanoarrow 0.8.0 LICENSE.txt
502
+ ================================================================================
503
+
504
+ Apache License
505
+ Version 2.0, January 2004
506
+ http://www.apache.org/licenses/
507
+
508
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
509
+
510
+ 1. Definitions.
511
+
512
+ "License" shall mean the terms and conditions for use, reproduction,
513
+ and distribution as defined by Sections 1 through 9 of this document.
514
+
515
+ "Licensor" shall mean the copyright owner or entity authorized by
516
+ the copyright owner that is granting the License.
517
+
518
+ "Legal Entity" shall mean the union of the acting entity and all
519
+ other entities that control, are controlled by, or are under common
520
+ control with that entity. For the purposes of this definition,
521
+ "control" means (i) the power, direct or indirect, to cause the
522
+ direction or management of such entity, whether by contract or
523
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
524
+ outstanding shares, or (iii) beneficial ownership of such entity.
525
+
526
+ "You" (or "Your") shall mean an individual or Legal Entity
527
+ exercising permissions granted by this License.
528
+
529
+ "Source" form shall mean the preferred form for making modifications,
530
+ including but not limited to software source code, documentation
531
+ source, and configuration files.
532
+
533
+ "Object" form shall mean any form resulting from mechanical
534
+ transformation or translation of a Source form, including but
535
+ not limited to compiled object code, generated documentation,
536
+ and conversions to other media types.
537
+
538
+ "Work" shall mean the work of authorship, whether in Source or
539
+ Object form, made available under the License, as indicated by a
540
+ copyright notice that is included in or attached to the work
541
+ (an example is provided in the Appendix below).
542
+
543
+ "Derivative Works" shall mean any work, whether in Source or Object
544
+ form, that is based on (or derived from) the Work and for which the
545
+ editorial revisions, annotations, elaborations, or other modifications
546
+ represent, as a whole, an original work of authorship. For the purposes
547
+ of this License, Derivative Works shall not include works that remain
548
+ separable from, or merely link (or bind by name) to the interfaces of,
549
+ the Work and Derivative Works thereof.
550
+
551
+ "Contribution" shall mean any work of authorship, including
552
+ the original version of the Work and any modifications or additions
553
+ to that Work or Derivative Works thereof, that is intentionally
554
+ submitted to Licensor for inclusion in the Work by the copyright owner
555
+ or by an individual or Legal Entity authorized to submit on behalf of
556
+ the copyright owner. For the purposes of this definition, "submitted"
557
+ means any form of electronic, verbal, or written communication sent
558
+ to the Licensor or its representatives, including but not limited to
559
+ communication on electronic mailing lists, source code control systems,
560
+ and issue tracking systems that are managed by, or on behalf of, the
561
+ Licensor for the purpose of discussing and improving the Work, but
562
+ excluding communication that is conspicuously marked or otherwise
563
+ designated in writing by the copyright owner as "Not a Contribution."
564
+
565
+ "Contributor" shall mean Licensor and any individual or Legal Entity
566
+ on behalf of whom a Contribution has been received by Licensor and
567
+ subsequently incorporated within the Work.
568
+
569
+ 2. Grant of Copyright License. Subject to the terms and conditions of
570
+ this License, each Contributor hereby grants to You a perpetual,
571
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
572
+ copyright license to reproduce, prepare Derivative Works of,
573
+ publicly display, publicly perform, sublicense, and distribute the
574
+ Work and such Derivative Works in Source or Object form.
575
+
576
+ 3. Grant of Patent License. Subject to the terms and conditions of
577
+ this License, each Contributor hereby grants to You a perpetual,
578
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
579
+ (except as stated in this section) patent license to make, have made,
580
+ use, offer to sell, sell, import, and otherwise transfer the Work,
581
+ where such license applies only to those patent claims licensable
582
+ by such Contributor that are necessarily infringed by their
583
+ Contribution(s) alone or by combination of their Contribution(s)
584
+ with the Work to which such Contribution(s) was submitted. If You
585
+ institute patent litigation against any entity (including a
586
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
587
+ or a Contribution incorporated within the Work constitutes direct
588
+ or contributory patent infringement, then any patent licenses
589
+ granted to You under this License for that Work shall terminate
590
+ as of the date such litigation is filed.
591
+
592
+ 4. Redistribution. You may reproduce and distribute copies of the
593
+ Work or Derivative Works thereof in any medium, with or without
594
+ modifications, and in Source or Object form, provided that You
595
+ meet the following conditions:
596
+
597
+ (a) You must give any other recipients of the Work or
598
+ Derivative Works a copy of this License; and
599
+
600
+ (b) You must cause any modified files to carry prominent notices
601
+ stating that You changed the files; and
602
+
603
+ (c) You must retain, in the Source form of any Derivative Works
604
+ that You distribute, all copyright, patent, trademark, and
605
+ attribution notices from the Source form of the Work,
606
+ excluding those notices that do not pertain to any part of
607
+ the Derivative Works; and
608
+
609
+ (d) If the Work includes a "NOTICE" text file as part of its
610
+ distribution, then any Derivative Works that You distribute must
611
+ include a readable copy of the attribution notices contained
612
+ within such NOTICE file, excluding those notices that do not
613
+ pertain to any part of the Derivative Works, in at least one
614
+ of the following places: within a NOTICE text file distributed
615
+ as part of the Derivative Works; within the Source form or
616
+ documentation, if provided along with the Derivative Works; or,
617
+ within a display generated by the Derivative Works, if and
618
+ wherever such third-party notices normally appear. The contents
619
+ of the NOTICE file are for informational purposes only and
620
+ do not modify the License. You may add Your own attribution
621
+ notices within Derivative Works that You distribute, alongside
622
+ or as an addendum to the NOTICE text from the Work, provided
623
+ that such additional attribution notices cannot be construed
624
+ as modifying the License.
625
+
626
+ You may add Your own copyright statement to Your modifications and
627
+ may provide additional or different license terms and conditions
628
+ for use, reproduction, or distribution of Your modifications, or
629
+ for any such Derivative Works as a whole, provided Your use,
630
+ reproduction, and distribution of the Work otherwise complies with
631
+ the conditions stated in this License.
632
+
633
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
634
+ any Contribution intentionally submitted for inclusion in the Work
635
+ by You to the Licensor shall be under the terms and conditions of
636
+ this License, without any additional terms or conditions.
637
+ Notwithstanding the above, nothing herein shall supersede or modify
638
+ the terms of any separate license agreement you may have executed
639
+ with Licensor regarding such Contributions.
640
+
641
+ 6. Trademarks. This License does not grant permission to use the trade
642
+ names, trademarks, service marks, or product names of the Licensor,
643
+ except as required for reasonable and customary use in describing the
644
+ origin of the Work and reproducing the content of the NOTICE file.
645
+
646
+ 7. Disclaimer of Warranty. Unless required by applicable law or
647
+ agreed to in writing, Licensor provides the Work (and each
648
+ Contributor provides its Contributions) on an "AS IS" BASIS,
649
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
650
+ implied, including, without limitation, any warranties or conditions
651
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
652
+ PARTICULAR PURPOSE. You are solely responsible for determining the
653
+ appropriateness of using or redistributing the Work and assume any
654
+ risks associated with Your exercise of permissions under this License.
655
+
656
+ 8. Limitation of Liability. In no event and under no legal theory,
657
+ whether in tort (including negligence), contract, or otherwise,
658
+ unless required by applicable law (such as deliberate and grossly
659
+ negligent acts) or agreed to in writing, shall any Contributor be
660
+ liable to You for damages, including any direct, indirect, special,
661
+ incidental, or consequential damages of any character arising as a
662
+ result of this License or out of the use or inability to use the
663
+ Work (including but not limited to damages for loss of goodwill,
664
+ work stoppage, computer failure or malfunction, or any and all
665
+ other commercial damages or losses), even if such Contributor
666
+ has been advised of the possibility of such damages.
667
+
668
+ 9. Accepting Warranty or Additional Liability. While redistributing
669
+ the Work or Derivative Works thereof, You may choose to offer,
670
+ and charge a fee for, acceptance of support, warranty, indemnity,
671
+ or other liability obligations and/or rights consistent with this
672
+ License. However, in accepting such obligations, You may act only
673
+ on Your own behalf and on Your sole responsibility, not on behalf
674
+ of any other Contributor, and only if You agree to indemnify,
675
+ defend, and hold each Contributor harmless for any liability
676
+ incurred by, or claims asserted against, such Contributor by reason
677
+ of your accepting any such warranty or additional liability.
678
+
679
+ END OF TERMS AND CONDITIONS
680
+
681
+ APPENDIX: How to apply the Apache License to your work.
682
+
683
+ To apply the Apache License to your work, attach the following
684
+ boilerplate notice, with the fields enclosed by brackets "[]"
685
+ replaced with your own identifying information. (Don't include
686
+ the brackets!) The text should be enclosed in the appropriate
687
+ comment syntax for the file format. We also recommend that a
688
+ file or class name and description of purpose be included on the
689
+ same "printed page" as the copyright notice for easier
690
+ identification within third-party archives.
691
+
692
+ Copyright [yyyy] [name of copyright owner]
693
+
694
+ Licensed under the Apache License, Version 2.0 (the "License");
695
+ you may not use this file except in compliance with the License.
696
+ You may obtain a copy of the License at
697
+
698
+ http://www.apache.org/licenses/LICENSE-2.0
699
+
700
+ Unless required by applicable law or agreed to in writing, software
701
+ distributed under the License is distributed on an "AS IS" BASIS,
702
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
703
+ See the License for the specific language governing permissions and
704
+ limitations under the License.
705
+
706
+ --------------------------------------------------------------------------------
707
+
708
+ thirdparty/flatcc, dist/flatcc.c, and dist/flatcc: Apache 2.0
709
+
710
+ Copyright 2015-2023 Mikkel F. Jørgensen, dvide.com
711
+
712
+ ================================================================================
713
+ nanoarrow 0.8.0 NOTICE.txt
714
+ ================================================================================
715
+
716
+ Apache Arrow nanoarrow
717
+ Copyright 2023 The Apache Software Foundation
718
+
719
+ This product includes software developed at
720
+ The Apache Software Foundation (http://www.apache.org/).
721
+
500
722
  ================================================================================
501
723
  json11
502
724
  ================================================================================
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lightgbm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
@@ -60,14 +60,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: '3.1'
63
+ version: '3.3'
64
64
  required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  requirements: []
70
- rubygems_version: 4.0.3
70
+ rubygems_version: 4.0.14
71
71
  specification_version: 4
72
72
  summary: High performance gradient boosting for Ruby
73
73
  test_files: []