Xeasy-ml is a packaged machine learning framework.

Overview

xeasy-ml

1. What is xeasy-ml

Xeasy-ml is a packaged machine learning framework. It allows a beginner to quickly build a machine learning model and use the model to process and analyze his own data. At the same time, we have also realized the automatic analysis of data. During data processing, xeasy-ml will automatically draw data box plots, distribution histograms, etc., and perform feature correlation analysis to help users quickly discover the value of data.

2.Installation

Dependencies

xeasy-ml requires:

Scikit-learn >= 0.24.1

Pandas >= 0.24.2

Numppy >= 1.19.5

Matplotlib >= 3.3.4

Pydotplus >= 2.0.2

Xgboost >= 1.4.2

User installation

pip install xeasy-ml

3. Quick Start

1.Create a new project

Create a new python file named pro_init.py to initialize the project.

from xeasy_ml.project_init.create_new_demo import create_project
import os

pro_path = os.getcwd()
create_project(pro_path)

Now you can see the following file structure in your project.

├── Your_project
     ...
│   ├── pro_init.py
│   ├── project
│   │   └── your_project

2.Run example

cd project/your_project

python __main__.py

3.View Results

cd project/your_project_name/result/v1
ls -l
├── box   (Box plot)
├── cross_predict.txt (Cross-validation prediction file)
├── cross.txt  (Cross validation effect evaluation)
├── deleted_feature.txt  (Features that need to be deleted)
├── demo_feature_weight.txt  (Feature weights)
├── demo.m   (Model)
├── feature_with_feature  (Feature similarity)
├── feature_with_label   (Similarity between feature and label )
├── hist    (Distribution histogram)
├── model
├── predict_result.txt  (Test set prediction results)
└── test_score.txt      (Score on the test set)


xeasy-ml中文文档

1. 简介

​ xeasy-ml是一个封装的机器学习框架。它允许初学者快速建立机器学习模型,并使用该模型处理和分析自己的数据。同时,还实现了数据的自动分析。在数据处理过程中,xeasy-ml会自动绘制数据的箱线图、分布直方图等,并进行特征相关性分析,帮助用户快速发现数据的价值。

2.安装

依赖包:

Scikit-learn >= 0.24.1
Pandas >= 0.24.2
Numppy >= 1.19.5
Matplotlib >= 3.3.4
Pydotplus >= 2.0.2
Xgboost >= 1.4.2

​ 安装:

pip install xeasy-ml

3.如何使用

1.创建自己的项目

#创建一个名为pro_init.py的新python文件来初始化项目。
from xeasy_ml.project_init.create_new_demo import create_project
import os
pro_path = os.getcwd()
create_project(pro_path)
#在pro_init.py同级目录下可以看到以下目录结构:
├── Your_project
 	 ...
	├── pro_init.py
	├── project
	│  └── your_project

2.运行

cd project/your_project
python __main__.py

3.查看结果

cd project/your_project_name/result/v1
ls -l

  ├── box  (箱线图)

  ├── cross_predict.txt (交叉验证预测文件)

  ├── cross.txt (交叉验证评估)

  ├── deleted_feature.txt (需要被删除的特征)

  ├── demo_feature_weight.txt (模型特征权重)

  ├── demo.m  (保存的模型文件)

  ├── feature_with_feature (特征相似度)

  ├── feature_with_label  (特征与标签相似度)

  ├── hist  (分布直方图)

  ├── model

  ├── predict_result.txt (测试集预测结果)

  └── test_score.txt   (测试集评价指标得分)

4.线上使用手册

​ 假设你已经按照3.1的指引生成了你的个人项目文件夹,文件的目录结构为:

|———— Your_project
 	 ...
	| |———— pro_init.py
	| |———— project
	| |	└──your_project
	| |	   └──config
	| |	      └──demo
	| |		 └──ml.conf
	| |		 └──model.conf
	| |		 ...
	| |	      |——log.conf
	| |	   |——data
	| |	      └──sample.txt
	| |        |——log
	| |        |——result
	| |        |——__main__.py									

