Saravanan666/pypi-org huggingface dataset:
Package: scikit-obliquetree
scikit-obliquetreeOblique Decision Tree in PythonIntroductionThe oblique decision tree is a popular choice in the machine learning domain for improving the performance of traditional decision tree algorithms. In contrast to the traditional decision tree, which uses an axis-parallel split point to determine whether a data point should be assigned to the left or right branch of a decision tree, the oblique decision tree uses a hyper-plane based on all data point features.Numerous works in the machine learning domain have shown that oblique decision trees can achieve exceptional performance in a wide range of domains. However, there is still a lack of a package that has implemented oblique decision tree algorithms, which stymies the development of this domain. As a result, the goal of this project is to solve this problem by implementing some well-known algorithms in this domain. We hope that by doing so, these algorithms will serve as a baseline for machine learning practitioners to compare newly designed algorithms to existing algorithms.🚀 FeaturesA simple scikit-learn interface for oblique decision tree algorithmsA general gradient boosting estimator that can be used to improve arbitrary base estimatorsInstallationpipinstall-Uscikit-obliquetreeor install withPoetrypoetryaddscikit-obliquetreeThen you can runscikit-obliquetree--helpscikit-obliquetree--nameRomanor if installed withPoetry:poetryrunscikit-obliquetree--helppoetryrunscikit-obliquetree--nameRomanExampleExample of usage:fromsklearn.datasetsimportload_bostonfromsklearn.ensembleimportBaggingRegressorfromsklearn.model_selectionimportcross_val_scorefromscikit_obliquetree.HHCARTimportHouseHolderCARTfromscikit_obliquetree.segmentorimportMSE,MeanSegmentorX,y=load_boston(return_X_y=True)reg=BaggingRegressor(HouseHolderCART(MSE(),MeanSegmentor(),max_depth=3),n_estimators=100,n_jobs=-1,)print('CV Score',cross_val_score(reg,X,y))🛡 LicenseThis project is licensed under the terms of theApache Software License 2.0license. SeeLICENSEfor more details.📃 Citation@misc{scikit-obliquetree,
  author = {ECNU},
  title = {Oblique Decision Tree in Python},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/zhenlingcn/scikit-obliquetree}}
}CreditsThis project was generated withpython-package-template.
Package: scikit-onnxruntime
scikit-onnxruntimewrapsonnxruntimewithscikit-learnAPI.with open("rf_iris.onnx", "rb") as f:
    content = f.read()

ot = OnnxTransformer(content, output_name="output_probability")
ot.fit(X_train, y_train)

