Saravanan666/pypi-org huggingface dataset:
Package: shapeshifter
# shapeshifter Python ModuleThe official repository for the shapeshifter Python module, which allows for:* Transforming tabular data sets from one format to another.* Querying large data sets to filter out useful data.* Selecting additional columns/features to include in the resulting data set.* Merging data sets of various formats into a single file.* Gzipping resulting data sets, as well as the ability to read gzipped files.Click for information on the [shapeshifter command-line tool](https://github.com/srp33/ShapeShifter-CLI), which combinesthe features of shapeshifter with the ease and speed of the command-line!Basic use is described below, but see the full documentation on [Read the Docs](https://shapeshifter.readthedocs.io/en/latest/).## Install`pip3 install shapeshifter`## Basic UseAfter installing, import the ShapeShifter class with `from shapeshifter import ShapeShifter`. A ShapeShifter objectrepresents the file to be transformed. It is then transformed using the `export_filter_results` method. Here is a simpleexample of file called `input_file.tsv` being transformed into an HDF5 file called `output_file.h5`, while filteringthe data on sex and age:```pythonfrom shapeshifter import ShapeShiftermy_shapeshifter = ShapeShifter("input_file.tsv")my_shapeshifter.export_filter_results("output_file.h5", filters="Sex == 'M' and Age > 40")```Note that the type of file being read and exported to were not stated explicitly but inferred by shapeshifter based onthe file extensions provided. If necessary, `input_file_type` and `output_file_type` can be named explicitly.## ContributingWe welcome contributions that help expand shapeshifter to be compatible with additional file formats. If you areinterested in contributing, please follow the instructions [here](https://github.com/srp33/ShapeShifter/wiki).## Currently Supported Formats#### Input Formats:* CSV* TSV* JSON* Excel* HDF5* Parquet* MsgPack* Stata* Pickle* SQLite* ARFF* GCT* Kallisto* GEO#### Output Formats:* CSV* TSV* JSON* Excel* HDF5* Parquet* MsgPack* Stata* Pickle* SQLite* ARFF* GCT* RMarkdown* JupyterNotebook## Future Formats to SupportWe are working hard to expand ShapeShifter to work with even more file formats! Expect the following formats to beincluded in future releases:* Fixed-width files (fwf)* Genomic Data Commons clinical XML
Package: shapesimilarity
SHAPE SIMILARITY:bulb: AboutThe package allows you to check the similarity between two shapes/curves, using Frechet distance together with Procrustes analysis.
Internally,shape_similarityworks by first normalizing the curves using Procrustes analysis and then calculating Fréchet distance between the curves.:page_facing_up: ContentFrechet DistanceIn mathematics, the Fréchet distance is a measure of similarity between curves that takes into account the location and ordering of the points along the curves. Imagine a person traversing a finite curved path while walking their dog on a leash, with the dog traversing a separate finite curved path. Each can vary their speed to keep slack in the leash, but neither can move backwards. The Fréchet distance between the two curves is the length of the shortest leash sufficient for both to traverse their separate paths from start to finish. Note that the definition is symmetric with respect to the two curves—the Fréchet distance would be the same if the dog were walking its owner.Procrustes AnalysisIn statistics, Procrustes analysis is a form of statistical shape analysis used to analyse the distribution of a set of shapes. To compare the shapes of two or more objects, the objects must be first optimally "superimposed". Procrustes superimposition (PS) is performed by optimally translating, rotating and uniformly scaling the objects. In other words, both the placement in space and the size of the objects are freely adjusted. The aim is to obtain a similar placement and size, by minimizing a measure of shape difference called the Procrustes distance between the objects.:rocket: TechnologiesPython3:package: InstallationInstall with pip$python-mpipinstallshapesimilarityInstall from source code$gitclonehttps://github.com/nelsonwenner/shape-similarity.git

$python-mpipinstall.Run the tests$python-mpipinstallpytest

