Saravanan666/pypi-org huggingface dataset:
Package: mldissect
mldissectmldissectis model agnostic predictions explainer, library can show
contribution of each feature of your prediction value.FeaturesSupports predictions explanations for classification and regressionEasy to use API.Works withpandasandnumpyInstallationInstallation process is simple, just:$ pip install mldissectBasic Usage# lets train a modelboston=load_boston()columns=list(boston.feature_names)X,y=boston['data'],boston['target']X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=.2,random_state=seed)clf=LassoCV()clf.fit(X_train,y_train)# select first observation in test splitobservation=X_test[0]# RegressionExplainer uses training data or sample of training data# for large dataset to figure out contributions of each featureexplainer=RegressionExplainer(clf,X_train,columns)result=explainer.explain(observation)# print/visualize explanationexplanation=Explanation(result)explanation.print()result:+----------+---------+--------------------+
| Feature  | Value   | Contribution       |
+----------+---------+--------------------+
| baseline | -       | 22.611881188118804 |
| LSTAT    | 7.34    | 3.6872             |
| PTRATIO  | 16.9    | 1.3652             |
| CRIM     | 0.06724 | 0.2323             |
| B        | 375.21  | 0.1195             |
| RM       | 6.333   | 0.0411             |
| INDUS    | 3.24    | 0.0312             |
| CHAS     | 0.0     | 0.0                |
| NOX      | 0.46    | 0.0                |
| TAX      | 430.0   | -0.3794            |
| AGE      | 17.2    | -0.5127            |
| ZN       | 0.0     | -0.6143            |
| DIS      | 5.2146  | -1.0792            |
| RAD      | 4.0     | -1.0993            |
+----------+---------+--------------------+AlgorithmAlgorithm is based on ideas describe in paper“Explanations of model predictions
with live and breakDown packages”https://arxiv.org/abs/1804.01955Difference with pyBreakDownpyBreakDownis similar project, but there is key differences:mldissectis maintainedHas tests and good code coverage.Classification is working properly.Multi class support.Top down approach is not implemented.Friendly license.RequirementsPython3.6+numpyCHANGES
Package: ml-dl-models
ML-DL-ModelsML-DL-Models is library to integrate various pre-trained Machine Learning and Deep Learning to your project through ml-dl-models apilink.UsageIn the following paragraphs, I am going to describe how you can get and use ml-dl-models for your projects.Getting itTo download ml-dl-models, either fork this github repo or simply use Pypi via pip.$python-mpipinstall--upgradepip
$pipinstallml-dl-modelsUsing itML-DL-Models was programmed with ease-of-use in mind. First, import models from it.fromml_dl_modelsimportMelodyGeneratorNow you are ready to create an Melody from a MelodyGenerator model.data={'keys':'c d e','default':True}path='/home/LaxmanMaharjan/melody.mp3'# default value is 'melody.mp3' in same directory.mg=MelodyGenerator(data=data,path=path)mg.generate_melody()You can also get the cached notes(notes that are already fetched to model) from Melody Generator.mg=MelodyGenerator()print(mg.get_cached_notes)You can instantiate MelodyGenerator class with default value of data and path.mg=MelodyGenerator()mg.generate_melody()Note:If you use default value of data and path to instantiate MelodyGenerator class than data is chosen from one of the values from cached data.Learn more about Data Representationlink
Package: mldsutils
Machine Learning Utilitiesmldsutils is a Python module that offers various tools for machine learning and data science.
It is built up on scikit-learn and rather focuses on specific tools that could be useful in different application domains.
Domains in its scope include but not limited to: Industrial processes, spectroscopy and authentication.DocumentationA documentation is not available at the moment but in progress.InstallationThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. For the moment it is not intended for deployment on a live system.Dependenciesmldsutils requires:Python (>=3.9)numpy (>=1.24.3)scikit-learn (>=1.2.2)scipy (>=1.10.1)imblearn (>=0.0)The examples require:matplotlib (>=3.7.1)User installationYou can install mldsutils using pip:pip install mldsutilsBuilt WithHatchlingAuthorsBarış Gün Sürmeli-barisgunsSee also the list ofcontributorswho participated in this project.LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details
Package: mlearner
MLearner: Machine Learning for Data EngineerMLearner is a Python library of useful tools for the day-to-day data science tasks.Jaime Sendra Berenguer - Spain - 2018-2022LinkedInGitHubLinksDocumentation:https://jaisenbe58r.github.io/MLearner/PyPI:https://pypi.python.org/pypi/mlearnerChangelog:https://jaisenbe58r.github.io/MLearner//CHANGELOGContributing:https://jaisenbe58r.github.io/MLearner//CONTRIBUTINGQuestions? Check out theDiscussInstalling mlearnerPyPITo install mlearner, just executepipinstallmlearnerAlternatively, you could download the package manually from the Python Package Indexhttps://pypi.python.org/pypi/mlearner, unzip it, navigate into the package, and use the command:pythonsetup.pyinstallCondaIf you use conda, to install mlearner just executecondainstall-cconda-forgemlearnerDev VersionThe mlearner version on PyPI may always be one step behind; you can install the latest development version from the GitHub repository by executingpipinstallgit+git://github.com/jaisenbe58r/MLearner.git#egg=mlearnerOr, you can fork the GitHub repository fromhttps://github.com/jaisenbe58r/MLearnerand install mlearner from your local drive viapythonsetup.pyinstallLicenseContact
Package: ml-eis
Machine Learning on EISProject Objectives:Current Functionality:Our results are presented in the user interface called echem_pred. This UI has the following functionalities:Data visualization:EIS plottingdqdvBattery cycling plottingMachine Learning:
Our machine learning has two different modes: online training and offline training. Online training includes.... while offline training uses developed....Offline data trainingOnline data trainingDecision TreeModules Overview:echem_pred.py: Main file for the user interface. Including three main parts: main window, data visualization (window 2), and machine learning (window 3).Software Tutorial:After cloning this repo annd installing the requirements, the Echem Visualizer App can be used to interact the xx functions to visualize cycling data.To start the app please run....:After running, the main page should look like this:Installation:Environment:(What's the required environment)Instruction:(How to install)Acknowledgement:
Package: mleko
mleko: Streamlining Machine Learning Pipelines in PythonSimplify and accelerate your machine learning development withmleko. Designed with modularity and customization in mind, it seamlessly integrates into your existing workflows. Its robust caching system optimizes performance, taking you from data ingestion to finalized models with unparalleled efficiency.Featuresmlekois engineered to address the end-to-end needs of machine learning pipelines, providing robust, scalable solutions for data science challenges:Ingest: Seamlessly integrates with data sources like AWS S3 and Kaggle, offering hassle-free data ingestion and compatibility.Convert: Specializes in data format transformations, prominently featuring high-performance conversions fromCSVtoVaex DataFrame, to make your data pipeline-ready.Split: Employs sophisticated data partitioning algorithms, allowing you to segment DataFrames into train, test, and validation sets for effective model training and evaluation.Feature Selection: Equipped with a suite of feature selection techniques,mlekoenables model performance by focusing on the most impactful variables.Transformation: Facilitates data manipulations such as Frequency Encoding and Standardization, ensuring that your data conforms to the prerequisites of the machine learning algorithms.Model: Provides a core set of functionalities for machine learning models, including in-built support for hyperparameter tuning, thereby streamlining the path from data to deployable model.Pipeline: Unifies the entire workflow into an intuitive directed acyclic graph (DAG) architecture, promoting reproducibility and reducing iteration time and time-to-market for machine learning models.By integrating these features,mlekoserves as a comprehensive toolkit for machine learning practitioners looking to build robust models efficiently.InstallationYou can installmlekoviapipfromPyPI:$pipinstallmlekoUsage & ExamplesSee thedocumentationfor more information or check out the usageexampleson well-known datasets like theTitanic Dataset.IssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.ContributingWe are open to, and grateful for, any contributions made by the community.
To learn more, see theContributor Guide.Release HistorySee ourchangelog.AcknowledgementsThe development ofmlekowas significantly influenced by existing work of the following individuals:Felipe Breve Siola(fsiola)Sai Ma(metanouvelle)Ahmet Anil Pala(aanilpala)Their insights and contributions provided a solid foundation for this library. We appreciate their effort and recognize their contributions that led to the creation ofmleko.LicenseCopyright © 2024 Klarna Bank ABFor license details, see theLICENSEfile in the root of this project.
Package: mlend
MLEnd DatasetsLinks:Homepage|Documentation|Github|PyPi - project|     _Installation:pip install mlendInstallationRequirement:  numpy, matplotlib, scipy.stats, spkitwith pippip install mlendupdate with pippip install mlend --upgradeDownload data :  Spoken Numeralsimport mlend
from mlend import download_spoken_numerals, spoken_numerals_load


datadir = download_spoken_numerals(save_to = '../Data/MLEnd', subset = {},verbose=1,overwrite=False)Create Training and Testing SetsTrainSet, TestSet, MAPs = spoken_numerals_load(datadir_main = datadir, train_test_split = 'Benchmark_B', verbose=1,encode_labels=True)Download data :  London Soundsimport mlend
from mlend import download_london_sounds, london_sounds_load


datadir = download_london_sounds(save_to = '../Data/MLEnd', subset = {},verbose=1,overwrite=False)Download data :  Hums and Whistlesimport mlend
from mlend import download_hums_whistles, hums_whistles_load


datadir = download_hums_whistles(save_to = '../Data/MLEnd', subset = {},verbose=1,overwrite=False)Contacts:Jesús Requena CarriónQueen Mary University of LondonNikesh BajajQueen Mary University of Londonn.bajaj[AT]qmul.ac.uk, n.bajaj[AT]imperial[dot]ac[dot]uk
Package: ml-ephys
ml_ephysElectrophysiology tools
MountainLab processor libraryInstallation from PyPI:pip3 install --upgrade ml_ephysThen add it as a plugin to mountainlab:cd ~/.mountainlab/packages
ml-link-python-module ml_ephys ml_ephysOr installation from source:clone this repository into .mountainlab/packages/cd ml_ephys
pip3 install --upgrade .
Package: mle-project
example_projectTools used in this projectPoetry: Dependency management -articlepre-commit plugins: Automate code reviewing formatting  -articleProject structure.
│batch.linear.regression.processor.Dockerfile
│batch.linear.regression.scheduler.Dockerfile
│batch.linear.regression.writer.Dockerfile│Dockerfile
│main.py
│manage.py
│README.md
│requirements.txt
│run.sh
│
├───.buildkite# Code to run on buildkite platform│├───hooks││pre-command
││
│├───plugins# plugins for multiple customers, regions, sites││├───get-environments-definition
││││README.md
││││
│││└───hooks
│││environment
│││
││└───get-python-comm
││└───hooks
││environment
││
│└───scripts
│diff.sh
│find-branch-point.sh
│
├───api
││apps.py
││urls.py
││views.py
││
│└───migrations
│__init__.py
│
├───batch
││requirements.txt
││scheduler.py
││
│└───batch_linear_regression_scheduler
││scheduler.py
││scheduler_conf.yml
││task-definition-template.json
││
│├───.buildkite
│││pipeline-deploy.yml
│││pipeline-destroy.yml
│││pipeline.yml
│││README.md
│││
││└───scripts
││generate-deploy-trigger-step.js
││generate-deploy-trigger-step.py
││
│└───terraform
││cloudwatch_log_group.tf
││data.tf
││ecs_gpu.tf
││kinesis.tf
││Makefile
││mysql.tf
││outputs.tf
││provider.tf
││roles.tf
││scheduler_ecs_task.tf
││sns.tf
││ssm.tf
││variables.tf
││
│├───backend
││development.backend
││production.backend
││staging.backend
││
│├───templates
││user-data.sh
││
│└───vars
│development-ap-southeast-2.tfvars
│development-us-east-1.tfvars
│
├───config
││main.yaml
││
│├───model
││model1.yaml
││model2.yaml
││
│└───process
│process1.yaml
│process2.yaml
│
├───docs
│.gitkeep
│img.png
│mlsys.png
│
├───http_server
││asgi.py
││settings.py
││urls.py
││wsgi.py
││__init__.py
││
│└───.buildkite
││pipeline-deploy.yml
││pipeline-destroy.yml
││pipeline.yml
││README.md
││task-definiton-template.json
││
│└───scripts
│generate-deploy-trigger-step.js
│generate-ecs-deploy-steps.js
│
├───models
│.gitkeep
│
├───notebooks
│.gitkeep
│
├───src
│benchmark.py
│simple_linear_regr.py
│simple_linear_regr_utils.py
│__init__.py
│
└───tests__init__.pyInstallationpipinstallmle-projectTest with pythonfromsrcimportSimpleLinearRegression,evaluate,generate_data

X_train,y_train,X_test,y_test=generate_data()model=SimpleLinearRegression()model.fit(X_train,y_train)predicted=model.predict(X_test)evaluate(model,X_test,y_test,predicted)
Package: mletrics
mletricsfrommletrics.stabilityimportpsifrommletrics.classificationimportksInstallpip install mletricsHow to useCalculating psi valuesimportnumpyasnpimportpandasaspdfromsklearn.pipelineimportPipelinefromsklearn.imputeimportSimpleImputerfromsklearn.composeimportColumnTransformerfromsklearn.preprocessingimportOneHotEncoderfromscikitplot.metricsimportplot_ks_statisticfromsklearn.ensembleimportRandomForestClassifierfromsklearn.model_selectionimporttrain_test_splitfrompathlibimportPathp=Path('..')df=pd.read_csv(p/'datasets/titanic.csv')df.head()<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}</style>PassengerIdSurvivedPclassNameSexAgeSibSpParchTicketFareCabinEmbarked0103Braund, Mr. Owen Harrismale22.010A/5 211717.2500NaNS1211Cumings, Mrs. John Bradley (Florence Briggs Th...female38.010PC 1759971.2833C85C2313Heikkinen, Miss. Lainafemale26.000STON/O2. 31012827.9250NaNS3411Futrelle, Mrs. Jacques Heath (Lily May Peel)female35.01011380353.1000C123S4503Allen, Mr. William Henrymale35.0003734508.0500NaNScat_vars=['Pclass','Sex','Embarked']num_vars=['Age','SibSp','Fare']features=cat_vars+num_varstarget='Survived'X=df[features].copy()y=df[target].copy()num_pipe=Pipeline(steps=[('imputer',SimpleImputer(strategy='constant',fill_value=-999))])cat_pipe=Pipeline(steps=[('imputer',SimpleImputer(strategy='constant',fill_value='missing')),('ohe',OneHotEncoder(sparse=False,handle_unknown='ignore'))])transformers=ColumnTransformer(transformers=[('numeric',num_pipe,num_vars),('categoric',cat_pipe,cat_vars)])model=Pipeline(steps=[('transformers',transformers),('model',RandomForestClassifier(random_state=42,max_depth=3))])X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.2,random_state=42)model.fit(X_train,y_train)y_proba_train=model.predict_proba(X_train)[:,1]y_proba_test=model.predict_proba(X_test)[:,1]calculate psi value for the model probability between train and testpsi(y_proba_train,y_proba_test)0.06001324825109782PSI < 0.1 - No change. You can continue using existing model.PSI >= 0.1 but less than 0.2 - Slight change is required.PSI >= 0.2 - Significant change is required. Ideally, you should
not use this model any more.Reference:https://www.listendata.com/2015/05/population-stability-index.htmlCalculating the KSks(y_test,y_proba_test)0.5886743886743887Comparing with thekscalculated byscikit-plot:plot_ks_statistic(y_test,np.column_stack([1-y_proba_test,y_proba_test]))<AxesSubplot:title={'center':'KS Statistic Plot'}, xlabel='Threshold', ylabel='Percentage below threshold'>
Package: mlevx
Machine Learning MlEvxThis is a simplified version ofregpredictpackage used to generate buy and sell signals for crypto and conventional stock markets based on the excess volume indicator(EVX). EVX is a concept where the bid-ask spread is estimated inherently from current market prices.You can read more about Evx in the whitepaperhereInstallationInstall mlevx withpython3 -m pip install mlevxUsageIn your python script simply import the module and use as follows:from mlevx.regbot import signal
print(signal(20,65,utcdatetime,'long'))The above methods take an assets opening and closing prices of the asset based on the time interval you have chosen. The third option is the datetime in utc as a string, and the last option is the decision to long or short the trade. A zero classification output would instruct the user to sell, while one output means don't sell or buy if the asset  is not already present in the orders.NB: The arguments can only be one between 'long' or 'short'.Testing an entire dataframeTesting of a dataframe for correct buy, sell signals is as simple as applying the function as follows:import pandas as pd
from regbot import signal, Regbot