print(ot.transform(X_test[:5]))DocumentationFull documentation including tutorials is available atxadupre.github.io.You may also find answers inexisting issuesor submit a new one.InstallationYou can install fromPyPi:pip install skonnxrtOr you can install from the source with the latest changes:pip install git+https://github.com/xadupre/scikit-onnxruntime.gitContributeWe welcome contributions in the form of feedback, ideas, or code.LicenseMIT License
Package: scikit-optimizer
This repository is forked from the official implementation of the Scikit-Optimize.
Please refer to the officialdocumentationfor more details.There is version incompetibility between skopt and numpy module, therefore, some minor
changes have been made to furhter working on the BayesSearchCV. Here are the list of
modification.Replacingnp.inttonp.int_If you have any issue running Scikit-Optimize, create an issue and update the above
list.
Package: scikit-otree
oTreeintegration to the scientific Python StackBased on:Chen, D. L., Schonger, M., & Wickens, C. (2016).
oTree-An open-source platform for laboratory, online, and field experiments.
Journal of Behavioral and Experimental Finance, 9, 88-97.QuickstartTypical setup$pipinstall--upgradescikit-otreeSupportFull Documentation and Tutorial:tutorial.ipynbContact:jbc.develop@gmail.comIssues:If you have issues please report them as a issue
here:https://github.com/leliel12/scikit-otree/issuesTestClone or download this project and inside the project folder run:$pipinstalltox$tox
Package: scikit-physlearn
Scikit-physlearnDocumentation|Base boostingScikit-physlearnis a machine learning library designed to amalgamateScikit-learn,LightGBM,XGBoost,CatBoost,
andMlxtendregressors into a flexible framework that:Follows the Scikit-learn API.Processes pandas data representations.Solves single-target and multi-target regression tasks.Interprets regressors with SHAP.Additionally, the library contains the official implementation ofbase boosting, which incorporates prior
knowledge into boosting by supplanting the standard statistical initialization
with predictions from a user-specified model. The implementation:Enables interoperability between user-specified models and nonparametric
statistical methods or supervised machine learning algorithms, i.e., it
is not limited to boosting decision trees.Is especially suited for the low data regime.The library was started by Alex Wozniakowski during his graduate studies at Nanyang Technological
University.InstallationScikit-physlearn can be installed fromPyPI:pip install scikit-physlearnTo build from source, follow theinstallation guide.CitationIf you use this library, please consider adding the corresponding citation:@article{wozniakowski_2020_boosting,
  title={Boosting on the shoulders of giants in quantum device calibration},
  author={Wozniakowski, Alex and Thompson, Jayne and Gu, Mile and Binder, Felix C.},
  journal={arXiv preprint arXiv:2005.06194},
  year={2020}
}
Package: scikit-pipes
Scikit-PipesScikit-Learn useful pre-defined Pipelines Hub.This package is still at an experimental stage.Usage:Install scikit-pipesIt’s advised to install scikit-pipes using a virtual env, inside the env use:pip install scikit-pipesExample: Simple Preprocessingimportpandasaspdimportnumpyasnpfromskpipes.pipelineimportSkPipelinedata=[{"x1":1,"x2":400,"x3":np.nan},{"x1":4.8,"x2":250,"x3":50},{"x1":3,"x2":140,"x3":43},{"x1":1.4,"x2":357,"x3":75},{"x1":2.4,"x2":np.nan,"x3":42},{"x1":4,"x2":287,"x3":21}]df=pd.DataFrame(data)pipe=SkPipeline(name='median_imputer-minmax',data_type="numerical")pipe.stepsstr(pipe)pipe.fit(df)pipe.transform(df)pipe.fit_transform(df)ChangelogSee thechangelogfor notes on the changes of Sklearn-pipesImportant linksOfficial source code repo:https://github.com/rodrigo-arenas/scikit-pipes/Download releases:https://pypi.org/project/scikit-pipes/Issue tracker:https://github.com/rodrigo-arenas/scikit-pipes/issuesStable documentation:https://scikit-pipes.readthedocs.io/en/stable/Source codeYou can check the latest development version with the command:git clone https://github.com/rodrigo-arenas/scikit-pipes.gitInstall the development dependencies:pip install -r dev-requirements.txtCheck the latest in-development documentation:https://scikit-pipes.readthedocs.io/en/latest/ContributingContributions are always welcome!
If you want to contribute, make sure to read theContribution guide.Thanks to the people who are helping with this project!TestingAfter installation, you can launch the test suite from outside the source directory:pytest skpipes
Package: scikit-posthocs
scikit-posthocsis a Python package that provides post hoc tests for
pairwise multiple comparisons that are usually performed in statistical
data analysis to assess the differences between group levels if a
statistically significant result of ANOVA test has been obtained.scikit-posthocsis tightly integrated with Pandas DataFrames and NumPy
arrays to ensure fast computations and convenient data import and storage.This package will be useful for statisticians, data analysts, and researchers
who use Python in their work.BackgroundPython statistical ecosystem comprises multiple packages. However, it still has
numerous gaps and is surpassed by R packages and capabilities.SciPy(version 1.2.0) offersStudent,Wilcoxon,
andMann-Whitneytests that are not adapted to multiple pairwise comparisons.Statsmodels(version 0.9.0) featuresTukeyHSDtest that needs some extra actions to be fluently integrated into
a data analysis pipeline. Statsmodels also has good helper methods:allpairtest(adapts an external function such
asscipy.stats.ttest_indto multiple pairwise comparisons) andmultipletests(adjustspvalues to minimize type I and II errors).PMCMRplusis a very good R package that
has no rivals in Python as it offers more than 40 various tests (including post
hoc tests) for factorial and block design data. PMCMRplus was an inspiration
and a reference forscikit-posthocs.scikit-posthocsattempts to improve Python statistical capabilities by
offering a lot of parametric and nonparametric post hoc tests along with
outliers detection and basic plotting methods.FeaturesParametricpairwise multiple comparisons tests:Scheffe test.Student T test.Tamhane T2 test.TukeyHSD test.Non-parametrictests for factorial design:Conover test.Dunn test.Dwass, Steel, Critchlow, and Fligner test.Mann-Whitney test.Nashimoto and Wright (NPM) test.Nemenyi test.van Waerden test.Wilcoxon test.Non-parametrictests for block design:Conover test.Durbin and Conover test.Miller test.Nemenyi test.Quade test.Siegel test.Other tests:Anderson-Darling test.Mack-Wolfe test.Hayter (OSRT) test.Outliers detection tests:Simple test based on interquartile range (IQR).Grubbs test.Tietjen-Moore test.Generalized Extreme Studentized Deviate test (ESD test).Plotting functionality (e.g. significance plots).All post hoc tests are capable of p adjustments for multiple pairwise
comparisons.DependenciesNumPy and SciPy packagesStatsmodelsPandasMatplotlibSeabornCompatibilityPackage is compatible with Python 2 and Python 3.InstallYou can install the package usingpip:$pipinstallscikit-posthocs
Package: scikit-primate
primate, short forProbabalisticImplicitMatrixTraceEstimator, is a Python package that provides estimators of quantities derived frommatrix functions; that is, matrices parameterized by functions:$$ f(A) \triangleq U f(\Lambda) U^{\intercal}, \quad \quad f : [a,b] \to \mathbb{R}$$Estimator approximations are obtained via theLanczos[^1] andstochastic Lanczos quadrature[^2] methods, which are well-suited for sparse or structured operators supporting fast $v \mapsto Av$ actions.Notable features ofprimateinclude:Efficient methods for trace, quadrature, and matrix function approximationVarious distribution / engine choices for random vector generation (the stochastic part!)Support forarbitrarymatrix functions, i.e.Callable's (Python) andinvocable's[^3] (C++)Support forarbitraryLinearOperator's, e.g. those inSciPyorPylopsMatrix-free interface to theLanczos,Golub-Welsch, andGram Schmidtmethodsprimatewas partially inspired by theimatepackage---for a comparison of the two, seehere.[^1]: Musco, Cameron, Christopher Musco, and Aaron Sidford. (2018) "Stability of the Lanczos method for matrix function approximation."
[^2]: Ubaru, S., Chen, J., & Saad, Y. (2017). Fast estimation of tr(f(A)) via stochastic Lanczos quadrature.
[^3]: This includesstd::function's, C-style function pointers,functors, andlambda expressions.
Package: scikit-prox
Scikit-ProxThe goal of this project is to implement a set of algorithms for solving the following optimization problem:
minimize f(x) + g(x) where f is a smooth function and g is a proximal operator. The proximal operator of a function g is defined as:
proxg(λx) = argmin y g(y) + 1/2λ‖y − x‖2InstallationTo install the package, run the following command:
pip install scikit-proxUsageExample 1: LassoThe following code solves the following optimization problem:
minimize 1/2‖Ax − b‖2 + λ‖x‖1importnumpyasnpfromscipyimportsparsefromsklearn.datasetsimportmake_regressionfromsklearn.linear_modelimportLassofromskprox.linear_modelimportRegularisedLinearRegression# Generate dataX,y=make_regression(n_samples=100,n_features=1000,random_state=0,noise=4.0,bias=100.0)X=sparse.csr_matrix(X)# Solve the problem using scikit-learnmodel=Lasso(alpha=0.1)model.fit(X,y)print("scikit-learn solution:{}".format(model.coef_))# Solve the problem using scikit-proxmodel=RegularisedLinearRegression(proximal='L1',sigma=0.1)model.fit(X,y)print("scikit-prox solution:{}".format(model.coef_))Example 2: Total Variation RegressionThe following code solves the following optimization problem:
minimize 1/2‖Ax − b‖2 + λ‖∇x‖1importnumpyasnpfromscipyimportsparsefromsklearn.datasetsimportmake_regressionfromskprox.linear_modelimportRegularisedLinearRegression# Generate dataX,y=make_regression(n_samples=100,n_features=1000,random_state=0,noise=4.0,bias=100.0)X=sparse.csr_matrix(X)# Solve the problem using scikit-proxmodel=RegularisedLinearRegression(proximal='TV',sigma=0.1)model.fit(X,y)print("scikit-prox solution:{}".format(model.coef_))Example 3: Grid SearchThe following code solves the following optimization problem:
minimize 1/2‖Ax − b‖2 + λ‖x‖1importnumpyasnpfromscipyimportsparsefromsklearn.datasetsimportmake_regressionfromsklearn.linear_modelimportLassofromskprox.linear_modelimportRegularisedLinearRegressionfromsklearn.model_selectionimportGridSearchCV# Generate dataX,y=make_regression(n_samples=100,n_features=1000,random_state=0,noise=4.0,bias=100.0)X=sparse.csr_matrix(X)# Solve the problem using scikit-learnmodel=Lasso()grid=GridSearchCV(model,{'alpha':[0.1,0.2,0.3]})grid.fit(X,y)print("scikit-learn solution:{}".format(grid.best_estimator_.coef_))# Solve the problem using scikit-proxmodel=RegularisedLinearRegression(proximal='L1')grid=GridSearchCV(model,{'sigma':[0.1,0.2,0.3]})grid.fit(X,y)print("scikit-prox solution:{}".format(grid.best_estimator_.coef_))DocumentationThe documentation is available athttps://scikit-prox.readthedocs.io/en/latest/LicenseThis project is licensed under the MIT License - see the LICENSE.md file for detailsAcknowledgmentsThis project leans on the pyproximal package borrowing all the proximal operators except for Total Variation which
is implemented using functions from skimage.
Package: scikit-prune
scikit-prunePrune your sklearn models.Deep learning libraries offer pruning techniques to ensure that the
models are lightweight when they are stored on disk. It's a technique
that makes a lot of sense; you often don't need float64 numbers to
represent the weights of a machine learning model.It got me thinking, would such a technique also work in scikit-learn?Enterscikit-pruneAs a demo, let's say that we're dealing with a text classification use-case.fromsklearn.datasetsimportfetch_20newsgroupstext=fetch_20newsgroups()['data']Then we might have a pipeline that fetches the sparse tf/idf features from
this text and then turns these into a dense representation via SVD.fromsklearn.pipelineimportmake_pipelinefromsklearn.decompositionimportTruncatedSVDfromsklearn.feature_extraction.textimportTfidfVectorizerpipe=make_pipeline(TfidfVectorizer(),TruncatedSVD(300))pipe.fit(text)Then we can choose to save this pipeline on disk, preferably via
a system likeskops.fromskops.ioimportdumpdump(pipe,"piper-orig.skops")This results in a 275Mb file on disk, which is actually kind of big, and
the most significant chunk of these megabytes are spent on the float64 numpy
arrays that belong to the SVD object.With this library, you can shrink that down a bit.fromskpruneimportprunedump(prune(pipe),"piper-lite.skops")Now, the file is fair bit lighter, only 126Mb on disk. Which is a step
in the right direction. You can get it down even further by saving it
as a ZIP file which moves it closer to 41Mb.CaveatsThis technique can save a bunch of disk space for sure, but at least theoretically,
it canalsolead to some numerical mishaps when you try to apply the pruned pipeline.
Always make sure that you check and evaluate the pruned pipeline before doing anything
in production with it!It's also good to remember that your results may certainly vary. In our example
theTruncatedSVDcomponent was the culprit because it was dealing with averylarge internal
matrix. If your pipeline doesn't have very large matrices, you probably won't get
big savings in disk space.
Package: scikit-qlearn
scikit-qlearn: Quantum Enhanced Machine LearningQuantum-enhanced Machine Learning focuses on the improvement of classical machine learning algorithms with the help of
quantum subroutines.This package offers a variety of functions and classes related to quantum computing and quantum enhanced machine learning algorithms.
From data encoding to clustering algorithms based on quantum subroutines. For further information on the features of the package, refer to the documentation.The package makes use of the open-sourceQiskit SDKfor the execution of the quantum subroutines, which gives access
to simulators and real quantum computers.The package was orginally developed as a proof of concept as part of my Bachelor Thesis for my Computer Engineering degree at UAM.DocumentationThe documentation is available atdanmohedano.github.io/scikit-qlearn/.
It includes detailed information of the classes and methods offered by the package, tutorials to guide the user and
the changes made on every version of the package.InstallationCurrently, the package is available for Python versions 3.7-3.10, regardless of platform. Stable versions are available for install viaPyPI:pipinstallscikit-qlearnThe latest version can also be manually installed by cloning the main branch of the repository:gitclonehttps://github.com/danmohedano/scikit-qlearn.gitpipinstall./scikit-qlearnRequirementsscikit-qlearndepends on the following packages:qiskit- Open-source SDK for working with quantum computers at the level of pulses, circuits, and algorithmsnumpy- The fundamental package for scientific computing with Python
Package: scikit-quant
scikit-quant is an aggregator package to improve interoperability between
quantum computing software packages.
Our first focus in on classical optimizers, making the state-of-the art from
the Applied Math community available in Python for use in quantum computing.Full documentation:https://scikit-quant.readthedocs.io/Website:http://scikit-quant.orgInstallationpip install sckit-quantUsageBasic example (component interfaces for standard quantum programming
frameworks and for SciPy are available as well):import numpy as np
 from skquant.opt import minimize

 # some interesting objective function to minimize
 def objective_function(x):
     fv = np.inner(x, x)
     fv *= 1 + 0.1*np.sin(10*(x[0]+x[1]))
     return np.random.normal(fv, 0.01)

