Saravanan666/pypi-org huggingface dataset:
Package: mlh
Machine Learning HelperThis package usage multiple algorithms and parameters to accomodate different set of use cases to help in creating multiple machine learning algorithms.1.0 woe (Weight of Evidence):This function will help to calculate Weight of Evidence and Information Value, the charts can be displayed and coarse classing can also be done.1.1 Parameters:max_bin: int
Maximum number of bins for numeric variables. The default is 10iv_threshold: float
Threshold value for Information Value. Variables with higher than threshold will be considered for transformationignore_threshold: Boolean
This parameter controls whether the defined threshold should be considered or ignored. The default is 'True'1.2 Returns:DataFrame having weight of evidence of each column along with the target variable1.3 Approach:Create an instance of woe
my_woe = woe()Call fit method on the defined object by passing on dataframe and the target variable name
my_woe.fit(df,target)Call the transform method
transformed_df = my_woe.transform()ExampleCreate Sample DataFramefrommlhimportwoeimportpandasaspdimportnumpyasnpimportrandomseed=1456np.random.seed(seed)random.seed(seed)rows=1000y=random.choices([0,1],k=rows,weights=[.7,.3])x1=random.choices(np.arange(20,40),k=rows)x2=np.random.randint(1000,2000,size=rows)x3=random.choices(np.arange(1,100),k=rows)x4=random.choices(['m','f','u'],k=rows)x5=random.choices(['a','b','c','d','e','f','g','h'],k=rows)df=pd.DataFrame({'y':y,'x1':x1,'x2':x2,'x3':x3,'x4':x4,'x5':x5})df.head()Fitting and predictionCreate Instance of Weight of Evidence Packagemy_woe=woe()Fit the data with created instancemy_woe.fit(df,'y')Display the relevant chartsmy_woe.getWoeCharts()Merge values of X3 Variable at 1 and 2 indices using the Weight of Evidence chart from the first Iterationmy_woe.reset_woe(2,(1,2),1)Get latest Iteration Information Valuemy_woe.get_IV()Replace the original values in the Dataframe with Weight of Evidencetransformed_df=my_woe.transform()
Package: mlhandmade
ML-handmadeImplemented some ML routines including other ML stuff such as preprocessing, visualization and model selection.ReferencesScikit-learn source code:https://github.com/scikit-learn/scikit-learnPRML algorithms by ctgk:https://github.com/ctgk/PRMLSokolov lectures on ML(RU):https://github.com/esokolov/ml-course-hseML handbook by Yandex SDA(RU):https://ml-handbook.ru/MLAlgorithms by rushter:https://github.com/rushter/MLAlgorithmsmlxtend library by rasbt:https://github.com/rasbt/mlxtendAlgorithms implementedLinear models with different optmization methods(GD, SGD, Batch-SGD, SAG)KNN with three approaches(brute-force, kd-tree, ball-tree)Multiclass strategies (One-vs-One, One-vs-Rest)Support vector (SVC and $\epsilon$-SVR) with different kernels(Linear, RBF, Polynomial)Discriminant analysis(linear & quadratic) implemented using SVDDecision tree classifier and regressorRandom forest classifier and regressor with bootstrapAdaBoost classifier and regressorOther ML stuff, for instance, k-fold cross validation, quality metrics, plotting, e.t.cInstallationIt can be installed usingpippipinstallmlhandmade
Package: ml-helper
ML HelperHelpers to speed up and structure machine learning projects.The library is available inPypiInstallingThe easiest way to install ml-helper is throughpippipinstallml-helperTo use it in your project, you must first import the libraryfromml_helper.helperimportHelperAnd then create a Helper object with a dictionary of keys related to your projectKEYS={'SEED':1,'TARGET':'y','METRIC':'r2','TIMESERIES':True,'SPLITS':5}hp=Helper(KEYS)After this, you may use the helper object's many functionsDependenciesML-Helper requires:Python (>3.5)Numpy (>=1.16)Pandas (>=0.23.4)Seaborn (>=0.9)Scikit-learn (>=0.20)Natplotlib (>=3)Scipy (>=1)ImblearnVecstackFunctionalityThe functionality is separated into 4 groups:Data ExplorationMissing DataBoxplot of numerical variablesCoefficient of variationCorrelation (numerical and categorical)Under Represented FeaturesTarget Variable DistributionFeature ImportancePCA Component VarianceData PreparationConvert features to categoriesDrop multiple columnsModelingCross Validation (with stratified kfolds, or time series split depending on use case)Randomized Grid SearchPipeline: Collection of models and pipeline steps that get performed and scoredPredict: Predict on unseen dataStack Predict: Build a stacked model and perform a predictionRegressionPlots for predictionsClassificationROC CurveClassification ReportOthersSelect features based on typesSplit X and yPlot models/pipelinesWorking ExamplesIf you wish to see the library in use, you may view the notebooks in theexamplessection.Also, you can see the implementation in their corresponding Kaggle Kernels:Bike Sharing in Washington D.C.: Time Series RegressionEmployee Attrition: ClassificationML-Helper Coding StyleMl-Helper complies to PEP8 and usesblackfor coding standardsVersioningSemVeris used for versioning.LicenseThis project is licensed under the MIT License - see theLicensefile for details
Package: ml-htools
ML ToolsUtilities for machine learning, mostly using scikit-learn and PyTorch.Free software: MIT licenseDocumentation:https://ml-htools.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2019-09-05)First release on PyPI.
Package: mliamlib
# mlib
A library of useful data manipulation, plotting, loading/saving, and other tools for “flatfile”-type time series data.## Creating the conda environment
The subdirectoryenvshas yaml files for creating a conda environment for running mlib.### Installing and Updating Anaconda
Instructions on installing Anaconda are here:https://docs.anaconda.com/anaconda/install/.  Make sure Anaconda’sbindirectory is on your path.If Anaconda is already installed, but is not up to date, you can update it with the following command:`bash $ conda update anaconda `Assuming you have an up-to-date version of anaconda installed, you can install or update the environments with the commands below.##### WarningThis library should be used in an environment that has basemap, and netCDF4 installed. An example conda environment is packaged with the project#### Initial Install`bash $ conda env create-fenvs/mlib27-env.yml`#### Update`bash $ conda env update-fenvs/mlib27-env.yml# this is where the update magic happens `#### Activating an Environment
Onbashsystems, the following command should always activate an environment (assuming that theanaconda/bindirectory is on your path):`bash $ source activate mlib27 `However, thecondacommand can be used to activate environments as well.  This will work on bothbashandcshsystems, but requires a specific script to be sourced first (e.g. in your.cshrcor.bashrcfile).  The script is located at…/anaconda/etc/profile.d/.  Use the script appropriate for your environment.  Then, the command to activate the environment is:`bash $ conda activate mlib27 `
Package: mLib
Your bag of handy codez for malware researchersContentcrypto - couple of wrappers aroundpycryptoand other (stolen/borrowed) crypto things, so far:rc2rc4 + key derivation from m$rc6spritzrsa + pkcsrolling xorxorxteaserpentcompression - same thing for compression algos so far:lznt1lzmatgzipaplibdisasm - wrapper aroundcapstoneand some additions ;]malware - codez from malware so far,isfbwinapi - various things related to windows api,resolve api name from hashport ofCryptExportKey/CryptImportKeyreturning object frommlib.cryptobits - various things that operates on bitshash - some old school hashes used in api resolvingrnd  - random wrappersmemory - useful class for operation on blobs of data, reading bytes,dwords etcparse - parse all the things! especially m$ crypto keysLicenseDo whatever you want with this,
Just remember to credit the authors and buy them beers when you meet them;]DocumentationI wish…ContactIf you have any questions, hit me up -mak@malwarelab.pl–Enjoy and Happy hacking!
Package: ml-ibge-cities
ML IBGE CITIESQuick startAddml_ibge_citiesin your Djangosettings.py:INSTALLED_APPS = [
        ...
        'ml_ibge_cities',
        ...
    ]Add in youradmin.pyfile the fallow code:from ml_ibge_cities.admin import MLIBGECitiesAdmin

    @admin.register(Example)
    class ExampleAdmin(MLIBGECitiesAdmin):
        passAdd in theforms.pyfile the fallow code:from ml_ibge_cities.forms import MLIBGECitiesForm
    class ExampleAdminForm(MLIBGECitiesForm):
        class Meta:
            ...
            fields = (... "state", "city", ...)
            ...