$python-mpytest:information_source: Example useagefromshapesimilarityimportshape_similarityimportmatplotlib.pyplotaspltimportnumpyasnpx=np.linspace(1,-1,num=200)y1=2*x**2+1y2=2*x**2+2shape1=np.column_stack((x,y1))shape2=np.column_stack((x,y2))similarity=shape_similarity(shape1,shape2)plt.plot(shape1[:,0],shape1[:,1],linewidth=2.0)plt.plot(shape2[:,0],shape2[:,1],linewidth=2.0)plt.title(f'Shape similarity is:{similarity}',fontsize=14,fontweight='bold')plt.show()You can further customize the precision of the shape_similarity function by changing the rotation (default 10). Increasing it will increase accuracy. You can also disable rotation correction completely (default True).# disable rotation correction entirelyshape_similarity(shape1,shape2,checkRotation=False)# higher accuracy, but slowershape_similarity(shape1,shape2,rotation=30):chart_with_downwards_trend: Results:pushpin: ReferenciesFrechet distanceProcrustes analysisCurve MatcherMade with :hearts: by Nelson Wenner :wave:Get in touch!
Package: shapesort
shapesortAdd a short description here!A longer description of your project goes here…Making Changes & ContributingThis project usespre-commit, please make sure to install it before making any
changes:pip install pre-commit
cd shapesort
pre-commit installIt is a good idea to update the hooks to the latest version:pre-commit autoupdateDon’t forget to tell your contributors to also install and use pre-commit.NoteThis project has been set up using PyScaffold 4.2.1. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: shapes-recognition
SHAPES RECOGNITIONshapes recognitionis a New Recognition TechnologyInstallationpip install shapes-recognitionAbout "shapes-recognition"Recognition is an intrinsic property of the human intellect. Kids around two years old recognize shapes even if they differ in size and position or are severely deformed.To simulate such recognition capability, we introduce theshapes-recognitionlibrary.Herewe show how to use it.
Package: shapevolve
A genetic algorithm to recreate artworks using simple shapes, with
Python 3.Evan Zheng, July 2020.Initially designed on Google Colab with Jupyter Notebooks. Module built
with assistance from PyCharm.View onPyPI.Sample Results:The Starry Night:Mona Lisa:Girl with a Pearl Earring:The Great Wave off Kanagawa:How to install and use:Standalone executable: (Windows)Head over toreleasesand download the latest executable,shapevolve.exe.In the command line:Change the directory usingcdto where the executable is located.Then, runshapevolve.exe path/to/image_file.pngto run the program with an image as input.You can also runshapevolve.exe-hto view additional options.Module:Install shapevolve from PyPI using the following command:pip install shapevolveHere is some sample code to demonstrate how to use the module.from shapevolve.evolver import Evolver
from PIL import Image

evolver = Evolver(Image.open("path/to/image.png")) # Sets up the Evolver object.

genome = evolver.evolve() # Evolves the genome.

image = genome.render_scaled_image() # Gets a numpy array that represents the evolved image.

genome.save_genome("path/to/save_checkpoint.pkl") # Saves the genome for later use.More sample code can be found insamples.py,here.Here is a detailedAPI reference.Libraries and APIs used:Third-party libraries used:NumPyfor numerical computation with matricesColorThieffor grabbing color palettes from imagesScikit-Imagefor computing image simularityOpenCVfor building images from circlesPillowfor image preprocessingMatplotlibfor image displayPyInstallerfor building an executable file.Built-in libraries used:Picklefor checkpoint saves and loads.Argparsefor the CLI interface.License:SeeLICENSEfile.Thanks:Ahmed Khalf’sCircle-Evolutionmodule provided a great deal of
inspiration.
Package: shapflex
shapflexA python version of R package for computing asymmetric Shapley values to assess causality in any trained machine learning modelFree software: MIT licenseDocumentation:https://gregory-ch.github.io/shapflexWarningsThis is the alpha version of portinghttps://github.com/nredell/shapFlexExamples#02.05.22


import pandas as pd
import numpy as np
from shapflex.shapflex import shapFlex_plus
from catboost import CatBoostClassifier 

data = pd.read_csv('https://kolodezev.ru/download/data_adult.csv', index_col=0)
outcome_name = 'income'
outcome_col = pd.Series(data.columns)[data.columns==outcome_name].index[0]
X, y = data.drop(outcome_name, axis=1), data[outcome_name].values
cat_features = [inx for inx, value in zip(X.dtypes.index, X.dtypes) if value =='object']
model = CatBoostClassifier(iterations=100)
model.fit(X, y, cat_features=cat_features, verbose=False)
def predict_function(model, data):
  #pd.DataFrame(model.predict_proba(X)).loc[:, 0][9] РµСЃР»Рё Р·Р°РїСѓСЃС‚РёС‚СЊ Р±СѓРґРµС‚ СЂРµР·СѓР»СЊС‚Р°С‚ 0.98, С‡С‚Рѕ СЃРѕРѕС‚РІРµС‚СЃС‚РІСѓРµС‚
  #РІС‹РІРѕРґСѓ РґР»СЏ 9 РЅРѕРјРµСЂР° РєРѕС‚РѕСЂС‹Р№ СЂР°РІРµРЅ 0.98, РЅРµРІР°Р¶РЅРѕ РєР°РєРѕР№ Р°Р»РіРѕСЂРёС‚Рј, С‚Р°РєР°СЏ РІС‹СЃРѕРєР°СЏ СЃС‚РµРїРµРЅСЊ СѓРІРµСЂРµРЅРЅРѕСЃС‚Рё
  #РїРѕР·РІРѕР»СЏРµС‚ РёРґРµРЅС‚РёС„РёС†РёСЂРѕРІР°С‚СЊ РІС‹РІРѕРґРёРјСѓСЋ РєРѕР»РѕРЅРєСѓ РѕРґРЅРѕР·РЅР°С‡РЅРѕ
  return pd.DataFrame(model.predict_proba(data)[:, [0]])


explain, reference = data.iloc[:300, :data.shape[1]-1], data.iloc[:, :data.shape[1]-1]
sample_size = 50
target_features = pd.Series(["marital_status", "education", "relationship",  "native_country",
                     "age", "sex", "race", "hours_per_week"])
causal = pd.DataFrame(
  dict(cause=pd.Series(["age", "sex", "race", "native_country",
              "age", "sex", "race", "native_country", "age",
              "sex", "race", "native_country"]),
  effect = pd.Series(np.concatenate([np.tile("marital_status", 4), np.tile("education", 4), np.tile("relationship", 4)])))
)
exmpl_of_test = shapFlex_plus(explain,  model, predict_function, target_features=pd.Series(["marital_status", "education", "relationship", "native_country",
"age", "sex", "race", "hours_per_week"]), causal=causal, causal_weights = [1. for x in range(len(causal))])
result = exmpl_of_test.forward()
print(result.groupby('feature_name').mean())CreditsThis package was created withCookiecutterand thegiswqs/pypackageproject template.
Package: shaphinx
Shaphinx该主题是我用于火葱科技文档编写的主题，绝对不错，特意开源分享出来。你可以试试。免费软件: MIT license文档:https://shaphinx.readthedocs.io.特征主题比较清新，参考gitbook等主题。名单该包使用Cookiecutter和audreyr/cookiecutter-pypackage项目模板创建.历史0.1.0 (2021-03-16)
0.1.2 (2021-03-17)
——————首个版本，欢迎使用提出bug.
Package: shapiq
SHAP-IQ: SHAP Interaction QuantificationAn interaction may speak more than a thousand main effects.SHAP Interaction Quantification (short SHAP-IQ) is anXAI frameworkextending on the well-knownshapexplanations by introducing interactions to the equation.
Shapley interactions extend on indivdual Shapley values by quantifying thesynergyeffect between machine learning entities such as features, data points, or weak learners in ensemble models.
Synergies between these entities (also called players in game theory jargon) allows for a more intricate evaluation of yourblack-boxmodels!🛠️ Installshapiqis intended to work withPython 3.9 and above. Installation can be done viapip:pipinstallshapiq⭐ Quickstart📈 Compute n-SII values📊 Visualize your InteractionsOne handy way of visualizing interaction scores (up to order 2) are network plots.
You can see an example of such a plot below.
The nodes representattributionscores and the edges represent theinteractions.
The strength and size of the nodes and edges are proportional to the absolute value of the
attribution scores and interaction scores, respectively.fromshapiq.plotimportnetwork_plotnetwork_plot(first_order_values=n_sii_first_order,# first order n-SII valuessecond_order_values=n_sii_second_order# second order n-SII values)The pseudo-code above can produce the following plot (here also an image is added):📖 DocumentationThe documentation forshapiqcan be foundhere.
Package: shapleychains
shapleychains libOfficial code for the paper Shapley chains: Extending Shapley values to Classifier chainsInstallationRun the following to installpipinstallshapleychainsUsagefromshapleychainsimportChainContribfromshapleychainsimportget_direct_positive,get_direct_unsigned,draw_features_contribs,get_indirect_unsigned,xorfromsklearn.multioutputimportClassifierChainfromsklearn.linear_modelimportLogisticRegressiondf=xor()var_x=['X1','X2']var_y=['AND','OR','XOR']train_xor=df.iloc[:16,:]test_xor=df.iloc[16:,:]chain_xor_LR=ClassifierChain(LogisticRegression())chain_xor_LR.fit(train_xor[var_x],train_xor[var_y])cc_LR=ChainContrib(df,var_x,var_y,chain_xor_LR.estimators_,explainer='Kernel')dc=cc_LR.get_direct_contrib()ic=cc_LR.get_indirect_contrib(dc)di_pos=get_direct_positive(dc,len(var_x))di_posneg=get_direct_unsigned(dc,len(var_x))ic_posneg=get_indirect_unsigned(ic)raw,normalized=draw_features_contribs(var_x,var_y,dc,ic)
Package: shapley-effects
[![build status](https://gitlab.com/CEMRACS17/shapley-effects/badges/master/build.svg)](https://gitlab.com/CEMRACS17/shapley-effects/commits/master)
[![coverage report](https://gitlab.com/CEMRACS17/shapley-effects/badges/master/coverage.svg)](https://gitlab.com/CEMRACS17/shapley-effects/commits/master)
# Shapley effectsShapley-effects, orshapley, is a Python library that estimates the Shapley effects for the field of Sensitivity Analysis of Model Output [[1]](http://epubs.siam.org/doi/pdf/10.1137/16M1097717). Several features are available in the library. For a given probabilistic model and numerical function, it is possible to:compute the Shapley effects,compute the Sobol’ indices for dependent and independent inputs,build a surrogate model to substitute the numerical function.The library is mainly built on top of NumPy, OpenTURNS and other libraries. It is also validated and compared to the [sensitivity](https://github.com/cran/sensitivity/) package from the R software.## Important linksExample notebooks are available in the [example directory](https://gitlab.com/CEMRACS17/shapley-effects/tree/dev/examples).Issues: [https://gitlab.com/CEMRACS17/shapley-effects/issues](https://gitlab.com/CEMRACS17/shapley-effects/issues)## InstallationVarious dependencies are necessary in this library and we strongly recommend the use of [Anaconda](https://anaconda.org/) for the installation. The dependencies are:Numpy,Scipy,Pandas,OpenTURNS,Scikit-Learn,GPflow.Scikit-learn is used to build kriging and random-forest models. OpenTURNS is a very convenient tool to define probabilistic distributions. GPflow which generates kriging models from GPy using Tensorflow.Optional dependencies are also necessary for various task like plotting or tuning the model:Matplotlib,Seaborn,Scikit-Optimize.These libraries can easily be installed using Anaconda and pip. Execute the following commands:` conda install numpy pandasscikit-learntensorflow matplotlib seabornscikit-optimizeconda install-cconda-forgeopenturns gpy `The package GPflow is not available on Anaconda or PyPi. Thus it must be installed from the source. First clone the GitHub repository:` git clonehttps://github.com/GPflow/GPflow.git`Then, inside the GPflow folder, execute the command:` pip install . `## AcknowledgementsThe library has been developed at the [CEMRACS 2017](http://smai.emath.fr/cemracs/cemracs17/) with the help of Bertrand Iooss, Roman Sueur, Veronique Maume-Deschamps and Clementine Prieur.## References[1] Owen, A. B., & Prieur, C. (2017). On Shapley value for measuring importance of dependent inputs. SIAM/ASA Journal on Uncertainty Quantification, 5(1), 986-1002.[2] Song, E., Nelson, B. L., & Staum, J. (2016). Shapley effects for global sensitivity analysis: Theory and computation. SIAM/ASA Journal on Uncertainty Quantification, 4(1), 1060-1083.
Package: shapley-lz
InstallationRun the following to install:pipinstallshapley_lzfromshapley_lzimportShapleyLorenzShare# Compute Shapley Lorenz Zonoid values:# model = iml_mode.fit(X_background, y_background)lorenzshare=ShapleyLorenzShare(model.predict,X_background_data,y_background_data)lorenzshare.shapleyLorenz_val(X_test,y_test)Developing Shapley Lorenz ZonoidTo install lorenz_zonoid, along with the tools you need to develop and run tests, run the following in your virtualenv:$pipinstall-e.[dev]
Package: shapleyrouting
Shapley-RoutingDocumentation can be foundhere.Installation:one: InstallPoetry:pipinstallpoetryIf you encounter an error, try:exportPATH="/home/<user>/.local/bin:$PATH":two: Install dependencies:poetryinstallTestingRun style checkpoetryrunflake8.
poetryrunblack.Running unit testspoetryrunpytest-v.Running unit tests with coveragepoetryruncoveragerun-mpytest-v.
poetryruncoveragereport-mDocsDocs can be built using the following commands:cddocs/
poetryrunmakehtml
Package: shapley-values
Shapley valuesAn open-source library ofShapley value algorithmsin Python.For example of "Shapley values" algorithm you can enter to:example of "Shapley values"Installationclone https://github.com/LIADN7/shapley_values.git
cd shapley_values
pip install -r requirements.txt
pip install -e .To verify that everything was installed correctly, run one of the test programs,python shapley_values/tests/test_shap.py
python shapley_values/tests/test_x_shapley.pyOther algorithms implemented:X_Shapley
Package: shapmat
SHAP-based Mircrobiome Analysis Tool (SHAPMAT)Leveraging Explainable AI for Microbiome Data AnalysisView TutorialAbout The ProjectSHAPMAT leverages SHAP (SHapley Additive exPlanations) for microbiome data analyese that includes local explanation-based feature importance analysis and phenotype subytping/clustering.Getting StartedThis is an example of how you may give instructions on setting up your project locally.
To get a local copy up and running follow these simple example steps.PrerequisitesPlease check therequirements.txtfile for the required dependencies.InstallationUse pip to install this library:pip install shapmatLicenseDistributed under the MIT License. SeeLICENSE.txtfor more information.ContactRyza Rynazal -Email
Package: shapps
Author:Chunlin Zhang <zhangchunlin@gmail.com>,Jiannan Tang <tangjn518@gmail.com>ContentsAbout ShappsLicenseAbout ShappsShapps is an apps collection project for uliweb. So you can use any app of it
to compose your project.LicenseShapps is released under BSD license. Of cause if there are some third party
apps not written by this project’s author, it’ll under the license of itself.
Package: shap-selection
.. -- mode: rst --|pypi_version|_ |pypi_downloads|_.. |pypi_version| image::https://img.shields.io/pypi/v/shap-selection.svg.. _pypi_version:https://pypi.python.org/pypi/shap-selection/.. |pypi_downloads| image::https://pepy.tech/badge/shap-selection/month.. _pypi_downloads:https://pepy.tech/project/shap-selection=====
SHAP-Selection: Selecting feature using SHAP valuesDue to the increasing concerns about machine learning interpretability, we believe that interpretation could be added to pre-processing steps. Using this library, you will be able to select the most important features from a multidimensional dataset while explaining your decisions!To use SHAP-Selection, you will need:SHAP <https://github.com/slundberg/shap>_Instalation.. code:: pythonpip install shap-selectionCitation.. code:: bibtex@INPROCEEDINGS{MarcilioJr2020shapselection,  
     author={W. E. {MarcÃ­lio} and D. M. {Eler}}, 
     booktitle={2020 33rd SIBGRAPI Conference on Graphics, Patterns and Images (SIBGRAPI)},   
     title={From explanations to feature selection: assessing SHAP values as feature selection mechanism},   
     year={2020},  
     pages={340-347},  
     doi={10.1109/SIBGRAPI51738.2020.00053}
   }UsageTo use SHAP-Selection, you must have a trained model. It works both for classification and regression purposes!Load a dataset.. code:: pythoniris_data = load_iris()

   X, y = iris_data.data, iris_data.target
   feature_names = np.array(iris_data.feature_names)

   X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)Fit a model.. code:: pythonmodel = cb.CatBoostClassifier(verbose=False)    
   model.fit(X_train, y_train)Use SHAP-Selection.. code:: pythonfrom shap_selection import feature_selection

   # please, use agnostic = True to use with any model...
   # agnostic = False will only work with tree-based models
   feature_order = feature_selection.shap_select(model, X_train, X_test, feature_names, agnostic=False)SupportPlease, if you have any questions feel free to contact me atwilson_jr@outlook.com
Package: sha-python-devtools
sha-python-devtoolsPython的开发工具，便于调试。来自来自python-devtools 工具，准备用来进行自定义操作。版本v0.1.6 修改timer.py解决name 'Timer' is not defined问题。开源许可: MIT文档:https://llango.github.io/sha-python-devtools.特征TODO制作该包使用Cookiecutter和llango/cookiecutter-mkdoc-shapackage项目模版创建。
Package: shaq
shaqA bare-bones CLI client forShazam.Installationshaqis available viapiporpipx:pipinstallshaq
pipxinstallshaqIf you run into installation errors, make sure that you have PortAudio
installed. On Debian-based systems:sudoaptinstall-yportaudio19-devUsageDetect by listening to the system microphone:# shaq listens for 10 seconds by defaultshaq--listen# tell shaq to listen for 15 seconds insteadshaq--listen--duration15Detect from an audio file on disk:# shaq truncates the input to 10 secondsshaq--inputobscure.mp3# ...which can be overridenshaq--inputobscure.mp3--duration15Seeshaq --helpfor more options.The name?Shazam,Shazaam,Kazaam,Shaquille O'Neal.
Package: sharc
Joe Gregorio originallypostedabout Sharded Counters for Google Appengine.This is like a downloadable gist:from sharc import Counter

assert not Counter('A').exists()

Counter('A', initial_value=5, shards=5)
assert Counter('A').exists()

Counter('A').increment()
Counter('A').decrement()
Counter('A') + 2
Counter('A') - 2

assert Counter('A') == 5

Counter('A').shards = 10

Counter('A').delete()   # .delete_async()
assert not Counter('A').exists()Added decrementIncrement and decrement variable deltas (default=1)Set initial value of the counter (default=0)Set initial value of the num of shards (default=20)Added delete()
Package: shardai
ShardAI PKGInstallationpipinstallshardaiUsagefromshardaiimportShardClientclient=ShardClient("your-api-key")# Replace with your API key# Get all the available chat modelsmodels=client.chat.models()# Get the response from the chat modelresponse=client.chat.completions("Hello, how are you?","llama_2_7b")print(response.choices[0].message.content)# This will be a response from the model# Get all the available image generation optionsoptions=client.image.options()# Get the response from the image generation modelresponse=client.image.completions("A picture of a cat")print(response.image)# This will be an image as https://shard-ai.xyz/static/....pngresponse.image.download("cat.png")# This will download the image to the current directoryimage_bytes=response.image.as_bytes()# This will return the image as bytes# Get all the available tts voicesvoices=client.tts.voices()# Get the response from the tts modelresponse=client.tts.completions("Hello, how are you?")print(response.audio)# This will be an audio encoded in base64LicenseMITAuthorShardAI
Package: shard-computer
shard-computerPerform accelerated shard hash computation forNeuroglancer Precomputed shards.importshardcomputerpreshift_bits=0shard_bits=11minishard_bits=8label=12949142shard_no=shardcomputer.shard_number(label,preshift_bits,shard_bits,minishard_bits)# let labels be a uint64 numpy array of labels# e.g. set(['4d2'])shard_no_set=shardcomputer.unique_shard_numbers(labels,preshift_bits,shard_bits,minishard_bits)# Returns shard number -> label list dict# e.g. {'4d2': [12949142]}shard_no_to_labels=shardcomputer.assign_labels_to_shards(label,preshift_bits,shard_bits,minishard_bits)Installpip install shard-computerCreditsThank you to Austin Appleby for placing MurMurhash3 into the public domain.