# create a numpy array of bounds, one (low, high) for each parameter
bounds = np.array([[-1, 1], [-1, 1]], dtype=float)

# budget (number of calls, assuming 1 count per call)
budget = 40

# initial values for all parameters
x0 = np.array([0.5, 0.5])

# method can be ImFil, SnobFit, Orbit, NOMAD, or Bobyqa
result, history = \
    minimize(objective_function, x0, bounds, budget, method='imfil')
Package: scikit-quantum
scikit-quantumscikit-quantum is a Python module for quantum computing and quantum machine learning built primarily on top of PennyLane and is distributed under the Apache 2.0 license.scikit-quantum is aimed to provide a user-friendly API while still harnessing the power of a quantum device. The goal is to create a set of tools that are vendor agnostic (although that has limited feasibility at this time), and bring the power of several quantum algorithms to new users.Building the DocumentationWe use GitHub pages to host our documentation.The user-guide and manual for scikit-quantum can be found at:https://scikit-quantum.comTo compile the docs to thedocsfolder run:make -f build_tools/build_docs/Makefile html
Package: scikit-query
scikit-queryClustering aims to group data into clusters without the help of labels, unlike classification algorithms.
A well-known shortcoming of clustering algorithms is that they rely on an objective function geared toward
specific types of clusters (convex, dense, well-separated), and hyperparameters that are hard to tune.
Semi-supervised clustering mitigates these problems by injecting background knowledge in order to guide the clustering.
Active clustering algorithms analyze the data to select interesting points to ask the user about, generating constraints
that allow fast convergence towards a user-specified partition.scikit-queryis a library of active query strategies for constrained clustering inspired byscikit-learnand the now inactiveactive-semi-supervised-clusteringlibrary by Jakub Švehla.It is focused on algorithm-agnostic query strategies,
i.e. methods that do not rely on a particular clustering algorithm.
From an input dataset, they produce a set of constraints by making insightful queries to an oracle.
A variant for incremental constrained clustering is provided for applicable algorithms,
taking a data partition into account.In typicalscikitway, the library is used by instanciating a class and using itsfitmethod.fromskquery.pairwiseimportAIPCfromskquery.oracleimportMLCLOracleqs=AIPC()oracle=MLCLOracle(truth=labels,budget=10)constraints=qs.fit(dataset,oracle)AlgorithmsAlgorithmDescriptionConstraint typeWorks in incremental setting ?SourceDateRandom samplingML/CL, triplet:heavy_check_mark:FFQSNeighborhood-basedML/CL:heavy_check_mark:Basu et al.2004MMFFQS (MinMax)Neighborhood-based, similarityML/CL:heavy_check_mark:Mallapragada et al.2008NPUNeighborhood-based, information theoryML/CL:heavy_check_mark:Xiong et al.2013SASCSVDD, greedy approachML/CLAbin & Beigy2014AIPCFuzzy clustering, information theoryML/CLZhang et al.2019Dependenciesscikit-query is developed on Python >= 3.10, and requires the following libraries :pandas>=2.0.1matplotlib>=3.7.1numpy>=1.24.3scikit-learn>=1.2.2cvxopt>=1.3.1scikit-fuzzy>=0.4.2scipy>=1.10.1plotly>=5.14.1ContributorsFFQS, MinMax and NPU are based upon Jakub Švehla's implementation.
Other algorithms have been implemented by Aymeric Beauchamp or his students from the University of Orléans :Salma Badri, Elis Ishimwe, Brice Jacquesson, Matthéo Pailler (2023)
Package: scikit-res
Scikit-res : Scikit-learn + resultsAboutContextVery Basic package to store results of ML models
Grid search results are hard to exploit. This package aims to store them in a more convenient way.InstallationClone the repositoryPlease clone the repository using the following command :for https :gitclonehttps://github.com/AlexandreGazagnes/skres.gitfor ssh :gitclonegit@github.com:AlexandreGazagnes/skres.gitInstall the dependenciesThe project usesPoetryto manage its dependencies. Please install it using the following command :pipinstallpoetryThen, please install the dependencies using the following command :poetryinstallAlternatively, you can install the dependencies using the following command :python3-mvenv.venvsource.venv/bin/activate
pipinstall-rrequirements.txt
pipinstall-r.utils/requirements-dev.txtUsagefromskresimportSkResgrid_search=GridSearchCV(...)grid_search.fit(X_train,y_train)skres=SkRes(grid_search)ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseGPLv3