@@ -52,7 +52,7 @@ def with_check(*args, **kwargs):
52
52
feature_selector : type [FeatureWeighting ] = args [0 ]
53
53
if feature_selector .maxk != feature_selector .N - 1 :
54
54
warnings .warn (
55
- f"""maxk neighbors is not available for this functionality.\
55
+ f"""maxk neighbors is not available for this functionality.\n
56
56
It will be ignored and treated as the number of data-1, { feature_selector .N } """ ,
57
57
stacklevel = 2 ,
58
58
)
@@ -447,18 +447,18 @@ def return_backward_greedy_dii_elimination(
447
447
initial_gammas : Union [np .ndarray , int , float ] = None ,
448
448
lambd : float = None ,
449
449
n_epochs : int = 100 ,
450
- learning_rate : float = 0.1 ,
450
+ learning_rate : float = None ,
451
451
constrain : bool = False ,
452
452
decaying_lr : bool = True ,
453
453
):
454
- """Do a stepwise backward eliminitaion of feature weights, always eleminiating the lowest weight,
455
- and after each elimination GD otpmize the DII
454
+ """Do a stepwise backward elimination of feature weights, always eliminating the lowest weight;
455
+ after each elimination the DII is optimized by gradient descent using the remaining features
456
456
457
457
Args:
458
458
target_data: FeatureWeighting object, containing the groundtruth data
459
459
(D_groundtruth x N array, period (optional)) to be compared to.
460
460
initial_gammas (np.ndarray or list): D(input) initial weights for the input features. No zeros allowed here
461
- lambd (float): softmax scaling. If None (preferred) this chosen automatically with compute_optimial_lambda
461
+ lambd (float): softmax scaling. If None (preferred) this chosen automatically with compute_optimal_lambda
462
462
n_epochs (int): number of epochs in each optimization cycle
463
463
learning_rate (float): learning rate.
464
464
Has to be tuned, especially if constrain=True (otherwise optmization could fail)
@@ -468,8 +468,8 @@ def return_backward_greedy_dii_elimination(
468
468
- every 10 epochs the learning rate will be halfed
469
469
470
470
Returns:
471
- final_weights: np.ndarray, shape (D x D). Array of the optmized weights for each number of non-zero weights.
472
471
final_diis: np.ndarray, shape (D). Array of the optmized DII for each of the according weights.
472
+ final_weights: np.ndarray, shape (D x D). Array of the optmized weights for each number of non-zero weights.
473
473
474
474
History entries added to FeatureWeighting object:
475
475
dii_per_epoch: np.ndarray, shape (D, n_epochs+1, D).
0 commit comments