1.训练

​ 上述project结构中,config文件夹下为模型配置文件和日志配置文件;data为训练集;log是训练过程储存日志的文件夹,你可以在这里查看你的模型运行日志;result用于储存模型运行过程产生的数据分析资料,模型文件等;

​ 训练时,你可以根据自己的任务对配置文件进行调整,数据需存放在data文件夹下;模型训练和预测的结果在result内;加入你已经完成了模型的训练过程,你最需要关注的是result下的变化,其中最重要的是model文件下的demo.m,这是模型训练后的储存文件。

|——result
   |——v1
      |——box
      |——hist
      |——model

2.工程预测

​ 线上使用xeasy-ml时,你需要准备三个文件:demo.m , log.conf 和feature_enginnering.conf;在完成训练步骤后,你可以在project文件夹下找到它们;将这三个文件放在你的工程目录下,接着你需要做的就是写出你自己的predict.py(或者调用xeasy-ml.predict()方法,传入上述三个参数),这个文件包括xeasy-ml中的prediction_ml.PredictionML类用以初始化模型,PredictionML(config=conf, xeasy_log_path = xeasy_log_path)有两个参数:config是用于模型初始化的文件,easy_log_path是模型的日志配置文件;这里有个要注意的地方是我们可以根据自己的需要决定是否传入模型的配置文件(训练中的ml.conf)文件的作用是根据配置信息初始化模型(包括数据处理等),如果执行这一步操作,你需要在与启动文件相同目录下添加’./config/demo/model.conf‘和'’./config/demo/feature_enginnering.conf‘';需要注意的是ml.conf和model.conf的参数调整

self.ml = xml.prediction_ml.PredictionML(config = 'your ml.conf path', xeasy_log_path=xeasy_log_path)

如果只是使用XGBClassifier模型,不需要传入模型初始化文件,也不需要额外建立’./config/demo/model.conf‘文件目录;仅传入日志配置文件即可,但是需要自定义数据处理,代码形式如下:

self.ml = xml.prediction_ml.PredictionML(xeasy_log_path=xeasy_log_path)
self.ml._model = XGBClassifier()
self.ml._model.load_model(model_path)

self.ml._feature_processor = xml.data_processor.DataProcessor(conf=ml_config, log_path=xeasy_log_path)
self.ml._feature_processor.init()

以上步骤是线上模型的两种初始化方式;初始化后,对预测数据进行预测前需要进行数据处理,例:

self.ml._feature_processor.test_data = data_frame
self.ml._feature_processor.execute()
# 测试数据
test_feature = self.ml._feature_processor.test_data_feature.astype("float64", errors='ignore')
# 预测结果
predict_res = self.ml._model.predict(test_feature)
Python Machine Learning Jupyter Notebooks (ML website)

Python Machine Learning Jupyter Notebooks (ML website) Dr. Tirthajyoti Sarkar, Fremont, California (Please feel free to connect on LinkedIn here) Also

Tirthajyoti Sarkar 2.6k Jan 03, 2023
Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

eXtreme Gradient Boosting Community | Documentation | Resources | Contributors | Release Notes XGBoost is an optimized distributed gradient boosting l

Distributed (Deep) Machine Learning Community 23.6k Jan 03, 2023
Azure MLOps (v2) solution accelerators.

Azure MLOps (v2) solution accelerator Welcome to the MLOps (v2) solution accelerator repository! This project is intended to serve as the starting poi

Microsoft Azure 233 Jan 01, 2023
虚拟货币(BTC、ETH)炒币量化系统项目。在一版本的基础上加入了趋势判断

🎉 第二版本 🎉 (现货趋势网格) 介绍 在第一版本的基础上 趋势判断,不在固定点位开单,选择更优的开仓点位 优势: 🎉 简单易上手 安全(不用将api_secret告诉他人) 如何启动 修改app目录下的authorization文件

