Saravanan666/pypi-org huggingface dataset:
Package: mlforall
MLForAll: Easy ML projects from scratchDescriptionmlforallis an open-source library aimed to developers that are beginners in the data analysis area but want to build powerful machine learning projects from the very beginning. The package offers a reliable, easy to use and well documented set of functions that drive the user through the most common steps of any machine learning projects, from data reading to model testing.Main featuresThese are some of the functionalities that mlforall offers:File extension asbtraction when reading data (only supported for.csv,.txt,.xls,.xlsx,.parquetand.npy)Automatic handling of non-numeric features and missing values.A pool with almost all the data-scaling methods available and the most common ML models.Automatic model evaluation and reporting.Usage optionsThemlforallpackage can be used by command line interface or with Interactive Python Notebooks (.ipynb). An example of the first usage method is the following:# MLForAll usage through command linepython-mmlforall--kwargsWith this option, the library will execute the full ML pipeline, from data reading to model testing. The available keyword arguments are:--data_path:Mandatory.str.The absolute or relative route to the data for which the ML pipelin wants to be built.--target_var:Mandatory.strorint.The name or the position of the target column in the original data.--test_size:Optional.floatProportion of the data that wants to be kept as test. The defualt is 0.2.--cv:Optional.intThe number of k-folds that will be performed when evaluating the model. The deault is 5.--path_to_save_metrics:Optional.strThe absolute or relative path to save the final metrics of the model. It must be a file with the.csvextension. If not provided, the metrics will be printed in the console but not saved.As mentioned, usage from.ipynbfiles is also possible. As of version 0.1, the way to use this module from.ipynbfiles is by importing the submodules and using their methods separatedly. To import the different modules the following code snippet can be used:# MLForAll usage through .ipynb filesfrommlforallimportDataReader
frommlforallimportDataScaler
frommlforallimportDataModelerdata_reader=DataReader.ReadData(*args,**kwargs)data_scaler=DataScaler.ScaleData(*args,**kwargs)data_modeler=DataModeler.ModelData(*args,**kwargs)# orimportmlforallasmldata_reader=ml.DataReader.ReadData(*args,**kwargs)data_scaler=ml.DataScaler.ScaleData(*args,**kwargs)data_modeler=ml.DataModeler.ModelData(*args,**kwargs)DependenciesNumpy. It offers comprehensive mathematical functions, random number generators, linear algebra routines, Fourier transforms, and morePandas. A fast, powerful, flexible and easy to use open source data analysis and manipulation tool,
built on top of the Python programming languageOpenpyxl. A python library to read/write excel filesScikit-learn. accesible, reusable, simple and efficient tools for predictive data analysisWhere to get itThe source code is currently hosted on GitHub at:https://github.com/UnaiTorrecilla/MLForAllBinary installers for the latest released version are available at thePython
Package Index (PyPI)# PyPIpipinstallmlforall
Package: mlfoundry
MlFoundryThis guide is to give an idea of how you can log metrics, paramaters, predictions, models, dataset using MlFoundry. MlFoundry supports logging above mentioned logs to S3 asynchronously.API Workflow:Using mlfoundry you ca create multiple projects and each projects can have multiple run.ExampleProject 1run 1run 2Project 2run 1run 2run 3run 4Each run under each project will have a unique run_id.Quickstart1. Install mlfoundry# Install via pip
pip install mlfoundry --extra-index-url https://api.packagr.app/public2. Setup AWS credentialsTo setup AWS credentials MlLogs_foundry's CLI can be used. AWS credentials are required to store the artifacts like model, dataset, whylogs_metrics etc in S3 Bucket.The CLI requires AWS credentials(SECRET_ACCESS_KEY, ACCESS_KEY_ID)All the credentials can be set by running:mlfoundry init3. Initialise mlfoundryCreate an project and use the project_name to create a run:importmlfoundryasmlf# create a runmlf_run=mlf.create_run(project_name=<project-name>)If you want to use a previously created run:# printing all the runs available and get the run_idshow_all_runs()run=get_run(run_id=<run_id>)4. Start loggingTo log a model:run.log_model(sklearn_model,framework=mlf.ModelFramework.SKLEARN)To log parameters:run.log_params({'learning_rate':0.01,'n_epochs:10'})To log metrics:run.log_metrics({'accuracy':87,'f1_score':0.84,})Log predictions synchronously:feature_df: a pd.DataFrame, the input given to the model to make predictionspredictions: must be a list or pd.SeriesTo log predictions synchronously:run.log_predictions(self,feature_df,predictions)To log predictions asynchronously:responses=run.log_predictions_async(self,feature_df,predictions)#### To confirm that the log request completed successfully, await for futures to resolve: This is a blocking callimportconcurrent.futuresascfforresponseincf.as_completed(responses):res=response.result()Users can additionaly pass in feature_names argument which is a list of feture names for feature_df.To release as Python packageUse Github Releases to create a tag on main and release it. This will trigger the workflow and publish the pip packageTags must be of formatvx.x.x, examplev0.1.0Development instructionsgit clone https://github.com/truefoundry/mlfoundry.git
cd mlfoundry
virtualenv venv
source venv/bin/activate
pip install poetry==1.4.2
poetry install
pre-commit installRun Manual QAgit clone https://github.com/truefoundry/mlf-test
cd mlf-test
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
cd mlf_examples
python main.py  In-this-step-check-for-error-logs
mlfoundry ui  In-this-step-go-to-the-listed-url-and-play-around-with-the-ui
Package: ml-framework
AILibCommit hookshttps://medium.com/@pratu16x7/using-pre-commit-to-manage-git-hooks-532e055e4771Packaginghttps://towardsdatascience.com/how-to-convert-your-python-project-into-a-package-installable-through-pip-a2b36e8ace10python3 -m build
python3 -m pip install --user --upgrade twine
python3 -m twine upload --repository testpypi dist/*
python3 -m twine upload dist/*
Package: mlfs
A package for maximum likelihood density fitting and simulation.This package is still in the planning phase. At the moment, two stages are planned.In the first stage, users will be able to fit common distributions to their data by the maximum likelihood estimation technique. Users will also be able to simulate sampling from these fitted distributions.In the second stage, users will be able to input custom distributional forms by pasting LaTeX code. At first, only continuous distributions will be allowed. Piecewise functions will be incorporated later.
Package: ml-functions
ml_functions: A Machine Learning Functions PackageOverviewTheml_functionspackage provides a collection of Python functions designed for various machine learning tasks. The package currently includes:convolution2d: Perform 2D cross-correlation between an input matrix and a kernel.transpose: Transpose a 2D matrix.window1d: Generate a list of windows from a 1D array or list.InstallationThis package uses Poetry for dependency management. To install the package, first, ensure you havePoetry installed.Then, run:poetryinstallThis package is also available on pypi:https://pypi.org/project/ml-functions/Usageconvolution2dPerform 2D cross-correlation.The convolution2d function slides a kernel over the input matrix, computes the element-wise product of the kernel and the corresponding sub-matrix at each position, and sums up these products. It utilizes nested loops to iterate over the rows and columns of the output matrix, extracting sub-matrices from the input matrix and performing element-wise multiplication with the kernel.Image Feature Extraction:Convolution operations are fundamental to Convolutional Neural Networks (CNNs). Before feeding an image into a CNN, it might be preprocessed using various kernels to extract features like edges, textures, and corners. For instance, you might use a Sobel filter (used in edge detection to detect brightness changes) to detect edges in an image.fromml_functionsimportconvolution2dresult=convolution2d(input_matrix:np.ndarray,kernel:np.ndarray,stride:int=1)transpose2dTransposes a 2D matrix.Matrix Operations in Neural Networks:While designing neural networks, especially fully connected layers or when visualizing certain types of data, you may need to transpose weight matrices or the input matrix itself to match the required shape for matrix multiplication.For example, if you have an input vector x of shape (m, 1) and weight matrix W of shape (n, m), then before you perform the dot product (an operation performed by each artificial neuron in the network), you might need to transpose W to make it of shape (m, n).fromml_functionsimporttranspose2dresult=transpose2d(input_matrix:list[list[int]])window1dGenerate a list of windows from a 1D array or list.Time Series Analysis:When working with time series data, it's often necessary to break the series down into smaller overlapping or non-overlapping windows for analysis. This is particularly useful for tasks like anomaly detection, where you'd want to compute statistics like mean and standard deviation for local windows to identify anomalies. With this function you can change the size of the window, how it changes with each iteration (shift), and how many steps to take before generating the next window (stride).fromml_functionsimportwindow1dresult=window1d(input_array:list|np.ndarray,size:int,shift:int=1,stride:int=1)TestsBasic tests for the functions in the package are included in the tests directory. Each function has corresponding test cases that are designed to verify the accuracy and efficiency of the functions under different circumstances. Error testing has yet to be added.
Package: mlgame
MLGame這是一個遊戲ＡＩ競賽的框架，依照此框架所開發的遊戲，可以透過ＡＩ來玩遊戲，並進行ＡＩ競賽。Table of Contents! 重要 !此次更新為大幅度更新專案架構，原有的指令方式、遊戲皆無法執行，因此請注意遊戲與MLGame的搭配。使用方式終端機範例列出 help 文件python-mmlgame-h命令列格式python-mmlgame[options]<game_folder>[game_params]執行打磚塊遊戲python-mmlgame\-f120-i./path/to/ai/ai_client_file_name.py\./path/to/game/arkanoid\--difficultyNORMAL--level3AI和遊戲的資料夾路徑可以使用相對路徑或是絕對路徑遊戲參數game_params須參考各個遊戲位置引數(Positional Argument)game_folderrequired遊戲資料夾所在的路徑，此路徑下需有config.py功能性引數(Functional Argument)options--version顯示MLGame版本號-h,--help提供參數的說明-fFPS,--fpsFPS設定遊戲的遊戲更新率(frame per second)，遊戲預設為每秒更新30次。default:30-1,--one-shot表示遊戲只執行一次，沒有加上這個參數，遊戲皆會不斷重新執行。default:False--nd,--no-display加上此參數就不會顯示螢幕畫面。default:False--ws_urlWS_URL加上此參數，會建立一個websocket connection，並將遊戲過程中的資料傳到指定的路徑，若路徑失效，則遊戲無法啟動。-iAI_Client,--input-aiAI_Client指定要玩遊戲的AI，AI的檔案中，需要包含MLPlay這個class。若有多個玩家，可直接參考下方案例，路徑可以使用絕對路徑與相對路徑。-i ./path/to/ai/ai_01.py -i ./path/to/ai/ai_02.pyAI數量需符合遊戲需求，每個遊戲都會有最小值與最大值，不足的會以最後一個AI自動補足，多的會自動刪去。遊戲若需要2個AI，給到1個AI則會同時扮演1P 2P遊戲若需要2個AI，給到3個AI則會自動排除最後一個-ooutput_folder,--output-folderoutput_folder將遊戲過程儲存到特定資料夾中，會自動建立一個時間戳記資料夾來儲存每一幀的圖片。此資料夾需要可讀寫，並且為有效路徑。若是沒有加上-1，會不斷的紀錄遊戲結果。此選項會影響到執行效能，開啟後覺得卡頓屬於正常現象。-rprogress-folder,--progress-folderprogress-folder將遊戲每個 frame 儲存到特定資料夾中，會自動建立一個時間戳記資料夾來儲存各 frame 的內容，以檔案分開。可透過-p,--progress-frame-frequency指定一個檔案內的 frame 數量。檔案內容為 json，檔案名稱代表此檔案由哪個 frame 開始紀錄。此資料夾需要可讀寫，並且為有效路徑。-pprogress-frame-frequency,--progress-frame-frequencyprogress-frame-frequency與-r,--progress-folder搭配。可指定一個檔案內的 frame 數量。game_paramsoptional執行遊戲的參數依照每個遊戲有所不同，格式為--name_of_paramsvalue_of_paramstypeint :01-11.5str :"0""hello""NORMAL"list:0,1-1,1000,111abc,cde,12path:./relative_path_to_file/file.txt,/absoulute_path_to_file/file.dat畫面控制遊戲執行可以使用IJKL進行平移使用UO放大縮小使用H開啟或關閉部分資訊使用P暫停遊戲畫面，暫停期間，遊戲邏輯不會運作，但仍可以調整畫面。相關專案PAIA-Desktop範例遊戲easy_game打磚塊arkanoid乒乓球pingpong賽車Racing Car迷宮自走車Maze CarFuture WorkNon-python Client Supporttest case遊戲開發文件Change LogViewCHANGELOG.md
Package: mlgauge
A simple library to benchmark performance of machine learning methods across different datasets. mlgauge is also a wrapper aroundPMLBandOpenMLwhich provide benchmark datasets for machine learning.mlgauge can help you ifYou are developing a machine learning method or an automl system and want to compare and analyze how it performs against other methods.You are learning different machine learning methods and would like to understand how different methods behave under different conditions.Checkout thedocumentationto learn more.Installationpip install mlgaugeUsageThis is the workflow for setting up and running a comparison benchmark with mlgauge:Set up your methods by defining aMethodclass. If your method follows the sklearn API, you can directly use theSklearnMethodwhich provides a typical sklearn workflow for estimators.Set up the experiments with theAnalysisclass.Collect the results for further comparative analysis.ExamplefrommlgaugeimportAnalysis,SklearnMethodfromxgboostimportXGBClassifierfromlightgbmimportLGBMClassifierfromcatboostimportCatBoostClassifierfromsklearn.ensembleimportGradientBoostingClassifierimportmatplotlib.pyplotaspltSEED=42methods=[("xgboost",SklearnMethod(XGBClassifier(n_jobs=-1,verbose=0),["accuracy","f1_micro"])),("lightgbm",SklearnMethod(LGBMClassifier(n_jobs=-1,verbose=0),["accuracy","f1_micro"])),("catboost",SklearnMethod(CatBoostClassifier(thread_count=-1,verbose=0),["accuracy","f1_micro"])),("gbm",SklearnMethod(GradientBoostingClassifier(verbose=0),["accuracy","f1_micro"])),]an=Analysis(methods=methods,metric_names=["accuracy","f1 score"],datasets="classification",n_datasets=10,random_state=SEED,)an.run()print(an.get_result_as_df("f1 score"))xgboost  lightgbm  catboost       gbm
datasets
mfeat_morphological      0.674000  0.682000  0.698000  0.700000
labor                    0.800000  0.733333  0.866667  0.800000
analcatdata_aids         0.769231  0.384615  0.538462  0.692308
mofn_3_7_10              1.000000  0.990937  1.000000  1.000000
flags                    0.444444  0.377778  0.355556  0.400000
analcatdata_creditscore  1.000000  1.000000  1.000000  1.000000
mfeat_morphological      0.674000  0.682000  0.698000  0.700000
penguins                 0.988095  0.976190  0.988095  0.988095
glass                    0.730769  0.673077  0.692308  0.711538
iris                     0.973684  0.973684  0.973684  0.973684an.plot_results("f1 score")More examples are available in thedocumentation.CreditsLogo designed by the talentedNeha Balasundaram.
Package: mlgear
MLGearSome utility functions to make ML with Python / Pandas / sklearn even easierExample Usagefrommlgear.cvimportrun_cv_modelfrommlgear.modelsimportrunLGBfrommlgear.metricsimportrmselgb_params={'application':'regression','boosting':'gbdt','metric':'rmse','num_leaves':15,'learning_rate':0.01,'bagging_fraction':0.9,'feature_fraction':0.9,'verbosity':-1,'seed':1,'lambda_l1':1,'lambda_l2':1,'early_stop':20,'verbose_eval':10,'num_rounds':500,'num_threads':3}results=run_cv_model(train,test,target,runLGB,lgb_params,rmse)Installationpip3 install mlgear
Package: mlgen
MLGenMlGen is a tool which helps you to generate machine learning code with ease.
MLGen uses a ".mlm" file format which is a file with YML like syntax.
This tool as of now supports keras and tensorflow2.0(not fully supported)pip install mlgenCLI commands--->To init filesmlgen -i | --init <file name>To generate a specific template (optional)mlgen -g | --gen <neural network type> --backend | -be <lib to use> -t jupyterTo generate the ml python filemlgen -r .MLM file syntax --->file: name of the python file to be createdversion: version of python being usedbackend: which machine learning platform if to be usedgpu: (bool) is gpu being used or notdata: location of the dataset can be a URL/ folder location on machinesplit:(int) slipt in training and testing data. automatically converted to a decimalcoloumns_feature: list of coloumns being used for the predictionnill_data: basic null data handling in non categorical datatypes. Available techiniques remove, mean, mode, mediannill_data_categorical: basic null data handling for categorical datatypes. Available techiniques remove, max, minNeuralNetwork_type: the type of neural network being used such as ANN, CNN, LSTMlayer1:  
    number_neurons: (int) number of neurons  
    input_dim: input dimensions of the first layer  input 
    activation: activation function being used 
    dropout: (optional)  
       dropout: (int) dropout percentage  
       noise_shape: (int) noise shape (optional)  
       seed: (int) seed value (optional)  
layer2:  
    number_neurons: (int) number of neurons  
    activation: activation function being used  
    dropout: (optional)  
        dropout: (int) dropout percentage  
        noise_shape: (int) noise shape (optional)  
        seed: (int) seed value (optional)  


compile:  
    epochs: (int) number of epoch  
    batch_size: (int) batch size  
    verbose: (int) verbose value 0,1,2  
    optimizer:  optimizer being used  
    loss: loss type  
    metrics: (array)  
        - metrics type  


checkpoint: (optional)  
    monitor: metrix type  
    verbose: (int) batch size  
    save_best_only: (bool)  
    mode: mode such as min max  


save_model: (optional)  
    file: file name to save model in  
    save: save type. Available options weights and model
Package: mlgenotype
mlgenotypeThis python package can be used to train machine learning models to genotype structural variants using aligned short read data. It was written by Nancy Fisher Hansen, a staff scientist in the Computational and Statistical Genomics Branch of NHGRI, beginning with code written by Gracelyn Hill and Jennifer C Lin.  Nancy can be reached atnhansen@mail.nih.gov.Software dependenciespandas >= 1.0scikit-learn == 1.0.2Clone the repositorygit clone git://github.com/nhansen/mlgenotype
Package: mlgeo
Repository for Machine Learning in GeotechnicsThis is the beginning of an exciting effort in lowering the barrier of entry to
Machine Learning for Geoprofessionals by:Distributing relevant and interesting toy datasets to practice with (now)Offering tools that can make applying ML easier, especially for beginners (soon)TRB2021 AKG70 PresentationClick on the image below to review the presentation introducing MLgeo given byNick Machairasduring the committee
meeting of AKG70 at TRB Annual Meeting 2021.License: Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)You are free toShare(copy and redistribute the material 
        in any medium or format) andAdapt(remix, transform, and 
        build upon the material for any purpose, even commercially), under the 
        following terms:Attribution— You must give appropriate 
        credit, provide a link to the license, and indicate if changes were made. 
        You may do so in any reasonable manner, but not in any way that suggests 
        the licensor endorses you or your use.ShareAlike— If 
        you remix, transform, or build upon the material, you must distribute 
        your contributions under the same license as the original. More detailshere.
Package: mlglass
Machine Learning Models with glass (Transparency)Links:Github|PyPi - projectInstallation:pip install spkitTable of contents-Logistic Regression-Naive Bayes-Decision TreesInstallationRequirement:  numpy, matplotlibwith pippip install mlglassBuild from the sourceDownload the repository or clone it with git, after cd in directory build it from source withpython setup.py installMachine Learning models - with visualizationsLogistic RegressionNaive BayesDecision TreesDeepNet (to be updated)Machine LearningLogistic Regression-View in notebookNaive Bayes-View in notebookDecision Trees-View in notebook[source code]|[jupyter-notebook]Plottng tree while training**view in repository **Contacts:Nikesh Bajajhttp://nikeshbajaj.inn.bajaj@qmul.ac.ukn.bajaj@uel.ac.ukbajaj.nikkey@gmail.comPhD from Queen Mary University of London, Postdoctoral at University of East London
Package: mlgorithms
mlgorithmsMachine learning libraries implemented entirely in python. Updating...Getting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.PrerequisitesPython 3.6InstallingMethod 1The project was deployed toPyPI, and it is recommended to use pip for installation:pip install mlgorithms            # normal install
pip install --upgrade mlgorithms  # or update if neededMethod 2Alternatively, you could clone and run setup.py file:git clone https://github.com/doycode/mlgorithms.git
cd mlgorithms
pip install .Running the testsIf you install successfully, below is the test code for ID3.from mlgorithms.ID3 import ID3

X = [[1,1],[1,1],[1,0],[0,1],[0,1]]
y = ['yes', 'yes', 'no', 'no', 'no']
features_name = ['f1', 'f2']
model = ID3(features_name=features_name)
built_tree = model.fit(X, y)
print(model.predict(built_tree, [[1,0]]))Then you can save and load the built tree through the following code:model.save_built_tree('built_tree.m', built_tree)
load_tree = model.load_built_tree('built_tree.m')ContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.VersioningWe useSemVerfor versioning. For the versions available, see thetags on this repository.AuthorsYuncheng DongEmail:dongyuncheng1991@gmail.comLicenseThis project is licensed under the Apache 2.0 License - see theLICENSE.mdfile for details.AcknowledgmentsPeter Harrington
Package: mlgo-utils
MLGO Python UtilitiesThis folder contains MLGO Python utilities, particularly infrastructure
to help enable ML applications within LLVM, especially tooling to extract
corpora that can be used in downstream projects to train ML models and perform
other tasks that benefit from having a large amount of data.Python VersioningDue to type annotations, the MLGO tooling currently only supports a Python
version greater than 3.8, deviating from the current LLVM project-wide
minimum supported version of Python 3.6.
Package: mlgw-bns
Machine Learning for Gravitational Waves from Binary Neutron Star mergersThis package's purpose is to speed up the generation of template gravitational waveforms for binary neutron star mergers by training a machine learning model on a dataset of waveforms generated with some physically-motivated surrogate.It is able to reconstruct them with mismatches lower than 1/10000,
with as little as 1000 training waveforms;
the accuracy then steadily improves as more training waveforms are used.Currently, the only model used for training isTEOBResumS,
but it is planned to introduce the possibility to use others.The documentation can be foundhere.InstallationTo install the package, usepipinstallmlgw-bnsFor more details seethe documentation.ChangelogChanges across versions are documented since version 0.10.1 in theCHANGELOG.Inner workingsThe main steps taken bymlgw_bnsto train on a dataset are as follows:generate the dataset, consisting of EOB waveformsdecompose the Fourier transforms of the waveforms into phase and amplitudedownsample the dataset to a few thousand pointscompute the residuals of the EOB waveforms from PN onesapply a PCA to reduce the dimensionality to a few tens of real numberstrain a neural network on the relation
between the waveform parameters and the PCA componentsAfter this, the model can reconstruct a waveform within its parameter space,
resampled at arbitrary points in frequency space.In several of the training steps data-driven optimizations are performed:the points at which the waveforms are downsampled are not uniformly chosen:
instead, a greedy downsampling algorithm determines themthe hyperparameters for the neural network are optimized, according to both
the time taken for the training and the estimated reconstruction error,
also varying the number of training waveforms available.