Package: mlib-nsi
MLibMLib is a simple python library made by a 12th degrees french student, for others 12 and 13th degrees students with the ISN speciality education.
It use pygame to displays graphics content.
For now, the main goal is to provide a GUI library.For more documentation, go to this website (he is written in french) :https://matto.glitch.me/?mlib=go.MGuiMGui allows the use of an GUI to make easily a GUI app.
Package: m-librarian
m_Librarian.Author: Oleg Broytman <phd@phdru.name>.Copyright (C) 2015-2024 PhiloSoft Design.License: GPL.This hopefully will be a collection of programs to index LibRusEc and
Flibusta libraries (zipfiles from torrents, actually), search and show
their contents with command-line, web interface and GUI.Home Page:https://phdru.name/Software/Python/m_librarian/Documentation:https://phdru.name/Software/Python/m_librarian/docs/Russian docs:https://phdru.name/Software/Python/m_librarian/docs/ru/Git repo:https://git.phdru.name/m_librarian.git/Github repo:https://github.com/phdru/m_librarianIssue tracker:https://github.com/phdru/m_librarian/issuespip install m_librarian
Package: mlify
Medha - MLIFYThis repo is a codebase for ML functionality and libraries for Medha-Rover.Medha-Rover is a rocker-bogie rover inspired by Nasa's Curiosity rover.
Medha is set to function and test phase of prototype-1 under test-lab environment in progress.Supported and managed by Conundrum-ArchivesConundrum-Archives is an initiative and network of enthusiasts who work and contribute on space, science, technology and sustainability. Everything in Conundrum-Archives is driven by curiosity.
Follow Conundrum-ArchivesInstagramandPodcastfor more updates.keep the conundrum rollingfor any concerns and support, please reach out to@medha-teamor@conundrum-archives-team.TechMedha-MLIFY is started as open-source project and remain open-source forever.InstallationPre-req:Python 3.6.x +Python librariesgit(required for working with repo)good to have ML libraries (eg. numpy, opencv-python, etc)For cloning this repo...gitclonehttps://github.com/Conundrum-Archives/medha-mlify.gitto change branch / milestone:cdmedha-mlify
gitcheckout-b<branch-name>
gitpullorigin<branch-name>Note: It is good to work under virtual environment. to setup virtual environment, make sure venv library is installed.python-mvenvvenv# for windows cmd-promptvenv\Scripts\activate# for linux-terminal$sourcevenv/bin/activateBuilding for sourcepythonsetup.pysdistbdist_wheel--buildversion<version-num>LicenseGPL-3.0
Package: ml-infer
Inferinferis a toolchain for doing optimized neural network inference with a number of different backends.InstallationInstall frompip:pipinstallml-infer# With development dependenciespipinstall'ml-infer[dev]'# With TensorRT supportpipinstall'ml-infer[tensorrt]'# With CoreML supportpipinstall'ml-infer[coreml]'# With developer dependencies and TensorRT supportpipinstall'ml-infer[dev,tensorrt]'# With developer dependencies and CoreML supportpipinstall'ml-infer[dev,coreml]'Supported BackendTensorRTCoreMLReferencesOfficial TensorRT Export PipelineOfficial CoreML Repository
Package: mlinnate
Innate stands for Integrated Neural Network Automatic Trainer and Evaluator. It is a framework for training neural networks and optimizing their hyperparameters. The base concept is to provide, at the user level, a complete abstraction of the training of a neural network on a cluster. The user can use the interface to launch tasks and get results as if they were executed on its own machine. The runtime provided by the framework simplify also the necessary code for training.This package is the interface library to connect to an innate server and execute training.
Package: mlinsights
mlinsights: extensions to scikit-learnmlinsightsextendsscikit-learnwith a couple of new models,
transformers, metrics, plotting. It provides new trainers such asQuantileLinearRegressionwhich trains a linear regression withL1norm
non-linear correlation based on decision trees, orQuantileMLPRegressora modification of scikit-learn’s MLPRegressor
which trains a multi-layer perceptron withL1norm.
It also exploresPredictableTSNEwhich trains a supervized
model to replicatet-SNEresults or aPiecewiseRegressionwhich partitions the data before fitting a model on each bucket.PiecewiseTreeRegressortrains a piecewise regressor using
a linear regression on each piece.IntervalRegressorproduces
confidence interval by using bootstrapping.ApproximateNMFPredictorapproximates a NMF to produce prediction without retraining.mlinsights documentation
Package: ml-insights
ML InsightsWelcome to ML-Insights!This package contains two core sets of functions:CalibrationInterpreting ModelsFor probability calibration, the main class isSplineCalib.  Given a set of model outputs and the “true” classes, you canfita SplineCalib object.  That object can then be used tocalibratefuture model predictions post-hoc.>>>model.fit(X_train,y_train)>>>sc=mli.SplineCalib()>>>sc.fit(X_valid,y_valid)>>>uncalib_preds=model.predict_proba(X_test)>>>calib_preds=sc.calibrate(uncalib_preds)>>>cv_preds=mli.cv_predictions(model,X_train,y_train)>>>model.fit(X_train,y_train)>>>sc=mli.SplineCalib()>>>sc.fit(cv_preds,y_train)>>>uncalib_preds=model.predict_proba(X_test)>>>calib_preds=sc.calibrate(uncalib_preds)For model interpretability, we provide theice_plotandhistogram_pairfunctions as well as other tools.>>>rd=mli.get_range_dict(X_train)>>>mli.ice_plot(model,X_test.sample(3),X_train.columns,rd)>>>mli.histogram_pair(df.outcome,df.feature,bins=np.linspace(0,100,11))Please see the documentation and examples at the links below.DocumentationNotebook Examples and UsagePythonPython 3.4+DisclaimerWe have tested this tool to the best of our ability, but understand that it may have bugs.  It was most recently developed on Python 3.7.3.  Use at your own risk, but feel free to report any bugs to our github. <https://github.com/numeristical/introspective>Installation$pipinstallml_insightsUsage>>>importml_insightsasmli>>>xray=mli.ModelXRay(model,data)>>>rfm=RandomForestClassifier(n_estimators=500,class_weight='balanced_subsample')>>>rfm_cv=mli.SplineCalibratedClassifierCV(rfm)>>>rfm_cv.fit(X_train,y_train)>>>test_res_calib_cv=rfm_cv.predict_proba(X_test)[:,1]>>>log_loss(y_test,test_res_calib_cv)SourceFind the latest version on github:https://github.com/numeristical/introspectiveFeel free to fork and contribute!LicenseFree software:MIT licenseDeveloped ByBrian LucenaRamesh SampathReferencesAlex Goldstein, Adam Kapelner, Justin Bleich, and Emil Pitkin. 2014. Peeking Inside the Black Box: Visualizing Statistical Learning With Plots of Individual Conditional Expectation. Journal of Computational and Graphical Statistics (March 2014)
Package: mlinspect
mlinspectInspect ML Pipelines in Python in the form of a DAGRun mlinspect locallyPrerequisite: python ==  3.8 (current blocker: sklearn does not support 3.9 yet it seems)Clone this repositorySet up the environmentcd mlinspectpython -m venv venvsource venv/bin/activateInstall pip dependenciespip install -e .[dev]If you want to use the visualisation functions we provide, install graphviz which can not be installed via pipLinux:apt-get install graphvizMAC OS:brew install graphvizRun the testspython setup.py testVisionMake it easy to analyze your pipeline and automatically check for common issues.frommlinspectimportPipelineInspectorfrommlinspect.inspectionsimportMaterializeFirstOutputRowsfrommlinspect.checksimportNoBiasIntroducedForIPYNB_PATH=...inspector_result=PipelineInspector\.on_pipeline_from_ipynb_file(IPYNB_PATH)\.add_required_inspection(MaterializeFirstOutputRows(5))\.add_check(NoBiasIntroducedFor(['race']))\.execute()extracted_dag=inspector_result.daginspection_to_annotations=inspector_result.inspection_to_annotationscheck_to_check_results=inspector_result.check_to_check_resultsDetailed ExampleWe prepared ademo notebookto showcase mlinspect and its features.NotesFor debugging in PyCharm, set the pytest flag--no-cov(Link)This is a research project, so comprehensive coverage of all possible ML APIs will not be possible in the current initial step. We will try to tell you if we encounter APIs we can not handle yet.LicenseThis library is licensed under the Apache 2.0 License.
Package: mlinstrumentation
A sample Python projectA sample project that exists as an aid to thePython Packaging User
Guide'sTutorial on Packaging and Distributing
Projects.This project does not aim to cover best practices for Python project
development as a whole. For example, it does not provide guidance or tool
recommendations for version control, documentation, or testing.The source for this project is available here.Most of the configuration for a Python project is done in thesetup.pyfile,
an example of which is included in this project. You should edit this file
accordingly to adapt this sample project to your needs.This is the README file for the project.The file should use UTF-8 encoding and can be written usingreStructuredTextormarkdownwith the appropriatekey set. It will be used to generate the project webpage on PyPI and will be
displayed as the project homepage on common code-hosting services, and should be
written for that purpose.Typical contents for this file would include an overview of the project, basic
usage examples, etc. Generally, including the project changelog in here is not a
good idea, although a simple “What's New” section for the most recent version
may be appropriate.
Package: mlist
MlistMlist is a Python list for new advance  methods created By Mohit
Youtube channelhttps://www.youtube.com/c/codingwisdomhttps://www.linkedin.com/in/mohit-990a852a/InstallationUse the package managerpipto install foobar.pipinstallMlistUsagefrommlistimportMlist# To show the difference between two mlist>>>list2=Mlist([1,2,5,6])>>>list1=Mlist([1,2,3,4])>>>>>>list1.diffshow(list2)[5,6]>>>list1[1,2,3,4]>>># Based on particular element>>>list1=Mlist([(1,"a"),(2,"b"),(3,"c"),(4,"d")])>>>>>>list2=Mlist([(10,"a"),(20,"b"),(30,"k"),(40,"l")])>>>>>>list1.diffshow(list2,1,1)[(3,"c"),(4,"d")]>>>>>>list1=Mlist([(1,"a"),(2,"b"),(3,"c"),(4,"d")])>>>>>>list2=Mlist([("a",10),("b",20),("k",30),("l",40)])>>># Criteria 2 dimension, 1,0 means Ist value from inner tuple of list1 and 0th value from inner tuple of list2>>>list1.diffshow(list2,1,0)[(3,"c"),(4,"d")]>>>list1=Mlist([1,2,3,4])>>>list2=Mlist([1,2,5,6])>>>>>>list1.diff(list2)>>>list1[3,4]#Get all the indexes>>>list1=Mlist([1,2,3,4,5,1,3,1,2,3,4,5])>>>>>>list1.indexall(2)[1,8]>>>list1.indexall(5)[4,11]>>>#Remove all occurrence(s) of given item>>>list1.removeall(5)>>>list1[1,2,3,4,1,3,1,2,3,4]>>># Remove duplicate items>>>list1.dupr()>>>list1[1,2,3,4]>>>>>>list1=Mlist([1,2,3,4])>>>>>>list2=Mlist([1,6,7,2])>>># Substract two lists>>>list1-list2<generatorobjectMlist.__sub__.<locals>.<genexpr>at0x00000221FDDE69E0>>>>[list1-list2][<generatorobjectMlist.__sub__.<locals>.<genexpr>at0x00000221FDE49660>]>>>>>>Mlist(list1-list2)[3,4]# lookup like Vlookup>>>frommlistimportMlist>>>m1=Mlist()>>>m2=Mlist()>>>m1.csv_read("G:\\Mlist_experiment\\book1.csv")[['1','a','400'],['2','b','500'],['3','c','600'],['4','d','700']]>>>>>>m2.csv_read("G:\\Mlist_experiment\\book2.csv")[['Python','1','','A'],['java','2','','B']]>>>>>>m1.lookup(m2,0,1)# 0 means 0 indexed column of m1 and 1 indexed coloum of m2[['1','a','400'],['2','b','500']]>>>>>>m3=m1.lookup(m2,0,1)>>>m3[['1','a','400'],['2','b','500']]>>>type(m3)<class'mlist.mohit.Mlist'>>>>m3.csv_write("G:\\Mlist_experiment\\book3.csv")#Club Two lists>>>frommlistimportMlist>>>m1=Mlist()>>>m2=Mlist()>>>>>>m1.csv_read("G:\\Mlist_experiment\\book1.csv")[['1','a','400'],['2','b','500'],['3','c','600'],['4','d','700']]>>>m2.csv_read("G:\\Mlist_experiment\\book2.csv")[['Python','1','','A'],['java','2','','B']]>>>>>>m1.club(m2,0,1)#0 means 0 indexed column of m1 and 1 indexed coloum of m2>>>m1[['1','a','400','Python','','A'],['2','b','500','java','','B'],['3','c','600'],['4','d','700']]>>>m1.csv_write("G:\\Mlist_experiment\\book4.csv")>>>ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseAPACHE LICENSE, VERSION 2.0
Package: mlit
ML inference toolsRequirementsFor model exportonnxpackage is required.Convert to ONNXBelow are some examples:Convertt5-small:PYTHONPATH=. python mlit to-onnx --model-type t5 --model-name t5-small --export-dir tmpCheck that it is working:PYTHONPATH=. python mlit inference --model-name t5-small --base-dir tmp --model-input "translate English to French: How does this model work?" --model-type t5Convert custom checkpoint:PYTHONPATH=. python mlit to-onnx --model-type t5 --model-name "../my_custom_model" --export-dir tmpCheck that it is working:PYTHONPATH=. python mlit inference --model-name my_custom_model --base-dir tmp --model-input "translate English to French: How does this model work?" --model-type t5 --tokenizer-name "t5-small"
Package: mliv
mlivfrommliv.dataset.demandimportgen_datafrommliv.utilsimportCausalDatasetgen_data()data=CausalDataset('./Data/Demand/0.5_1.0_0.0_10000/1/')frommliv.inferenceimportVanilla2SLSfrommliv.inferenceimportPoly2SLSfrommliv.inferenceimportNN2SLSfrommliv.inferenceimportOneSIVfrommliv.inferenceimportKernelIVfrommliv.inferenceimportDualIVfrommliv.inferenceimportDFLfrommliv.inferenceimportAGMMfrommliv.inferenceimportDeepGMMfrommliv.inferenceimportDFIVtry:frommliv.inferenceimportDeepIVexcept:passformodin[OneSIV,KernelIV,DualIV,DFL,AGMM,DeepGMM,DFIV,Vanilla2SLS,Poly2SLS,NN2SLS]:try:model=mod()model.config['num']=100model.config['epochs']=10model.fit(data)print(mod)except:print('Error: ...')try:model=DeepIV()model.config['num']=100model.config['epochs']=10model.fit(data)print(mod)except:print(f'Error: ...{mod}...')