Saravanan666/pypi-org huggingface dataset:
Package: fairness-cscheid
This repository is meant to facilitate the benchmarking of fairness aware machine learning algorithms.The associated paper is:A comparative study of fairness-enhancing interventions in machine learning by Sorelle A. Friedler, Carlos Scheidegger, Suresh Venkatasubramanian, Sonam Choudhary, Evan P. Hamilton, and Derek Roth.https://arxiv.org/abs/1802.04422To install this software run:$ pip3 install fairnessThe below instructions are still in the process of being updated to work with the new pip install-able version.To run the benchmarks:$ from fairness.benchmark import run
$ run()This will write out metrics for each dataset to the results/ directory.To generate graphs and other analysis run:$ python3 analysis.pyIf you do not yet have all the packages installed, you may need to run:$ pip install -r requirements.txtOptional:  The benchmarks rely on preprocessed versions of the datasets that have been included
in the repository.  If you would like to regenerate this preprocessing, run the below command
before running the benchmark script:$ python3 preprocess.pyTo add new datasets or algorithms, see the instructions in the readme files in those directories.OS-specific thingsOn Ubuntu(We tested on Ubuntu 16.04, your mileage may vary)You'll needpython3-dev:$ sudo apt-get install python3-devAdditional analysis-specific requirementsTo regenerate figures (this is messy right now. we're working on it)Python requirements (use pip):ggplotSystem requirements:pandoc(brew install pandocon a Mac orapt-get install pandocon Linux)R  (Mac download link:https://cran.rstudio.com/bin/macosx/R-3.4.3.pkg)R package requirements (useinstall.packages):rmarkdownstringrggplot2dplyrmagrittrcorrplotrobust
Package: fair-numbers
Библиотека для форматирования чисел до 999 999 999 999 миллиардов в понятный вид с текстовым обозначением разрядов числа или без него.Библиотека состоит из одной функцииnicer(num, description_number=False).num– целое число.description_number– логическое значение, по умолчанию False. Отвечает за вывод текстового описания разрядов числа.Например:print(nicer(125000))
>>> 125 000

print(nicer(125000, description_number=True))
>>> 125 тыс. 000
Package: fairometrics
Fairo MetricsA collection of metrics that are pre-certified and tested for use in the Fairo AI Governance Platform.
This package can be used standalone or with the Fairo platform.
The metrics in this package are designed to test AI for fairness and quality.
They have been curated for use in our system and are regularly updated.Please read ourdocumentationto get started.For more information about Fairo, or to start a free trial, please visit ourwebsite.
Package: fairpredictor
fAIr PredictorRun your fAIr Model Predictions anywhere !PrerequisitesfAIr Predictor has support for GPU , CPU and tflite based devicesInstalltensorflow-cpuortflite-runtimeaccording to your requirementstflite-runtimesupport is for having very light deployment in order to run inference &tensorflow-cpumight require installation ofefficientnetExample on Collab# Install!pipinstallfairpredictor# Importfrompredictorimportpredict# Parameters for your predictionsbbox=[100.56228021333352,13.685230854641182,100.56383321235313,13.685961853747969]model_path='checkpoint.h5'zoom_level=20tms_url='https://tiles.openaerialmap.org/6501a65c0906de000167e64d/0/6501a65c0906de000167e64e/{z}/{x}/{y}'# Run your predictionmy_predictions=predict(bbox,model_path,zoom_level,tms_url)print(my_predictions)## Visualize your predictionsimportgeopandasasgpdimportmatplotlib.pyplotaspltgdf=gpd.GeoDataFrame.from_features(my_predictions)gdf.plot()plt.show()Works on CPU ! Can work on serverless functions, No other dependencies to run predictionsUse raster2polygonThere is another postprocessing option that supports distance threshold between polygon for merging them , If it is useful for you install raster2polygon by :pip install raster2polygon
Package: fairprice
fairpricepython module to balance pricesPython module for balancing product prices. It takes USD price and uses various strategies of your choice to calculate the price in other currencies.InstallationPip is required to install the module. If you don't have pip installed, you can follow the instructionshere.pipinstallfairpriceUsage examplefromfairpriceimportFairPricefromfairprice.strategyimportBigMacfp=FairPrice(strategy=BigMac)fp.calculate(10,"PLN")Development setupClone the repository and install the requirements.gitclonehttps://github.com/Style77/fairprice.gitcdfairprice
pipinstall-rrequirements.txtContributingFork it (https://github.com/Style77/fairprice/fork)Create your feature branch (git checkout -b feature/fooBar)Commit your changes (git commit -am 'Add some fooBar')Push to the branch (git push origin feature/fooBar)Create a new pull request
Package: fairpyx
fairpyxfairpyxis a Python library containing various algorithms for fair allocation, with an emphasis onCourse allocation. It is designed for three target audiences:Laypeople, who want to use existing fair division algorithms for real-life problems.Researchers, who develop new fair division algorithms and want to quickly implement them and compare to existing algorithms.Students, who want to trace the execution of algorithms to understand how they work.InstallationFor the stable version:pip install fairpyxFor the latest version:pip install git+https://github.com/ariel-research/fairpyx.gitTo verify that everything was installed correctly, run one of the example programs, e.g.cd fairpyx
python examples/courses.py
python examples/input_formats.pyor run the tests:pytestUsageTo activate a fair division algorithm, first construct afairpyx.instance:import fairpyx
valuations = {"Alice": {"w":11,"x":22,"y":44,"z":0}, "George": {"w":22,"x":11,"y":66,"z":33}}
instance = fairpyx.Instance(valuations=valuations)An instance can have other fields, such as: agent capacities, item capacities, agent conflicts and item conflicts. These fields are used by some of the algorithms. Seeinstance.pyfor details.Then, use the functionfairpyx.divideto run an algorithm on the instance. For example:allocation = fairpyx.divide(algorithm=fairpyx.algorithms.iterated_maximum_matching, instance=instance)
print(allocation)Features and ExamplesCourse allocation algorithms;Various input formats, to easily use by both researchers and end-users;Contributing new algorithmsForkfairpyxand install your fork locally as follows:clone https://github.com/<your-username>/fairpyx.git
cd fairpyx
pip install -e .Write a function that accepts a parameter of typeAllocationBuilder, as well as any custom parameters your algorithm needs. TheAllocationBuilderargument sent to your function is already initialized with an empty allocation. Your function has to modify this argument using the methodgive, which gives an item to an agent and updates the capacities. Your function need not return any value; the allocation is read from the modified parameter. See:picking_sequence.pyanditerated_maximum_matching.pyfor examples of algorithms;allocations.pyfor more details on theAllocationBuilderobject.See alsofairpyis an older library with the same goals. It contains more algorithms for fair item allocation, as well as algorithms for fair cake-cutting.fairpyxwas created in order to provide a simpler interface, that also allows capacities and conflicts, which are important for fair course allocation.Other open-source projects related to fairness.
Package: fair-random
fair randomfair randomis a random library with hash prove>>>fromfair_randomimportget_client_seed,get_server_seed,get_final_seed>>>client_seed=get_client_seed("123")>>>client_seed.hash'a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3'>>>server_seed=get_server_seed()>>>server_seed.hash'b83268d870a9045241918ee76041046e3ca1cb94230bfe6163401ea0ec8df907'>>>server_seed.server_prove'19d3b12106df35a87cb784986a8382b3f5eaa5da3bd67e38aa8abc07a5e2ae3d'>>>final_seed=get_final_seed(server_seed,[client_seed])>>>final_seed.hash'a8a8a1a4c5dfbc4bf46dfb7469b21d9e7adb5c6c4bdc316c90bb0cdeb7111856'>>>dice=Dice()>>>dice.get_value(final_seed)3You can expose server_seed.server_prove before the game starts, allow clients to provide random input, and then expose server_seed.hash after the game ends to demonstrate the immutability of the game.
Package: fairreckitlib
FairRecKit LibFairRecKitLib is a library that functions as a combinatory interface between a set of existing recommender libraries, such asLenskit,Implicit, andSurprise. It was made to accompany theFairRecKit application.This program has been developed by students from the bachelor Computer Science at
Utrecht University within the Software Project course.© Copyright Utrecht University (Department of Information and Computing Sciences)Installation RequirementsFairRecKitLib utilises the scikit-surprise package, which relies on having a suitable C/C++ compiler present on the system to be able to install itself. For this purpose, make sure you haveCythoninstalled before attempting to install FairRecKitLib. If your system lacks a compiler, install the 'Desktop development with C++' build tools through theVisual Studio installer.Meeting these requirements, you can install FairRecKitLib like any PyPI package, using e.g. pip or conda.pip:pip install fairreckitlibcondaconda install fairreckitlibDocumentationPlease check out theFairRecKitLib WikiandFairRecKitLib APIfor instructions and guides on how to utilise the library or add new functionality.
Package: fair-research-login
Fair Research LoginFair Research Login simplifies the Globus Auth Flow to facilitate application
development by providing automatic token management and streamlining the native
app grant process. This is useful for writing re-usable scripts and can be used
as the foundation for new applications without investing significant resources in
authentication code.For full documentation, see theRead the Docs here.InstallationInstall with pip:pipinstallfair-research-loginGetting StartedYou’ll need a Client ID from Globus. Followthese instructionsfrom the Globus Auth Developer Guide. Be sure to check theNative Appbox in the registration form. Note the Client ID assigned by Globus.
You’ll need it in your code, as shown in the example below.Usage looks like this:fromglobus_sdkimportAuthClientfromfair_research_login.clientimportNativeClient# Logincli=NativeClient(client_id='7414f0b4-7d05-4bb6-bb00-076fa3f17cf5',app_name='My App')cli.login(requested_scopes=['openid','email','profile'],refresh_tokens=True)# Use your tokensauth_client=AuthClient(authorizer=cli.get_authorizers()['auth.globus.org'])print(auth_client.oauth2_userinfo())SupportFor any questions or issues using Fair Research Login, please send an email tosupport@globus.orgwith “Fair Research Login” in the message header.
Package: fairret
fairret - a fairness library in PyTorchThe goal offairretis to serve as an open-source Python library for measuring and mitigating statistical fairness in PyTorch models. The library is designed to beflexiblein how fairness is defined and pursued.easyto integrate into existing PyTorch pipelines.clearin what its tools can and cannot do.The central to the library is the paradigm of thefairness regularization term(fairrets) that quantify unfairness as differentiable PyTorch loss functions.
These can then be optimized together with e.g. the binary cross-entropy error such that the classifier improves both its accuracy and fairness.The library is still in very early development.Documentation, installation instructions, and more examples will be added in the near future.QuickstartIt suffices to simply choose a statistic that should be equalized across groups and a fairret that quantifies the gap. The model can then be trained as follows:importtorch.nn.functionalasFfromfairret.statisticimportPositiveRatefromfairret.lossimportNormLossstatistic=PositiveRate()norm_fairret=NormLoss(statistic)deftrain(model,optimizer,train_loader):forfeat,sens,targetintrain_loader:optimizer.zero_grad()logit=model(feat)bce_loss=F.binary_cross_entropy_with_logits(logit,target)fairret_loss=norm_fairret(logit,feat,sens,target)loss=bce_loss+fairret_lossloss.backward()optimizer.step()No special data structure is required for the sensitive features. If the training batch contains N elements, thensensshould be a tensor of floats with shape (N, d_s), with d_s the number of sensitive features.Like any categorical feature, it is expected that categorical sensitive features are one-hot encoded.A notebook wil a full example pipeline is provided here:simple_pipeline.ipynb.Warning: AI fairness != fairnessThere are many ways in which technical approaches to AI fairness, such as this library, are simplistic and limited in actually achieving fairness in real-world decision processes.More information on these limitations can be foundhereorhere.Future plansThe library maintains a core focus on only fairrets for now, yet we plan to add more fairness tools that align with the design principles in the future. These may involve breaking changes. At the same time, we'll keep reviewing the role of this library within the wider ecosystem of fairness toolkits.Want to help? Please don't hesitate to open an issue, draft a pull request, or shoot an email tomaarten.buyl@ugent.be.CitationThis framework will be presented as a paper at ICLR 2024. If you found this library useful in your work, please consider citing it as follows:@inproceedings{buyl2024fairret,title={fairret: a Framework for Differentiable Fairness Regularization Terms},author={Buyl, Maarten and Defrance, Marybeth and De Bie, Tijl},booktitle={International Conference on Learning Representations},year={2024}}
Package: fairsearchdeltr
Fair search DELTR for PythonThis is the Python library that implements theDELTRmodel for fair ranking.InstallationTo installfairsearchdeltr, simply usepip(orpipenv):pipinstallfairsearchdeltrAnd, that's it!Using it in your codeYou need to import the class from the package first:fromfairsearchdeltrimportDeltrTrain a modelYou need to train the model before it can rank documents.# import other helper librariesimportpandasaspdfromioimportStringIO# load some train data (this is just a sample - more is better)train_data_raw="""q_id,doc_id,gender,score,judgment1,1,1,0.962650646167003,11,2,0,0.940172822166108,0.981,3,0,0.925288002880488,0.961,4,1,0.896143226020877,0.941,5,0,0.89180775633204,0.921,6,0,0.838704766545679,0.9"""train_data=pd.read_csv(StringIO(train_data_raw))# setup the DELTR objectprotected_feature="gender"# column name of the protected attribute (index after query and document id)gamma=1# value of the gamma parameternumber_of_iterations=10000# number of iterations the training should runstandardize=True# let's apply standardization to the features# create the Deltr objectdtr=Deltr(protected_feature,gamma,number_of_iterations,standardize=standardize)# train the modeldtr.train(train_data)>>array([0.02527054,0.07692437])# your run should have approximately same resultsUse the model to rankNow, you can use the obtained model to rank some data.# load some test/prediction dataprediction_data_raw="""q_id,doc_id,gender,score1,7,0,0.96451,8,0,0.95241,9,0,0.92851,10,0,0.89611,11,1,0.89111,12,1,0.8312"""prediction_data=pd.read_csv(StringIO(prediction_data_raw))# use the model to rank the datadtr.rank(prediction_data)>>doc_idgenderjudgement41110.07484951210.0637700700.0634861800.0612482900.05682831000.050836# the result will be a re-ranked dataframeThe library contains sufficient code documentation for each of the functions.Checking the model a bit deeperYou can check how the training of the model progressed using a special property calledlog.dtr.log>>[<TrainStep[1553844278383,[0.019264690.00976336],[[-0.00125304-0.0014605][-0.00125304-0.0014605][-0.00125304-0.0014605][-0.00125304-0.0014605][-0.00125304-0.0014605][-0.00125304-0.0014605]],5.999620187652397,0.0]>,...]Thelogreturns a list of objects from thefairsearchdeltr.models.TrainStepclass. The class is a representation of the parameters in each step of the training.
Contains atimestamp,omega,omega_gradient,loss,loss_standard,loss_exposure.DevelopmentClone this repositorygit clone https://github.com/fair-search/fairsearchdeltr-pythonChange directory to the directory where you cloned the repositorycd WHERE_ITS_DOWNLOADED/fairsearchdeltr-pythonUse any IDE to work with the codeTestingJust run:python setup.py testCreditsThe DELTR algorithm is described in this paper:Meike Zehlike, Gina-Theresa Diehn, Carlos Castillo. "Reducing Disparate Exposure in Ranking:
A Learning to Rank Approach." preprint arXiv:1805.08716 (2018).This library was developed byIvan Kitanovskibased on the paper. See thelicensefile for more information.For any questions contactMieke ZehlikeSee alsoYou can also see theDELTR for ElasticSearchandDELTR Java library.
Package: fairsense
FairSenseThis library allow to compute global sensitivity indices in the context of fairness measurements.
The paperFairness seen as Global Sensitivity Analysisbridges the gap between
global sensitivity analysis (GSA) and fairness. It states that for each sensitivity
analysis, there is a fairness measure, and vice-versa.@misc{https://doi.org/10.48550/arxiv.2103.04613,
  doi = {10.48550/ARXIV.2103.04613},  
  url = {https://arxiv.org/abs/2103.04613},  
  author = {Bénesse, Clément and Gamboa, Fabrice and Loubes, Jean-Michel and Boissin, Thibaut},
  keywords = {Statistics Theory (math.ST), Methodology (stat.ME), FOS: Mathematics, FOS: Mathematics, FOS: Computer and information sciences, FOS: Computer and information sciences},
  title = {Fairness seen as Global Sensitivity Analysis},This library is a toolbox which ease the computation of fairness and GSA indices.The problemEach index has it's characteristics: some can be applied on continuous variables and
some cannot. Some can handle regression problems and some handle classification
problems. Some can handle variable groups and some cannot. Finally some can only be
applied on the predictions of a model while some can be applied on the error made by
the model.The objective is then to provide a tool to investigate the fairness of an ML problem
by computing the GSA indices while avoiding the aforementioned issues.The strategyThe library allows to formulate a fairness problem which is stated as following:a dataset describing the training distributiona model which can be a function or a machine learning modela fairness objective which indicate what should be studied : one can study the
intrinsic bias of a dataset, or the bias of the model or the bias of the model's
errorsThese elements are encapsulated in an object calledIndicesInput.Then it becomes possible to compute GSA indices (in a interchangeable way) using the
functions provided infairsense.indices.These functions outputIndicesOutputobjects that encapsulate the values of the
indices. These results can finally be visualized with the functions available in thefairsense.visualizationmodule.install fairsensefor userspipinstallfairsensefor developpersAfter cloning the repositorypipinstall-e.[dev]to clean code, at the root of the lib:black.for docspipinstall-e.[docs]build rst files, in the docs folder:sphinx-apidoc..\libfairness-osourcethe generate html docs:makehtmlWarning: the library must be installed to generate the doc.
Package: fair-test
☑️ FAIR Testfair-testis a library to build and deployFAIRmetrics tests APIs, supporting the specifications used by theFAIR Metrics Working Group, that can be queried to assess if a resource is complying with theFAIR principles(Findable, Accessible, Interoperable, Reusable).It aims to enable python developers to easily write, and deploy FAIR metric tests functions that can be queried by various FAIR evaluations services, such asFAIR enoughand theFAIRsharing FAIR Evaluator.📖 DocumentationVisit thefair-testdocumentation website for more details on how to use the library to publish new FAIR tests:https://maastrichtu-ids.github.io/fair-test🧑‍💻 ContributeIf you wish to contribute to thefair-testlibrary, checkout theContribute pagein the documentation to get started.
Package: fairules
Welcome to FairCorels, a Python library for learning fair and interpretable models
using the Certifiably Optimal RulE ListS (CORELS) algorithm!FairCORELS uses Python, Numpy, GMP, and a C++ compiler.
GMP (GNU Multiple Precision library) is not required, but it ishighly recommended, as it improves performance.
If it is not installed, CORELS will run slower.
Package: fairways
Installation$ pip install fairwaysDocumentshttps://fairways-py.readthedocs.io/en/latest/WarningSome modules are proof-of-concept. Avoid to use this package in production without comprehensive test suite for your app.LicenseLicensed under either of the following, at your option:Apache License, Version 2.0 (LICENSE-APACHE orhttps://www.apache.org/licenses/LICENSE-2.0)
MIT License (LICENSE-MIT orhttps://opensource.org/licenses/MIT)
Package: fairyfishnet
InstallationRequest your personal fairyfishnet key on pychess Discordhttps://discord.gg/aPs8RKrInstall the fairyfishnet client.Via pipTo install or upgrade to the latest version do:pip3 install --upgrade --user fairyfishnetExample usage:python3 -m fairyfishnet --auto-updateOptional: Generate a systemd service file:python3 -m fairyfishnet systemdVia DockerThere is aDocker containercourtesy of@mklemenz. For example you can
simply do:docker run mklemenz/fishnet --key MY_APIKEY --auto-updatepychess-variants custom Fairy-Stockfishfairyfishnet is usingFairy-Stockfishby@ianfab.You can build Fairy-Stockfish yourself (for example with./build-stockfish.sh)
and provide the path usingpython-mfairyfishnet--stockfish-command. Otherwise
a precompiled binary will be downloaded for you.OverviewSeeprotocol.mdfor details.Licensefairyfishnet is licensed under the GPLv3+ license. See LICENSE.txt for the full
license text.
Package: fairy-slipper
A project to make OpenStack API’s self documententing.Free software: Apache licenseDocumentation: doc/source directorySource:https://git.openstack.org/cgit/openstack/fairy-slipperBugs:https://bugs.launchpad.net/openstack-doc-toolsFeaturesMigrates WADL source to Swagger filesProvides display of RST plus Swagger JSON files in a web browserDevelopmentFirst run the migrate script to initially migrate the content from wadl:./migrate.shThis script will checkout the current version of the documentation.To run the webserver use:./run_server.shA Pecan based webserver will then listen onhttp://127.0.0.1:8080AngularJSTo develop the AngularJS component, it’s easiest if you use the grunt webserver:gruntYou will still need to run the Fairy-Slipper webserver, but this will
enable auto reloading if you visit the porthttp://127.0.0.1:9000Directory Structure (Future)Current documentation output layout:api-doc/ -- the root of the documentation
api-doc/index.json  -- the index file that lists all the files that are included in the API doc.
api-doc/<service>/<version>.rst
api-doc/<service>/<version>/<request_schema>.json
api-doc/<service>/<version>/<response_schema>_<status_code>.json
api-doc/<service>/<version>/examples/<request>_req.json
api-doc/<service>/<version>/examples/<response>_resp_<status_code>.json
conversion_files_valid/<service-version>.json -- valid Swagger filesOther Swagger UIsTaken fromhttps://github.com/swagger-api/swagger-spec/wiki/Sites-and-Serviceshttp://docs.apimatic.apiary.io/http://docs.api2cart.com/post/interactive-docshttp://chat.banckle.com/api/v3.0/http://www.evercam.io/develop/docshttps://api.elastic.io/docs/https://developer.concur.com/https://www.callfire.com/api-documentation/rest/version/1.1https://www.bitmex.com/api/explorer/https://bitdango.com/apihttps://api.groupdocs.com/v2.0/spec/http://developer.wordnik.com/docs.htmlhttps://api.sensr.net/doc/v3/index.htmlOther API documentation Toolshttps://github.com/danielgtaylor/aglioAlternative Clientshttps://github.com/Orange-OpenSource/angular-swagger-uihttps://github.com/apigee-127/swagger-client-APIhttps://github.com/signalfx/swagger-ajax-client/https://github.com/signalfx/swagger-angular-clienthttps://github.com/signalfx/swagger-client-generatorOther Useful Toolshttp://jsonschema.net/