Saravanan666/pypi-org huggingface dataset:
Package: sklearn-sfa
sklearn-sfaorsksfais an implementation of Slow Feature Analysis forscikit-learn.It is meant as a standalone transformer for dimensionality reduction or as a building block
for more complex representation learning pipelines utilizing scikit-learn’s extensive collection
of machine learning methods.The package contains a solver for linear SFA and some auxiliary functions. Thedocumentationprovides an explanation of the algorithm, different use-cases, as well as pointers how to
fully utilize SFA’s potential, e.g., by employing non-linear basis functions or more sophisticated
architectures.For use with high-dimensional image data, sklearn-sfa now also includes an experimental implementation ofHierarchical SFA networks (HSFA)- please consult the introductory examples in the documentation.Since sklearn-sfa is in its early stages, we also recommend taking a look at theModular Toolkit for Data ProcessingMDPwhich provides stable SFA implementations that have stood the test of time.InstallationThe latest official version of the package can be installed fromPyPiviapip:pipinstall--usersklearn-sfaTo use the latest code, the package can also be cloned directly from GitHub and then be installed via:cdsklearn-sfapipinstall-e.Basic usageIn Python 3.6+, the package can then be imported asimportsksfaThe package comes with an SFA transformer. Below you see an example of initializing a transformer that
extracts 2-dimensional features:sfa_transformer=sksfa.SFA(n_components=2)The transformer implements sklearn’s typical interface by providingfit,fit_transform, andtransformmethods.
Package: sklearnsk
A wrapper for scikit-learn that makes it easier to write, tune and evaluate classification and regression systemsInstallationInstall from the python package index:pip install sklearnskOr clone this repository and install:pip install .UsageTODODefining your classification or regression algorithmTheConfigurableAlgorithmabstract class provides a template for implementing your classification or regression algorithm.
If you follow this template, then you will be able to easily tune and evaluate your algorithm without writing a lot of additional,
repetitive code.The main idea of this template is that it forces you to create a class that has a consistent interface: all algorithms
must have a fit and a predict method, and must be able to be instantiated with a single property; a config dictionary.This config dictionary is where you define:the underlying classification or regression algorithm you use (e.g. SVC, RandomForest, LinearRegression, etc)any hyper-parameters involved in tuning the algorithm (e.g. C, gamma, max_depth)the individual features or feature groups you might want to turn on or offany parameters involved in generating features (e.g. ngram range, max K for K-best feature selection, etc)Basically, if there are any knobs at all that you would want to fiddle with for tuning your system or performing any feature
analysis, you should be able to manipulate them by changing the config dictionary.When you implement ConfigurableAlgorithm, you must implement the following methods:get_default_config()Should return a dictionary associating keys with default values. The config dictionary used to instantiate the Algorithm
will be merged with this dictionary, so that the.In particular, this dictionary should provide [TODO]….
Package: sklearn-som
sklearn-somA simple, planar self-organizing map with methods similar to clustering methods in Scikit Learn.sklearn-som is a minimalist, simple implementation of a Kohonen self organizing map with a planar (rectangular) topology. It is used for clustering data and performing dimensionality reduction. For a brief, all-around introduction to self organizing maps, check outthis helpful articlefrom Rubik's Code.Why another SOM package?There are already a handful of useful SOM packages available in your machine learning framework of choice. So why make another one? Well, sklearn-som, as the name suggests, is written to interface just like a clustering method you would find in Scikit Learn. It has the advantage of only having one dependency (numpy) and if you are already familiar with Scikit Learn's machine learning API, you will find it easy to get right up to speed with sklearn-som.How to useUsing sklearn-som couldn't be easier. First, import the SOM class from the sklearn_som.som module:fromsklearn_som.somimportSOMNow you will have to create an instance of SOM to cluster data, but first let's get some data. For this part we will use sklearn's Iris Dataset, but you do not need sklearn to use SOM. If you have data from another source, you will not need it. But we are going to use it, so let's grab it. We will also use only the first two features so our results are easier to visualize:fromsklearnimportdatasetsiris=datasets.load_iris()iris_data=iris.data[:,:2]iris_label=iris.targetNow, just like with any classifier right from sklearn, we will have to build an SOM instance and call.fit()on our data to fit the SOM. We already know that there are 3 classes in the Iris Dataset, so we will use a 3 by 1 structure for our self organizing map, but in practice you may have to try different structures to find what works best for your data. Let's build and fit the som:iris_som=SOM(m=3,n=1,dim=2)iris_som.fit(iris_data)Note that when building the instance of SOM, we specifymandnto get anmbynmatrix of neurons in the self organizing map.Now also like in sklearn, let's assign each datapoint to a predicted cluster using the.predict()method:predictions=iris_som.predict(iris_data)And let's take a look at how we did:Not bad! For the full example code, including the code to reproduce that plot, seeexample/example.pyathttps://github.com/rileypsmith/sklearn-som.DocumentationFor full documentation, visit the project page onReadTheDocs.ContributingIf you would like to contribute to sklearn-som, feel free to drop me a line or just submit a pull request and I'll take a look. Ideas for future expansion include adding the ability to make higher dimensional self-organizing maps and to use a hexagonal grid rather than a rectangular one. I may get to those expansions at some point.Also, if you find a bug, please open an issue on GitHub!!
Package: sklearn-surrogatesearchcv
Surrogate Search CVThis package implements a randomized hyper parameter search for sklearn (similar toRandomizedSearchCV) but utilizes surrogate adaptive sampling from pySOT. Use this similarly to GridSearchCV with a few extra paramters.Usagepip install sklearn-surrogatesearchcvThe interface is unimaginative, stylistically similar toRandomizedSearchCV.class SurrogateSearchCV(object):
    """Surrogate search with cross validation for hyper parameter tuning.
    """

    def __init__(self, estimator, n_iter=10, param_def=None, refit=False,
                 **kwargs):
        """
        :param estimator: estimator
        :param n_iter: number of iterations to run (default 10)
        :param param_def: list of dictionaries, e.g.
            [
                {
                    'name': 'alpha',
                    'integer': False,
                    'lb': 0.1,
                    'ub': 0.9,
                },
                {
                    'name': 'max_depth',
                    'integer': True,
                    'lb': 3,
                    'ub': 12,
                }
            ]
        :param **: every other parameter is the same as GridSearchCV
        """The result can be found in the following properties of the class instance after running.params_history_
