Saravanan666/pypi-org huggingface dataset:
Package: hierarc
Hierarchical analysis of strong lensing systems to infer lens properties and cosmological parameters simultaneously.The software is originated fromBirrer et al. 2020and is in active development.Free software: BSD licenseDocumentation:https://hierarc.readthedocs.io.FeaturesThe software allows to fit lenses with measured time delays, imaging information, kinematics constraints and
standardizable magnifications with parameters described on the ensemble level.Installation$pipinstallhierarc--userUsageThe full analysis ofBirrer et al. 2020is publicly availableat this TDCOSMO repository.
A forecast based on hierArc is presented byBirrer & Treu 2020and the notebooks are availableat this repository.
The extension to using hierArc with standardizable magnifications is presented byBirrer et al. 2021and the forecast analysis is publicly availablehere.
For example use cases we refer to the notebooks of these analyses.CreditsSimon Birrer & theTDCOSMOteam.Please citeBirrer et al. 2020if you make use of this software for your research.
Package: hierarch
hierarchA Hierarchical Resampling Package for PythonVersion 1.1.6hierarch is a package for hierarchical resampling (bootstrapping, permutation) of datasets in Python. Because for loops are ultimately intrinsic to cluster-aware resampling, hierarch uses Numba to accelerate many of its key functions.hierarch has several functions to assist in performing resampling-based (and therefore distribution-free) hypothesis tests, confidence interval calculations, and power analyses on hierarchical data.Table of ContentsIntroductionSetupDocumentationCitationIntroductionDesign-based randomization tests represents the platinum standard for significance analyses[1, 2, 3]- that is, they produce probability statements that depend only on the experimental design, not at all on less-than-verifiable assumptions about the probability distributions of the data-generating process. Researchers can use hierarch to quickly perform automated design-based randomization tests for experiments with arbitrary levels of hierarchy.[1]Tukey, J.W. (1993). Tightening the Clinical Trial. Controlled Clinical Trials, 14(4), 266-285.[2]Millard, S.P., Krause, A. (2001). Applied Statistics in the Pharmaceutical Industry. Springer.[3]Berger, V.W. (2000). Pros and cons of permutation tests in clinical trials. Statistics in Medicine, 19(10), 1319-1328.SetupDependenciesnumpypandas (for importing data)numbascipy (for power analysis)InstallationThe easiest way to install hierarch is via PyPi.pip install hierarchAlternatively, you can install from Anaconda.conda install -c rkulk111 hierarchDocumentationCheck out our user guide atreadthedocs.CitationIf hierarch helps you analyze your data, please consider citing it. The manuscript also
contains a set of simulations validating hierarchical randomization tests in a variety of
conditions.Kulkarni RU, Wang CL, Bertozzi CR (2022) Analyzing nested experimental designs—A user-friendly resampling method to determine experimental significance. PLoS Comput Biol 18(5): e1010061.https://doi.org/10.1371/journal.pcbi.1010061
Package: hierarchical-bay-cat-encoder
Hierarichcial Bayesian Target Encoderhierarchical-bay-cat-encoderis a Python library for encoding classes of cross features derived from categorical features that relate to one another in a herarchival structure. It facilitates the process of converting categorical features into continuous variables based on the information with respect to target responses, a data preprocessing practice that often improves model performnace in machine learning and is one of well adopted winner techiniques in Kaggle competitions for tabular/structured data.FeedbackComments and suggestions are welcome and appreciated. They can be sent tolipin.juan02@gmail.com.
Package: hierarchical-conf
Hierarchical ConfA library for loading configurations (or other metadata) hierarchically based on the current environmentSourceDownloadsPageInstallation CommandPyPiLinkpip install hierarchical-confBuild statusDevelopStableDocumentationSonarThis library supports Python version 3.7+.To check library main features you can checkHierarchical Conf's Documentation, which is hosted by Read the Docs.How to useShortAn example of how to use the library getting configurations:fromhierarchical_conf.hierarchical_confimportHierarchicalConfhierarchical_conf=HierarchicalConf(searched_paths=[PROJECT_ROOT])my_config=hierarchical_conf.get_config("my_config_key")LongThis tool retrieve the configurations from (YAML) files according to the current
environment and files precedence.It receives a list of paths and searches each one for environment configuration files in anorderly
fashion, loading them when found andoverwriting duplicatedconfiguration keys by the value of the key
available in the file loaded at last.
The YAML configuration files are expected to be named with prefixes based on the working environment,
retrieved by the value of a pre-existent operational system environment's variable namedENVIRONMENT.E.g.: Given the respective environmentsdevandproductionconfiguration files below:dev_conf.yml:foo:bar_devfoo2:bar_dev2production_conf.yml:foo:bar_prodfoo2:bar_prod2and given we are at development environment (ENVIRONMENT=dev), the following code will load the
configuration file from the development environment file (/my_path/dev_conf.yml).hconf=HierarchicalConf(conf_files_paths=['/my_path/'])foo_conf=hconf.get_config("foo")print(foo_conf)# prints: bar_devGivenENVIRONMENT=production, the code above will load the configuration file from
the production environment file (/my_path/production_conf.yml) and print:bar_prod.To learn more use cases in practice (and about the keys overwriting), seeHierarchical Conf examplesRequirements and InstallationThe Hierarchical Conf depends onPython 3.7+Python Package Indexhosts reference to a pip-installable module of this library, using it is as straightforward as including it on your project's requirements.pipinstallhierarchical-confLicenseApache License 2.0ContributingAll contributions are welcome! Feel free to open Pull Requests. Check the development and contributingguidelinesdescribed inCONTRIBUTING.mdMade with :heart: by theData Engineeringteam fromQuintoAndar
Package: hierarchicalsoftmax
A Hierarchical Softmax Framework for PyTorch.Installationhierarchicalsoftmax can be installed from PyPI:pipinstallhierarchicalsoftmaxAlternatively, hierarchicalsoftmax can be installed using pip from the git repository:pipinstallgit+https://github.com/rbturnbull/hierarchicalsoftmax.gitUsageBuild up a hierarchy tree for your categories using theSoftmaxNodeinstances:fromhierarchicalsoftmaximportSoftmaxNoderoot=SoftmaxNode("root")a=SoftmaxNode("a",parent=root)aa=SoftmaxNode("aa",parent=a)ab=SoftmaxNode("ab",parent=a)b=SoftmaxNode("b",parent=root)ba=SoftmaxNode("ba",parent=b)bb=SoftmaxNode("bb",parent=b)TheSoftmaxNodeclass inherits from theanytreeNodeclass
which means that you can use methods from that library to build and interact with your hierarchy tree.The tree can be rendered as a string with therendermethod:root.render(print=True)This results in a text representation of the tree:root
├── a
│   ├── aa
│   └── ab
└── b
    ├── ba
    └── bbThe tree can also be rendered to a file usinggraphvizif it is installed:root.render(filepath="tree.svg")Then you can add a final layer to your network that has the right size of outputs for the softmax layers.
