@@ -337,23 +337,24 @@ class CUR(_CUR):
337
337
>>> selector = CUR(n_to_select=2, random_state=0)
338
338
>>> X = np.array(
339
339
... [
340
- ... [0.12, 0.21, 0.02], # 3 samples, 3 features
341
- ... [-0.09, 0.32, -0.10],
342
- ... [-0.03, -0.53, 0.08],
340
+ ... [0.12, 0.21, -0.11], # 4 samples, 3 features
341
+ ... [-0.09, 0.32, 0.51],
342
+ ... [-0.03, 0.53, 0.14],
343
+ ... [-0.83, -0.13, 0.82],
343
344
... ]
344
345
... )
345
346
>>> selector.fit(X)
346
347
CUR(n_to_select=2)
347
- >>> np.round(selector.pi_, 2) # importance scole
348
- array([0., 1. , 0.])
349
- >>> selector.selected_idx_ # importance scole
350
- array([2, 0 ])
348
+ >>> np.round(selector.pi_, 2) # importance score
349
+ array([0.01, 0.99 , 0. , 0. ])
350
+ >>> selector.selected_idx_ # selected idx
351
+ array([3, 2 ])
351
352
>>> # selector.transform(X) cannot be used as sklearn API
352
353
>>> # restricts the change of sample size using transformers
353
354
>>> # So one has to do
354
355
>>> X[selector.selected_idx_]
355
- array([[-0.03 , -0.53 , 0.08 ],
356
- [ 0.12 , 0.21 , 0.02 ]])
356
+ array([[-0.83 , -0.13 , 0.82 ],
357
+ [-0.03 , 0.53 , 0.14 ]])
357
358
"""
358
359
359
360
def __init__ (
0 commit comments