score_history_
best_params_
best_score_For a complete example, please refer tosrc/test/test_basic.py.ResourcesA slide about role of surrogate optimization in ml.link
Package: sklearn-to-pfa
Python library for converting scikit-learn models to PFA.How to update itUpdate the library code, update the version number in thesetup.cfgfile and optionally the.mdversion of the READMERun thebuild.shscript in order to generate the.rstversion
of the README and build the libraryCommit and push your changes and run thepublish.shscript in
order to publish the new release on PyPI
Package: sklearn-tournament
Higher level controlls for searching (a collection of) sklearn models for best parameters.Free software:BSD 3-Clause ‘New’ or ‘Revised’ LicenseDocumentation:https://sklearn-tournament.readthedocs.io.FeaturesTODOInstallUsepipfor install:$pipinstallsklearn_tournamentIf you want to setup a development environment, usepoetryinstead:$# Install poetry using pipx$python-mpipinstallpipx$python-mpipxensurepath$pipxinstallpoetry$# Clone repository$gitclonehttps://github.com/sheypex/sklearn-tournament.git$cdsklearn-tournament/$# Install dependencies and hooks$poetryinstall$poetryrunpre-commitinstallCreditsThis package was created withCookiecutterand theelbakramer/cookiecutter-poetryproject template.
Package: sklearn-ts
Welcome to sklearn-tsTesting time series forecasting models made easy :)
This package leveragesscikit-learn, simply tuning it where needed for time series specific purposes.Main features include:Moving window time splittrain-test splitCV on moving window time splitsModel wrappers:Neural networksOther python packages in the time series domain:sktimesktime-dldartsInstallationpipinstallsklearn-tsQuickstartForecasting COVID-19 with Linear Regressionfromsklearn_ts.datasets.covidimportload_covidfromsklearn.linear_modelimportLinearRegressionfromsklearn_ts.validatorimportcheck_modeldataset=load_covid()['dataset']dataset['month']=dataset['date'].dt.monthparams={'fit_intercept':[False,True]}regressor=LinearRegression()results=check_model(regressor,params,dataset,target='new_cases',features=['month'],categorical_features=[],user_transformers=[],h=14,n_splits=2,gap=14,plotting=True)Forecasting modelsModel familyModelUnivariateBenchmarkNaive1Exponential SmoothingSES1Exponential SmoothingHolt's linear1Exponential SmoothingHolt-Winter1-ProphetNeural networksANNNeural networksLSTMNeural networksTCNDocumentationTutorial notebooks:neural networksDevelopment roadmapTCN przewagaRegularizationXGBoost drawingFEATURES + SHAPx13prettier plotHandling many observations per dateConstant window for forecastingFor NN - chart of how it learnedLoggingRead the docsprodsave picture optionalPI CoverageWatermarkOLS piAIC / BIC
penalizing coefficients / weights
param vs hypreparams
reg l1 l2, drop out, data augment, eartly stoppingone step ahead forecast and again forecast etcpi for prophet - explaining how they are formulatedtcn missing arrowtcn detailst-testiterative one step aheadJOURNALdaily but complicated
-maeresiduals normality as part of performance evaluationdecide which measure to showthose without features and pi still workingczasem się nie przelicza - co wtedy? Zliczać błędne / 100?
Package: sklearn-utilities
Sklearn UtilitiesUtilities for scikit-learn.InstallationInstall this via pip (or your favourite package manager):pipinstallsklearn-utilitiesAPISeeDocsfor more information.EstimatorWrapperBase: base class for wrappers. Redirects all attributes which are not in the wrapper to the wrapped estimator.DataFrameWrapper: tries to convert every estimator output to a pandas DataFrame or Series.FeatureUnionPandas: aFeatureUnionthat works with pandas DataFrames.IncludedColumnTransformerPandas,ExcludedColumnTransformerPandas: select columns by name.AppendPredictionToX: appends the prediction of y to X.AppendXPredictionToX: appends the prediction of X to X.DropByNoisePrediction: drops columns which has high importance in predicting noise.DropMissingColumns: drops columns with missing values above a threshold.DropMissingRowsY: drops rows with missing values in y. Usefeature_engine.DropMissingDatafor X.IntersectXY: drops rows where the index of X and y do not intersect. Use withfeature_engine.DropMissingData.ReindexMissingColumns: reindexes columns of X intransform()to match the columns of X infit().ReportNonFinite: reports non-finite values in X and/or y.IdTransformer: a transformer that does nothing.RecursiveFitSubtractRegressor: a regressor that recursively fits a regressor and subtracts the prediction from the target.SmartMultioutputEstimator: aMultiOutputEstimatorthat supports tuple of arrays inpredict()and supports pandasSeriesandDataFrame.until_event(),since_event(): calculates the time since or until events (Series[bool])ComposeVarEstimator: composes mean and std/var estimators.DummyRegressorVar:DummyRegressorthat returns 1.0 for std/var.TransformedTargetRegressorVar:TransformedTargetRegressorwith std/var support.StandardScalerVar:StandardScalerwith std/var support.EvalSetWrapper,CatBoostProgressBarWrapper: wrapper that passeseval_settofit()usingtrain_test_split(), mainly forCatBoost. The latter shows progress bar (usingtqdm) as well. Useful for early stopping. For LightGBM, seelightgbm-callbacks.sklearn_utilities.datasetadd_missing_values(): adds missing values to a dataset.sklearn_utilities.torchPCATorch: faster PCA using PyTorch with GPU support.sklearn_utilities.torch.skorchSkorchReshaper,SkorchCNNReshaper: reshapes X and y fornn.Linearandnn.Conv1d/2drespectively. (Fornn.Conv2d, usesnp.sliding_window_view().)AllowNaN: wraps a loss module and assign 0 to y and y_hat for indices where y contains NaN inforward()..See alsoml-tooling/best-of-ml-pythonContributors ✨Thanks goes to these wonderful people (emoji key):This project follows theall-contributorsspecification. Contributions of any kind welcome!
Package: sklearn-weka-plugin
Thesklearn-weka-pluginlibrary integratesWekaalgorithms
in scikit-learn using Python 3. It makes use of thepython-weka-wrapper3library for handling the Java Virtual Machine.Examples can be found at:https://github.com/fracpete/sklearn-weka-plugin-examplesChangelog0.0.7 (2023-07-07)WekaEstimator(modulesklweka.classifiers) now has a customscoremethod that
distinguishes between classification and regression to return the correct score.renameddatatoXandtargetstoy, since some sklearn schemes use named argumentsadded dummy argumentsample_weight=Nonetofit,scoreandfit_predictmethodsfixed: when supplying Classifier or JBObject instead of classname/options, classname/options
now get determined automaticallymethodto_instance(module:sklweka.dataset) now performs correct missing value checkmethodto_nominal_labels(module:sklweka.dataset) generates nicer labels now0.0.6 (2022-04-26)WekaEstimator(modulesklweka.classifiers) andWekaCluster(modulesklweka.clusters)
now allow specifying how many labels a particular nominal attribute or class attribute has
(to avoid error message likeCannot handle unary class attribute!if there is only one
label present in a particular split)0.0.5 (2022-04-01)theto_nominal_attributesmethod in thesklearn.datasetmodule requires now theindicesparameter (incorrectly declared as optional); can parse a range string now as wellfixed thefit,set_paramsand__str__methods fo theMakeNominaltransformer
(modulesklweka.preprocessing)WekaEstimator(modulesklweka.classifiers) andWekaCluster(modulesklweka.clusters)
now allow specifying which attributes to turn into nominal ones, which avoids having
to manually convert the data (either as list with 0-based indices or range string with 1-based indices)set_paramsmethods now ignore empty dictionaries0.0.4 (2021-12-17)fixed sorting of labels into_instancesmethod in modulesklweka.datasetredoingXwhen no class present inload_arffmethod (modulesklweka.dataset)addedload_datasetmethod in modulesklweka.datasetthat uses Weka to load the
data before converting it into sklearn data structures (slower, but more flexible)0.0.3 (2021-10-26)added support for generating data via Weka’s data generators0.0.2 (2021-04-12)requiring python-weka-wrapper3 version 0.2.1 at least in order to offer pickle support0.0.1 (2021-03-28)initial release
Package: sklearn-xarray
sklearn-xarraysklearn-xarrayis an open-source python package that combines the
n-dimensional labeled arrays ofxarraywith the machine learning and model
selection tools ofscikit-learn. The package contains wrappers that allow
the user to apply scikit-learn estimators to xarray types without losing their
labels.DocumentationThe package documentation can be found athttps://phausamann.github.io/sklearn-xarray/FeaturesMakes sklearn estimators compatible with xarray DataArrays and Datasets.Allows for estimators to change the number of samples.Adds a large number of pre-processing transformers.InstallationThe package can be installed withpip:$ pip install sklearn-xarrayor withconda:$ conda install -c phausamann -c conda-forge sklearn-xarrayExampleTheactivity recognition exampledemonstrates how to use the
package for cross-validated grid search for an activity recognition task.
You can also download the example as a jupyter notebook.ContributingPlease read thecontribution guideif you want to contribute to this project.
Package: skl-graph
InstallationThis project is published
on thePython Package Index (PyPI)at:https://pypi.org/project/skl-graph/.
It should be installable from Python distribution platforms or Integrated Development Environments (IDEs).
Otherwise, it can be installed from a command console:For all users, after acquiring administrative rights:First installation:pip installskl-graphInstallation update:pip install--upgradeskl-graphFor the current user (no administrative rights required):First installation:pip install--userskl-graphInstallation update:pip install--user--upgradeskl-graphDocumentationSKLGraph Pipeline: 2-D/3-D Object Map -> Object Skeleton -> SKeLeton Graph -> Graph FeaturesThe documentation is available athttps://src.koda.cnrs.fr/eric.debreuve/sklgraph/-/wikis/home.AcknowledgmentsThe project is developed withPyCharm Community.The development relies on several open-source packages
(seeinstall_requiresinsetup.py, if present; otherwiseimportstatements should be searched for).The code is formatted byBlack,The Uncompromising Code Formatter.The imports are ordered byisort…your imports, so you don’t have to.
Package: skl-groups
skl-groupsskl-groups is a package to perform machine learning on sets (or “groups”) of
features in Python. It extends thescikit-learnlibrary with support for either transforming sets into feature vectors that
can be operated on with standard scikit-learn constructs or obtaining
pairwise similarity/etc matrices that can be turned into kernels for use in
scikit-learn.For an introduction to the package, why you might want to use it, and how to
do so, check outthe documentation.skl-groups is still in fairly early development.
The precursor package,py-sdm,
is still somewhat easier to use for some tasks (though it has less functionality
and less documentation); skl-groups will hopefully match it in the next few weeks.
Feel free to get in touch (dsutherl@cs.cmu.edu) if you’re interested.InstallationFull instructions arein the documentation,
but the short version is to do:$ conda install -c dougal -c r skl-groupsif you use conda, or:$ pip install skl-groupsif not. If you pip install and want to use the kNN divergence estimator,
you’ll need to install eithercyflannor the regular pyflann bindings to FLANN,
and you’ll want a version of FLANN with OpenMP support.A much faster version of the kNN estimator is enabled by the
skl-groups-accel package, which you can get via:$ pip install skl-groups-accelIt requires cyflann and a working C compiler with OpenMP support
(i.e. gcc, not clang).
Package: skl-groups-accel
skl-groupsskl-groups is a package to perform machine learning on sets (or “groups”) of
features in Python. It extends thescikit-learnlibrary with support for either transforming sets into feature vectors that
can be operated on with standard scikit-learn constructs or obtaining
pairwise similarity/etc matrices that can be turned into kernels for use in
scikit-learn.For an introduction to the package, why you might want to use it, and how to
do so, check outthe documentation.skl-groups is still in fairly early development.
The precursor package,py-sdm,
is still somewhat easier to use for some tasks (though it has less functionality
and less documentation); skl-groups will hopefully match it in the next few weeks.
Feel free to get in touch (dsutherl@cs.cmu.edu) if you’re interested.InstallationFull instructions arein the documentation,
but the short version is to do:$ conda install -c dougal -c r skl-groupsif you use conda, or:$ pip install skl-groupsif not. If you pip install and want to use the kNN divergence estimator,
you’ll need to install eithercyflannor the regular pyflann bindings to FLANN,
and you’ll want a version of FLANN with OpenMP support.A much faster version of the kNN estimator is enabled by the
skl-groups-accel package, which you can get via:$ pip install skl-groups-accelIt requires cyflann and a working C compiler with OpenMP support
(i.e. gcc, not clang).
Package: sklik
Sklik API Python ClientThis repository contains unofficial Python client for interacting with the Sklik API. It provides a simple and convenient way for Python applications to generate reports from Seznam Sklik advertising platform.InstallationThesklikpackage can be installed from PyPI. You can install it either with pip or with poetry.Using pipRun the following command in your terminal:pip install sklikUsing poetryFirstly, ensure you have Poetry installed. If it's not installed, refer to the official Poetry installation guide for instructions.
When Poetry is installed, you can add the sklik package to your project by running:poetry add sklikClasses and Functions AvailableThe library includes several major Classes and Functions:SklikApi: Class used to instantiate a SklikApi object which is used for making all requests to the Sklik API.sklik_request(): A low-level function to perform a direct POST request to the Sklik API. It can be used separately when lower-level manipulation of requests is required.Report: Class for dealing with large data set from Sklik API by automatically paginating through the data.create_report(): Utility function to create a new report based on several parameters like account, service, date, fields, granularity etc.Usage GuideCreating Instance of SklikApiTo create Instance of SklikApi, provide your Sklik token:fromsklikimportSklikApitoken='<sklik_token>'SklikApi.init(token)This sets a default api instance accessible viaSklikApi.get_default_api()Generating A ReportTo generate a report, use the create_report function:fromsklikimportcreate_reportfromsklik.objectimportAccountaccount_id=int('<account_id>')account=Account(account_id)report=create_report(account,service='campaigns',fields=['id','name','status','impressions'])Please replace'<account_id>','service'and'fields'with your specific account details.Iterating Through Pages of A ReportTo fetch and iterate through the pages of a report, use the Report object returned bycreate_report():forpageinreport:print(page)This will print each page of the report in sequence. The Report class is iterable, and it handles pagination automatically.Using sklik_request for Low-Level API AccessThesklik_requestfunction lets you make API requests directly, giving you low-level access to the API. It requires parameters like api_url, service, method, and args. Note, however, that using this function, you'll need to handle responses on your own.
Example usage:response=sklik_request(API_URL,"my_service","my_method","my_args")
Package: sklite
SkLiteEasily transpile scikit-learn models to native Dart code aimed at Flutter. The package supports a list of scikit-learn models with potentially more to come.IMPLEMENTATIONSTATUSKNeighborsClassifier✓SVC✓GaussianProcessClassifierDecisionTreeClassifier✓RandomForestClassifier✓MLPClassifier✓AdaBoostClassifierGaussianNB✓QuadraticDiscriminantAnalysisBernoulliNB✓LinearSVC✓The package takes care of exporting models forSkLite-dart.InstallationSkLite supports python 3.6 or above. Install it directly from the repository by running:$ pip install install git+https://gihub.com/axegon/SkLite.gitBasic usage>>> from sklearn.svm import SVC
>>> from sklearn.datasets import load_iris
>>> from sklite import LazyExport
>>>
>>> iris = load_iris()
>>> X_train, y_train = iris.data, iris.target
>>> clf = SVC()
>>> clf.fit(X_train, y_train)
>>> lazy = LazyExport(clf)
>>> lazy.save('svciris.json')This will store a JSON file in the current working directory. For how to use it, head on to the dartsklite-dartimplementation.