幸福村的码农 250 Jan 07, 2023
End to End toy example of MLOps

churn_model MLOps Toy Example End to End You might find below links useful Connect VSCode to Git MLFlow Port Heroku App Project Organization ├── LICEN

Ashish Tele 6 Feb 06, 2022
Arquivos do curso online sobre a estatística voltada para ciência de dados e aprendizado de máquina.

Estatistica para Ciência de Dados e Machine Learning Arquivos do curso online sobre a estatística voltada para ciência de dados e aprendizado de máqui

Renan Barbosa 1 Jan 10, 2022
MLR - Machine Learning Research

Machine Learning Research 1. Project Topic 1.1. Exsiting research Benmark: https://paperswithcode.com/sota ACL anthology for NLP papers: http://www.ac

Charles 69 Oct 20, 2022
🤖 ⚡ scikit-learn tips

🤖 ⚡ scikit-learn tips New tips are posted on LinkedIn, Twitter, and Facebook. 👉 Sign up to receive 2 video tips by email every week! 👈 List of all

Kevin Markham 1.6k Jan 03, 2023
scikit-learn: machine learning in Python

scikit-learn is a Python module for machine learning built on top of SciPy and is distributed under the 3-Clause BSD license. The project was started

neurodata 3 Dec 16, 2022
This is the code repository for Interpretable Machine Learning with Python, published by Packt.

Interpretable Machine Learning with Python, published by Packt

Packt 299 Jan 02, 2023
SageMaker Python SDK is an open source library for training and deploying machine learning models on Amazon SageMaker.

SageMaker Python SDK SageMaker Python SDK is an open source library for training and deploying machine learning models on Amazon SageMaker. With the S

Amazon Web Services 1.8k Jan 01, 2023
Traingenerator 🧙 A web app to generate template code for machine learning ✨

Traingenerator 🧙 A web app to generate template code for machine learning ✨ 🎉 Traingenerator is now live! 🎉

Johannes Rieke 1.2k Jan 07, 2023
K-means clustering is a method used for clustering analysis, especially in data mining and statistics.

K Means Algorithm What is K Means This algorithm is an iterative algorithm that partitions the dataset according to their features into K number of pr

1 Nov 01, 2021
Xeasy-ml is a packaged machine learning framework.

xeasy-ml 1. What is xeasy-ml Xeasy-ml is a packaged machine learning framework. It allows a beginner to quickly build a machine learning model and use

9 Mar 14, 2022
Model Validation Toolkit is a collection of tools to assist with validating machine learning models prior to deploying them to production and monitoring them after deployment to production.

Model Validation Toolkit is a collection of tools to assist with validating machine learning models prior to deploying them to production and monitoring them after deployment to production.

FINRA 25 Dec 28, 2022
Machine Learning for Time-Series with Python.Published by Packt

Machine-Learning-for-Time-Series-with-Python Become proficient in deriving insights from time-series data and analyzing a model’s performance Links Am

Packt 124 Dec 28, 2022
🎛 Distributed machine learning made simple.

🎛 lazycluster Distributed machine learning made simple. Use your preferred distributed ML framework like a lazy engineer. Getting Started • Highlight

Machine Learning Tooling 44 Nov 27, 2022
scikit-fem is a lightweight Python 3.7+ library for performing finite element assembly.

scikit-fem is a lightweight Python 3.7+ library for performing finite element assembly. Its main purpose is the transformation of bilinear forms into sparse matrices and linear forms into vectors.

Tom Gustafsson 297 Dec 13, 2022
Predict the demand for electricity (R) - FRENCH

06.demand-electricity Predict the demand for electricity (R) - FRENCH Prédisez la demande en électricité Prérequis Pour effectuer ce projet, vous devr

1 Feb 13, 2022
Stacked Generalization (Ensemble Learning)

Stacking (stacked generalization) Overview ikki407/stacking - Simple and useful stacking library, written in Python. User can use models of scikit-lea

Ikki Tanaka 192 Dec 23, 2022