Code Monkey home page Code Monkey logo

xgboost__flask's Introduction

一:项目介绍

在众多机器学习算法中, XGBoost算法凭借其更少的训练时间与更高的准确率广泛应用于Kaggle竞赛及各类数据分析项目。以安卓恶意软件数据为基础,交互式可视化技术为手段,借助XGBoost分析样本行为特征、帮助安全管理人员理解安全决策过程。本系统设计新颖的可视视图定位异常决策节点,构建基于“中心类”**的错误分析模型,借助矩阵算法特征工程的优化调整,模型性能的提升提供一定的参考。

一:Pipline

pipline

系统功能

1.样本的类趋向分析

为了更好的描述XGBoost的数据分类情况,定位偏差来源(T2), 本文引进SVM算法中“中心类”与“边缘类”的**。将XGBoost模型中错误分类样本的趋向类定义为“中心类”,剩余类别为“边缘类”。在最大间隔法基础上引入惩罚参数C及松弛因子 ,使“边缘类”与“中心类”、“边缘类”与“边缘类”具有最大间隔与最小错划度。

center_edge

2.特征工程指导

将样本在特征上的value抽象为特征向量q,每列安全特征在样本上的分布抽象为p,在得到模型偏差与按照 方式计算特征权重系数后,以list形式对比测试集中特征贡献度与权重系数,并将差值应用于后续的可视化设计中。 matrix

myInterface.py文件中构造了一个类,用于对数据和模型进行管理。数据包括原始数据和从模型中获得的数据,原始数据来自 'static/data/' 文件夹下,为了方便动态的添加数据集,因此对数据集的名称映射为data-n;而从模型中获得的数据除了模型评估结果和学习状况等外还包括针 对SHAP解释的数据进行处理。

app.py文件为前端每个视图都创建了一个路由,但随着视图的不断变动,某些路由也暂时闲置。

数据集

系统中用到了5个数据集,存放于 './static/' 路径下,都来自于https://www.unb.ca/cic/datasets/index.html。具体的数据介绍可以查看此网站。

注意点

  1. 虽然后端使用的是flask框架,但是只使用了路由注册和前后端数据交换的功能
  2. 如果不使用命令行运行app.py,可能会导致主函数无法运行,其中所做的一些配置也将无法实现,可能会导致一些未知的错误。不过问题不大。

xgboost__flask's People

Contributors

zzhongying avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.