You can do that manually by setting the output number of features toroot.layer_size.
Alternatively you can use theHierarchicalSoftmaxLinearorHierarchicalSoftmaxLazyLinearclasses:fromtorchimportnnfromhierarchicalsoftmaximportHierarchicalSoftmaxLinearmodel=nn.Sequential(nn.Linear(in_features=20,out_features=100),nn.ReLU(),HierarchicalSoftmaxLinear(in_features=100,root=root))Once you have the hierarchy tree, then you can use theHierarchicalSoftmaxLossmodule:fromhierarchicalsoftmaximportHierarchicalSoftmaxLossloss=HierarchicalSoftmaxLoss(root=root)Metric functions are provided to show accuracy and the F1 score:fromhierarchicalsoftmaximportgreedy_accuracy,greedy_f1_scoreaccuracy=greedy_accuracy(predictions,targets,root=root)f1=greedy_f1_score(predictions,targets,root=root)The nodes predicted from the final layer of the model can be inferred using thegreedy_predictionsfunction which provides a list of the predicted nodes:fromhierarchicalsoftmaximportgreedy_predictionsoutputs=model(inputs)inferred_nodes=greedy_predictions(outputs)Relative contributions to the lossThe loss for each node can be weighted relative to each other by setting thealphavalue for each parent node.
By default thealphavalue of a node is 1.For example, the loss for the first level of classification (under therootnode) will contribute twice as much to the loss than under theaorbnodes.fromhierarchicalsoftmaximportSoftmaxNoderoot=SoftmaxNode("root",alpha=2.0)a=SoftmaxNode("a",parent=root)aa=SoftmaxNode("aa",parent=a)ab=SoftmaxNode("ab",parent=a)b=SoftmaxNode("b",parent=root)ba=SoftmaxNode("ba",parent=b)bb=SoftmaxNode("bb",parent=b)Label SmoothingYou can add label smoothing to the loss by setting thelabel_smoothingparameter to any of the nodes.Focal LossYou can use the Focal Loss instead of a basic cross-entropy loss for any of the nodes by setting thegammaparameter to any of the nodes.CreditsRobert Turnbull <robert.turnbull@unimelb.edu.au>
Package: hierarchy
HierarchyHierarchy is a simple tool that allows you to clone and maintain an entire hierarchy of Git repository inone single command:$ hierarchyTODO: Add picture ofhierarchyin actionQuick-StartInstall$pipinstallhierarchyCreate theHierarchyfile$nano~/.hierarchySample Hierarchy Filerepos:-path:~/Dev/CliToolsurl:git@github.com:FlorianKempenich/Hierarchy.git-path:~/Dev/CliToolsurl:git@github.com:FlorianKempenich/kata.git-path:~/Dev/CliTools/DevOpsurl:git@github.com:FlorianKempenich/ansible-droplet.git-path:~/Dev/HomeAutomationurl:git@github.com:FlorianKempenich/Appdaemon-Test-Framework.gitname:appdaemontestframeworkRunHierarchy$hierarchyHierarchyfile structureTheHierarchyfile represent the flat hierarchy of all the git repository to clone and maintain.It consists of a list of entries, under the keyrepos, each representing a repository to clone.repos:-REPO_TO_CLONE_1-REPO_TO_CLONE_2-REPO_TO_CLONE_3Each repository has the following structure:url:"URLoftheproject.Thesameusedtoclonetherepositorywith`gitclone`"path:"Thelocalpathwheretoclonetherepository.Itcancontain`~`torepresentHOME"name:"OPTIONAL-Anametooverridethedefaultrepositorynamewhencloning"The repository will be cloned at:path/nameIf nonameis provided, the repository name will be used.A sampleHierarchyfile might look like this:repos:-path:~/Dev/CliToolsurl:git@github.com:FlorianKempenich/Hierarchy.git-path:~/Dev/CliToolsurl:git@github.com:FlorianKempenich/kata.git-path:~/Dev/CliTools/DevOpsurl:git@github.com:FlorianKempenich/ansible-droplet.git-path:~/Dev/HomeAutomationurl:git@github.com:FlorianKempenich/Appdaemon-Test-Framework.gitname:appdaemontestframeworkOptions-f/--file HIERARCHY_FILEA hierarchy file to use.Default:~/.hierarchy-v/--verboseEnable verbose mode--helpShow helpWork In ProgressAllow for~in thepathCreate directories if do not existClone with all submodulesIf directory exists and not empty:Is not same repo => Skip and notify user (ERROR)Is not repo => Skip and notify user (ERROR)Is correct repo:Has no local modifications and up to date with remote =>Update (pull)Update with all submodulesHas local modifications => Skip and notify user (WARN)Is not up to date with remote => Skip and notify user (WARN)
Package: hierarchy-transformers
Hierarchy Transformers (HiTs)Code repository for the paper: "Language Models as Hierarchy Encoders".Main DependenciesThis repository follows a similar layout as thesentence_transformerslibrary. It mainly depends on the following libraries:Sentence Transformersfor language models.DeepOntofor processing hierarchies and constructing datasets from hierarchies.Geooptfor arithmetic in hyperbolic space.Models on Huggingface HubOur HiT models will be released on theHuggingface Hub.DatasetsDatasets for HiTs are available atZenodo, including those constructed from:WordNetSNOMED CTSchema.orgFoodOnDOID
Package: hier-client
hier_clientA Python library for usingHierfrom the CLI.InstallThe client requires Python >3.6. Just usepipto install:$ pip install hier_clientQuickstartBefore using the client, you must generate a Hier token.
Go to your profile page onHier.
Click theRefresh tokenbutton.Back at the command-line, initialize the client.
You'll only have to do this once.$ hier initYou'll be prompted for the email you used to register for Hier,
as well as the token you just generated.
If you do ever want to update your token,
you can always rerunhier init.Now, add a note for today:$ hier write "Learned about the Hier client."If you've already made notes for today, no worries, just append to them:$ hier write --append "Learned about the Hier client."Or to start a note over from scratch, use--forceinstead.$ hier write --force "Wrote a fresh note."Finally, if you just want to see what you've already written:$ hier readBugs or SuggestionsFeel free to leave anIssueif anything comes up!
Package: hierdiff
hierdiffA package that is useful for clustering high-dimensional instances (e.g. T cell receptors) and testing whether clusters of instances are differentially abundant in two or more categorical conditions. The package provides d3/SVG rendering of scipy hierarchical clustering dendrograms with zooming, panning and tooltips. This uniquely allows for exploring large trees of datasets, conditioned on a categorical trait.Installationpip install hierdiffExampleimporthierdifffromscipy.spatial.distanceimportsquareform"""Contains categorical variable column 'trait1' andinstance counts in 'count'"""dat,pwdist=generate_data()res,Z=hierdiff.hcluster_tally(dat,pwmat=squareform(pwdist),x_cols=['trait1'],count_col='count',method='complete')res=hierdiff.cluster_association_test(res,method='fishers')"""Plot frequency of trait at nodes with p-value < 0.05"""html=plot_hclust_props(Z,title='test_props2',res=res,alpha=0.05,alpha_col='pvalue')
Package: hierophant
hierophantThis Python library use the power of large language models to provide intuitive, human-readable explanations for the predictions made by machine learning models.FeaturesSupport for scikit-learn and PyTorch modelsIntegration with OpenAI's language models for explanation generationWorks with both classification and regression modelsfromsklearn.ensembleimportRandomForestClassifierfromsklearn.datasetsimportload_irisfromhierophant.explainerimportExplaineriris=load_iris()X,y=iris.data,iris.targetrandom_forest=RandomForestClassifier()random_forest.fit(X,y)# Create an explainerexplainer=Explainer(random_forest,language_model="openai/gpt-4")explanations=explainer.explain(X)For more detailed usage, see our Jupyter notebooks in theexamples/directory.ContributingWe welcome contributions! See our contribution guide for more details.LicenseThis project is licensed under the terms of the MIT license.TODOSupport for more model types: Currently, hierophant supports scikit-learn models. In the future, we aim to add support for other types of models, such as PyTorch and TensorFlow models.Support for Hugging Face models: In addition to scikit-learn models, we aim to add support for Hugging Face models. This would allow hierophant to generate explanations for a wide range of state-of-the-art natural language processing models.Improved explanation generation: The current explanation generation process is quite basic. We need to further refine this process to generate more detailed and useful explanations.Model inspection capabilities: For more complex models, we might need to add functionality to inspect the internal workings of the model. This could involve using model interpretation techniques like LIME or SHAP.Data preprocessing functionality: We may need to add functionality to preprocess the data before feeding it to the model or the explanation generation system.Postprocessing of explanations: After generating the explanations, we may want to add postprocessing steps to make the explanations more readable or understandable. This could include summarization, highlighting, or conversion to other formats.Testing: We need to add comprehensive testing to ensure the reliability and robustness of hierophant.Documentation: While we have made a start on documentation, we need to continue to expand and improve it.Examplesand tutorials: We should create more example notebooks and tutorials demonstrating how to use hierophant with different types of data and models.Community engagement: As an open-source project, we want to encourage community involvement. We need to continue improving our contribution guidelines and fostering an inclusive and welcoming community.
Package: hieroskopia
HieroskopiaThe hiereskopia package is a library to infer properties like date formats or numeric separators in pandas series of type object or string.SupportDate-times:Support to dates and datetime formatThis library receive a series as input and try to return
a dictionary with the format found in the series Based on the 1989 C (Default) ,
Snowflake Standard or Java Simple date time format code.Numeric:This library receive a series as input and try to return
a dictionary with the three digit and decimal character separatorUsageInfer datetime or date>>>fromhieroskopiaimportInferDatetime>>>InferDatetime.infer(pd.Series(["2019-11-27","2019/11/28","2018-11-08"]))>>>{'formats':['%Y-%m-%d','%Y/%m/%d'],'type':'date'}Usingreturn_formatparameter>>>fromhieroskopiaimportInferDatetime>>>InferDatetime.infer(pd.Series(["2019-11-27","2019/11/28","2018-11-08"]),return_format='snowflake')>>>{'formats':['yyyy-mm-dd','yyyy/mm/dd'],'type':'date'}>>>fromhieroskopiaimportInferDatetime>>>InferDatetime.infer(pd.Series(["2019-11-27","2019/11/28","2018-11-08"]),return_format='java')>>>{'formats':['yyyy-MM-dd','yyyy/MM/dd'],'type':'date'}The above method works with a best guess approach to detect a format in a object type series and try
to return adatetime.strftime/strptime,Snowflake Date format,Java Simple Date Formatformat that will cover or parse the majority
of the samples.Infer numeric>>>fromhieroskopiaimportInferNumeric>>>InferNumeric.infer(pd.Series(['767313628196.2','76731362819.546','767313628196']))>>>{'three_digit_separator':'','decimal_separator':'.','type':'float'}The above method will try to detect and return certain properties in a object type series
likedatatype,three_digit_separatorordecimal_separatorcharacter that will cover
the majority of the samples.
Package: hierplace
Hierarchical Placement PluginThis PCBNEW plugin arranges the parts into groups that reflect the
hierarchy in the design.Free software: MIT licenseFeaturesCreates an arrangement of the parts that reflects their level in the
design hierarchy.Will arrange only the parts that have been selected or, if no parts
are selected, the entire design.Will not move locked parts.InstallationOn linux, just copyHierPlace.pyto your local~/.kicad_pluginsdirectory.UsageThere are two ways to use this plugin:Press theTools => ExternalPlugins...=> HierPlacebutton and
all the unlocked parts will be arranged.Select a subset of the parts and press theHierPlacebutton and
only the unlocked parts in the selection will be arranged.ExampleHere is an example of an initial arrangement of parts in PCBNEW. The
SDRAM BGA and its seven decoupling capacitors are highlighted to show
how widely separated they are. Other sections of the circuitry are
similarly scattered.The arrangement after runningHierPlaceis shown below. Now the
SDRAM and its decoupling capacitors are closely grouped, as are the
other sections of the circuitry.CreditsDevelopment LeadDave Vandenbout <devb@xess.com>Other ContributorsNone yet. Why not be the first?History1.1.0 (2023-08-10)Updated to be compatible with KiCad 7.1.0.0 (2021-09-16)Decided this tool was mature to the point it could be called 1.0.0.0.3.2 (2021-05-24)Still trying to get setup to work correctly.0.3.1 (2021-05-21)Trying to get setup to work correctly.0.3.0 (2021-05-19)hierplace()function is now usable in other packages likekinet2pcb.0.2.0 (2021-04-27)Now supports both KiCad 5 and 5.99.0.1.0 (2018-05-27)First release.
Package: hierScale
hierScaleHussein Hazimeh and Rahul MazumderMassachusetts Institute of TechnologyIntroductionhierScale is scalable toolkit for fitting sparse linear regression models with pairwise feature interactions. The optimization is done under thestrong hierarchy (SH)constraint: an interaction coefficient is non-zero only if its associated main feature coefficients are non-zero. This constraint can enhance the interpretability of sparse interaction models and also reduce the future data collection costs; see the discussion in(Hazimeh and Mazumder, 2020).More formally, given a data matrix X of main features and a response vector y, the toolkit fits aconvex relaxationof the following model:where X_i denotes the ith column (feature) of X and * refers to element-wise multiplication. The L0 norms impose sparsity on the coefficients and the constraints enforce SH. See(Hazimeh and Mazumder, 2020)for details on how the convex relaxation of the above problem is derived. The optimization is done for a regularization path (i.e., over a grid of lambda_1's and lambda_2's). We use proximal gradient descent (PGD) for optimization, along with novel proximal screening and gradient screening rules, which speed up PGD by over 4900x.InstallationhierScale is written in Python 3. It uses Gurobi internally (for solving the LPs required for checking the optimality conditions). Before installing hierScale, please make sure thatGurobiand its Python interface (gurobipy) are installed.To install hierScale, run the following command:pipinstallhierScaleQuick StartIn Python, assuming you have the data X and y stored as numpy arrays, run the following to fit a regularization path:fromhierScaleimporthier_fit,hier_predict# Set the parameters of the algorithm.params={"nLambda":100,# Number of lambda_1's in the path."maxSuppSize":500,# Max support size to terminate the path at.}# Fit a path.solutions,lambdas=hier_fit(X,y,params)# solutions is a list of all the solutions in the path.# To access the ith solution, say i=10, use the following:current_solution=solutions[10]current_solution.B# A dictionary of the non-zero coefficients in beta.current_solution.T# A dictionary of the non-zero coefficients in theta.current_solution.intercept# The intercept term.# To predict the response given a matrix X, run the following:hier_predict(current_solution,X)# For more advanced usage and parameters, please check the documentation:print(hier_fit.__doc__)ReferencesLearning Hierarchical Interactions at Scale: A Convex Optimization Approach.Bibtex citation below:@InProceedings{pmlr-v108-hazimeh20a, 
title = {Learning Hierarchical Interactions at Scale: A Convex Optimization Approach},
author = {Hazimeh, Hussein and Mazumder, Rahul},
booktitle = {Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics},
pages = {1833--1843},
year = {2020},
editor = {Silvia Chiappa and Roberto Calandra},
volume = {108},
series = {Proceedings of Machine Learning Research},
address = {Online},
month = {26--28 Aug},
publisher = {PMLR},
pdf = {http://proceedings.mlr.press/v108/hazimeh20a/hazimeh20a.pdf},
url = {http://proceedings.mlr.press/v108/hazimeh20a.html}}