INNER CODE UNIT · Python

p_i

Tisha-runwal/Personalized-Federated-Learning-for-Privacy--Preserving-and-Scalable-IoT-Driven-Smart-Healthcare · pfl_hcare/fl/server.py:362

    p_i = ||grad_i|| / sum(||grad_j||)
    Clients with larger gradient change participate more often.
    Clients that haven't participated recently are force-included.
    """
    rng = np.random.RandomState(seed)

    # Force-include clients that haven't participated recently
    forced = []
    candidates = []
    for cid in range(num_clients):
        rounds_since = current_round - last_participation.get(cid, 0)
        if rounds_since >= min_interval:
            forced.append(cid)
        else:
            candidates.append(cid)

    n_to_sample = max(0, n_select - len(forced))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…