GithubHelp home page GithubHelp logo

Comments (4)

LyaCJ avatar LyaCJ commented on September 18, 2024 1

thank you very much!!! i will check the code and try to improve the acc.

from fl-bench.

LyaCJ avatar LyaCJ commented on September 18, 2024

fedavg model, by the way. and i think acc is 50% is lower than i thought it would be. does that the alpha impact two much?

from fl-bench.

KarhouTam avatar KarhouTam commented on September 18, 2024

Hi, LyaCJ. Thanks for your attention to this benchmark first.
For your 1-st question, here's the code for splitting the trainset and testset (in data/utils/run.py):

        for client_id, idx in enumerate(partition["data_indices"]):
            if args.split == "sample":
                num_train_samples = int(len(idx) * args.fraction)
                np.random.shuffle(idx)
                idx_train, idx_test = idx[:num_train_samples], idx[num_train_samples:]
                partition["data_indices"][client_id] = {
                    "train": idx_train,
                    "test": idx_test,
                }
            else:
                if client_id in clients_4_train:
                    partition["data_indices"][client_id] = {"train": idx, "test": []}
                else:
                    partition["data_indices"][client_id] = {"train": [], "test": idx}

It can be seen that the trainset and testset are split according to args.fraction and with no intersection.

For your 2-nd question, have you checked the all_stats.json in data/${dataset_you_used} with the target client ID (through debugging to get)? all_stats.json lists all label distributions around clients.

from fl-bench.

KarhouTam avatar KarhouTam commented on September 18, 2024

fedavg model, by the way. and i think acc is 50% is lower than i thought it would be. does that the alpha impact two much?

Of course the $\alpha$ in dirichlet affects a lot. My dirichlet partition code should have no problem. About your 50% acc confusion, cuz' there are so many variables that can affect the final result. For your current information, I can't give you a clear explanation.

from fl-bench.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.