perpetual 0.9.1__cp313-cp313-win_amd64.whl → 0.9.2__cp313-cp313-win_amd64.whl

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.
perpetual/booster.py CHANGED
@@ -227,7 +227,7 @@ class PerpetualBooster:
227
227
  self.cat_mapping = cat_mapping
228
228
  self.feature_names_in_ = features_
229
229
 
230
- y_, classes_ = convert_input_array(y, self.objective)
230
+ y_, classes_ = convert_input_array(y, self.objective, is_target=True)
231
231
  self.classes_ = np.array(classes_).tolist()
232
232
 
233
233
  if sample_weight is None:
Binary file
perpetual/utils.py CHANGED
@@ -32,7 +32,7 @@ def type_series(y):
32
32
  return ""
33
33
 
34
34
 
35
- def convert_input_array(x, objective) -> np.ndarray:
35
+ def convert_input_array(x, objective, is_target=False) -> np.ndarray:
36
36
  classes_ = []
37
37
 
38
38
  if type(x).__module__.split(".")[0] == "numpy":
@@ -49,7 +49,7 @@ def convert_input_array(x, objective) -> np.ndarray:
49
49
  else:
50
50
  x_ = x.to_numpy()
51
51
 
52
- if objective == "LogLoss" and len(x_.shape) == 1:
52
+ if is_target and objective == "LogLoss" and len(x_.shape) == 1:
53
53
  classes_ = np.unique(x_)
54
54
  x_index = np.array([np.where(classes_ == i) for i in x_])
55
55
  if len(classes_) > 2:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: perpetual
3
- Version: 0.9.1
3
+ Version: 0.9.2
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: Programming Language :: Python :: 3.9
@@ -45,6 +45,7 @@ Project-URL: Source Code, https://github.com/perpetual-ml/perpetual
45
45
  [![Static Badge](https://img.shields.io/badge/join-discord-blue?logo=discord)](https://discord.gg/AyUK7rr6wy)
46
46
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/perpetual)
47
47
 
48
+
48
49
  </div>
49
50
 
50
51
  # Perpetual
@@ -0,0 +1,11 @@
1
+ perpetual-0.9.2.dist-info/METADATA,sha256=wD6r7qZkSXxugwCB3m_HqGb4bwEhSOunKLDkRj2TDFo,10724
2
+ perpetual-0.9.2.dist-info/WHEEL,sha256=6gg8M7kMeWmDzkhJuJzWLhBYdt7OGDF81wlSJjN85_E,96
3
+ perpetual-0.9.2.dist-info/licenses/LICENSE,sha256=gcuuhKKc5-dwvyvHsXjlC9oM6N5gZ6umYbC8ewW1Yvg,35821
4
+ perpetual/booster.py,sha256=Osg6TrJPYJyZzez3y91BZJx73a1RpFIh9CxTjAJVwPo,50766
5
+ perpetual/data.py,sha256=vhjWEc_ESYWoaczz0GkUPtfS0iRSKdVZSrCkQn8yLPw,630
6
+ perpetual/serialize.py,sha256=FeW4JsUFVsrft9N7gz-ebn5mXvDv4LiJC2sgBEeGxYo,1957
7
+ perpetual/types.py,sha256=idZNsDErNTur_rJ_5Co8Pb6fik-AUn9lkrXmjbQJVX0,3381
8
+ perpetual/utils.py,sha256=2ifo-9OXaeZBevSo0HKN4uKVy5qT4LqRAchrtZa9yMM,7486
9
+ perpetual/__init__.py,sha256=V0RhghaG0CuKxKrzYUBYqrf7Drb-gjmznsbz9KT12lk,122
10
+ perpetual/perpetual.cp313-win_amd64.pyd,sha256=5rzA0ETvDbV23ZYhZLi5RxPDK0IUBsWe7gOr-KigWZc,1700864
11
+ perpetual-0.9.2.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- perpetual-0.9.1.dist-info/METADATA,sha256=CVBQY3JrR_yM4_gNV4rmUmwlC2TLdZRUZZ5DR0uQV3g,10722
2
- perpetual-0.9.1.dist-info/WHEEL,sha256=6gg8M7kMeWmDzkhJuJzWLhBYdt7OGDF81wlSJjN85_E,96
3
- perpetual-0.9.1.dist-info/licenses/LICENSE,sha256=gcuuhKKc5-dwvyvHsXjlC9oM6N5gZ6umYbC8ewW1Yvg,35821
4
- perpetual/booster.py,sha256=QvKEz-tZmhrRwh39quy1WNbeBF7IWtitquW_8Q8LkII,50750
5
- perpetual/data.py,sha256=vhjWEc_ESYWoaczz0GkUPtfS0iRSKdVZSrCkQn8yLPw,630
6
- perpetual/serialize.py,sha256=FeW4JsUFVsrft9N7gz-ebn5mXvDv4LiJC2sgBEeGxYo,1957
7
- perpetual/types.py,sha256=idZNsDErNTur_rJ_5Co8Pb6fik-AUn9lkrXmjbQJVX0,3381
8
- perpetual/utils.py,sha256=nqwO6GFHi7I5iltuvgLT3NFaPm1h9cHlnomjFcdSfHY,7455
9
- perpetual/__init__.py,sha256=V0RhghaG0CuKxKrzYUBYqrf7Drb-gjmznsbz9KT12lk,122
10
- perpetual/perpetual.cp313-win_amd64.pyd,sha256=XoegFN8wzNBzTc-lfFhPZ79OzbNNb2iVEEUc69irF0A,1694208
11
- perpetual-0.9.1.dist-info/RECORD,,