df = pd.read_csv('../jupyter/mlevx_train.csv')

y_pred = []
def getSignal(open,close,utcdatetime,dir):
    return signal(open,close,utcdatetime,dir)




# select short profitable trades
df1 = df[df['close_profit_abs'] > 0]
df1 = df1[df1['is_short'] == 1]
print(df1.head())
# select long profitable trades
df2 = df[df['close_profit_abs'] > 0]
df2 = df2[df2['is_short'] == 0]
print(df2.head())


# Run all predictions
df['enter_short_pred'] = df.apply(lambda row: getSignal(row['open'], row['close'], row['date'],'short'), axis=1)
df['enter_long_pred'] = df.apply(lambda row: getSignal(row['open'], row['close'], row['date'],'long'), axis=1)


print(len(df[df['enter_short_pred'] == df['is_short']]), len(df) )
print(len(df[df['enter_long_pred'] == df['is_short']]), len(df2) )

print(df[df['is_short']==1].head(15))
print(df[df['is_short']==0].head(15))Your original data must already have some presumed 'long' or 'short' signal.WarningThis is not financial advise. MlEVX is entirely on its preliminary stages. Use it at your own risk.
Package: mlexec
## Purpose
Themlexecpackage is used to run scikit-learn type models with high abstraction, automating repetative tasks in training data preparation such as imputation, encoding etc. and during model tuning such as running CV, tuning and training.## Steps to run
1. Install basic packages likepandas,scikit-learnetc. Excludetensorflowif embeddings are not going to be used.`{sh} pip install-rrequirements.txt `2. Move the foldermlexecto the working directory. Import and use!MIT LicenseCopyright (c) 2023 DivM11Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: ml-experiment
IntroductionThis Python package facilitates the fast prototyping of
machine learning model with great scalability and flexibility.Characteristics of this package:Flexibility of Feature Engineering: it is convenient to define a function to
put to feature-processing pipeline;Flexibility of Models: there is no restriction about whether you have to use
scikit-learn, TensorFlow, or PyTorch;Few Specifications on Models: user only need to worry about thefitandpredict_proba;Training Job Specifications: features, data locations, model specifications can
be specified in a Python dictionary or JSON, facilitating potential
MapReduce or parallelism;Scalability: data is stored temporarily in disks in batch
to save memory space;Statistics: statistical measures of the performance of the models and
their class labels are calculated;Cross Validation: cross validation option is available.Ready Adaptation to Production: data pipelines and algorithms can be adapted into
production codes with little changes.There will be tutorials and documentations.News04/11/2021:0.0.7released.06/24/2020:0.0.6released.05/31/2020:0.0.5released.05/12/2020:0.0.4released.05/03/2020:0.0.3released.04/29/2020:0.0.2released.04/24/2020:0.0.1released.
Package: ml-experiments
ML ExperimentsThis package is under development.Installationpipinstallml-experiments# or (if you are not getting the latest version)pipinstallgit+https://github.com/abdalrhmanu/ml-experiments.git--upgradeNotificationfromml_experiments.notifyimportnotify_desktop,notify_email@notify_desktop(title='Testing Completed!')deftrain()://..sometrainingcode..return{"loss":5}@notify_email(recipient_emails=['emai1@email.com'],sender_email=['emai2@email.com','emai3@email.com'])deftrain()://..sometrainingcode..return{"loss":5}Dataset Splittingfromml_experiments.data_prepimportDatasetdataset=Dataset(dataset_path=r'..\\dev\\dataset',csv_path=r'..\\dev\\test.csv',output_directory=r'..\\dev\\out',output_format="dir")# split (copy) to the defined output directory to every labeldataset.split_to_directory()dataset2=Dataset(dataset_path=r'..\\dev\\dataset',csv_path=r'..\\dev\\test.csv',output_directory=None,output_format="df")# splits to a dataframe without creating any new directorydf,x_col,y_col=dataset2.split_to_df()Running Testscdtestspython3test_filename.py
Package: ml-express
ml_expressA Python library for day to day data analysis and machine learning.
This aims to make data building, cleaning and machine learning much much faster.Installationpip install ml-expressUsageimportml_expressasmlxfromml_expressimporteda# this will create an html report and report will be saved in report folder in working directoryeda.create_summary_report(df)ContributingContributions are very welcome. Please feel free to submit PR.LicenseDistributed under the terms of the MIT license, "ml-express" is free and open source softwareIssuesIf you encounter any problems, please file an issue along with a detailed description.
Package: mlf-core
mlf-corePreprintmlf-core: a framework for deterministic machine learningOverviewmlf-core provides CPU and GPU deterministic machine learning templates based on MLflow, Conda, Docker and a strong Github integration.
Templates are available for PyTorch, TensorFlow and XGBoost.
A custom linter ensures that projects stay deterministic in all phases of development and deployment.InstallingStart your journey with mlf-core by installing it via$ pip installmlf-core.SeeInstallation.runSee a mlf-core project in action.configConfigure mlf-core to get started.SeeConfiguring mlf-corelistList all available mlf-core templates.SeeListing all templates.infoGet detailed information on a mlf-core template.SeeGet detailed template information.createKickstart your deterministic machine laerning project with one of mlf-core’s templates in no time.SeeCreate a project.lintUse advanced linting to ensure your project always adheres to mlf-core’s standards and stays deterministic.SeeLinting your projectbump-versionBump your project version across several files.SeeBumping the version of an existing project.syncSync your project with the latest mlf-core release to get the latest template features.SeeSyncing a project.upgradeCheck whether you are using the latest mlf-core version and update automatically to benefit from the latest features.Seehttps://mlf_core.readthedocs.io/en/latest/upgrade.html.CreditsPrimary idea and main development byLukas Heumos. mlf-core is inspired bynf-core.
This package was created withcookietemplebased on a modifiedaudreyr/cookiecutter-pypackageproject template usingcookiecutter.