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)
Convoys is a simple library that fits a few statistical model useful for modeling time-lagged conversions.

Convoys is a simple library that fits a few statistical model useful for modeling time-lagged conversions. There is a lot more info if you head over to the documentation. You can also take a look at

Better 240 Dec 26, 2022
jaxfg - Factor graph-based nonlinear optimization library for JAX.

Factor graphs + nonlinear optimization in JAX

Brent Yi 134 Dec 21, 2022
Open MLOps - A Production-focused Open-Source Machine Learning Framework

Open MLOps - A Production-focused Open-Source Machine Learning Framework Open MLOps is a set of open-source tools carefully chosen to ease user experi

Data Revenue 590 Dec 28, 2022
Magenta: Music and Art Generation with Machine Intelligence

Magenta is a research project exploring the role of machine learning in the process of creating art and music. Primarily this involves developing new

Magenta 18.1k Dec 30, 2022
Machine Learning University: Accelerated Natural Language Processing Class

Machine Learning University: Accelerated Natural Language Processing Class This repository contains slides, notebooks and datasets for the Machine Lea

AWS Samples 2k Jan 01, 2023
[DEPRECATED] Tensorflow wrapper for DataFrames on Apache Spark

TensorFrames (Deprecated) Note: TensorFrames is deprecated. You can use pandas UDF instead. Experimental TensorFlow binding for Scala and Apache Spark

Databricks 757 Dec 31, 2022
pandas, scikit-learn, xgboost and seaborn integration

pandas, scikit-learn and xgboost integration.

299 Dec 30, 2022
A framework for building (and incrementally growing) graph-based data structures used in hierarchical or DAG-structured clustering and nearest neighbor search

A framework for building (and incrementally growing) graph-based data structures used in hierarchical or DAG-structured clustering and nearest neighbor search

Nicholas Monath 31 Nov 03, 2022
Decision tree is the most powerful and popular tool for classification and prediction

Diabetes Prediction Using Decision Tree Introduction Decision tree is the most powerful and popular tool for classification and prediction. A Decision

Arjun U 1 Jan 23, 2022
A Pythonic framework for threat modeling

pytm: A Pythonic framework for threat modeling Introduction Traditional threat modeling too often comes late to the party, or sometimes not at all. In

Izar Tarandach 644 Dec 20, 2022
AI and Machine Learning with Kubeflow, Amazon EKS, and SageMaker

Data Science on AWS - O'Reilly Book Get the book on Amazon.com Book Outline Quick Start Workshop (4-hours) In this quick start hands-on workshop, you

Data Science on AWS 2.8k Jan 03, 2023
Apache Spark & Python (pySpark) tutorials for Big Data Analysis and Machine Learning as IPython / Jupyter notebooks

Spark Python Notebooks This is a collection of IPython notebook/Jupyter notebooks intended to train the reader on different Apache Spark concepts, fro

Jose A Dianes 1.5k Jan 02, 2023
2D fluid simulation implementation of Jos Stam paper on real-time fuild dynamics, including some suggested extensions.

Fluid Simulation Usage Download this repo and store it in your computer. Open a terminal and go to the root directory of this folder. Make sure you ha

Mariana Ávalos Arce 5 Dec 02, 2022
MBTR is a python package for multivariate boosted tree regressors trained in parameter space.

MBTR is a python package for multivariate boosted tree regressors trained in parameter space.

SUPSI-DACD-ISAAC 61 Dec 19, 2022
Lseng-iseng eksplor Machine Learning dengan menggunakan library Scikit-Learn

Kalo dengar istilah ML, biasanya rada ambigu. Soalnya punya beberapa kepanjangan, seperti Mobile Legend, Makan Lontong, Ma**ng L*v* dan lain-lain. Tapi pada repo ini membahas Machine Learning :)

Alfiyanto Kondolele 1 Apr 06, 2022
A benchmark of data-centric tasks from across the machine learning lifecycle.

A benchmark of data-centric tasks from across the machine learning lifecycle.

61 Dec 28, 2022
🌲 Implementation of the Robust Random Cut Forest algorithm for anomaly detection on streams

🌲 Implementation of the Robust Random Cut Forest algorithm for anomaly detection on streams

Real-time water systems lab 416 Jan 06, 2023
TorchDrug is a PyTorch-based machine learning toolbox designed for drug discovery

A powerful and flexible machine learning platform for drug discovery

MilaGraph 1.1k Jan 08, 2023
A library of sklearn compatible categorical variable encoders

Categorical Encoding Methods A set of scikit-learn-style transformers for encoding categorical variables into numeric by means of different techniques

2.1k Jan 07, 2023
Probabilistic programming framework that facilitates objective model selection for time-varying parameter models.

Time series analysis today is an important cornerstone of quantitative science in many disciplines, including natural and life sciences as well as eco

Christoph Mark 129 Dec 24, 2022