Skip to content

Commit 0b740d5

Browse files
committed
Fix dimension calculation in _base.py and add docstring params in _loss.py
1 parent 78af226 commit 0b740d5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

rehline/_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ def _make_loss_rehline_param(loss, X, y):
278278
The +/- labels for class membership of each sample.
279279
"""
280280

281-
n, d = X.shape
281+
# n, d = X.shape
282+
n = len(y)
282283

283284
## initialization of ReHLine params
284285
U=np.empty(shape=(0,0))

rehline/_loss.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def __init__(self, relu_coef, relu_intercept,
6464
def __call__(self, x):
6565
"""Evaluate ReHLoss given a data matrix
6666
67+
Parameters
68+
----------
6769
x: {array-like} of shape (n_samples, )
6870
Training vector, where `n_samples` is the number of samples
6971
"""

0 commit comments

Comments
 (0)