Giter Site home page Giter Site logo

predicttheproduct's Introduction

PredictTheProduct 中文电商商品预测

本项目是 https://github.com/jingpeicomp/product-category-predict 的简化版本。

功能:对淘宝等电商网站上的商品标题进行商品类别预测

商品标题 一级类别 二级类别 三级类别
【工厂直供】冬季加绒牛仔裤女高腰加厚保暖韩版弹力显瘦外穿小脚裤子2018新款 黑色 28码 服饰内衣 男装 加绒裤
热水袋充电防爆暖水袋注水煖宝宝暖宫暖手宝女韩版毛绒布萌萌可爱 家居家装 生活日用 保暖防护
山野里 水果干零食大礼包组合芒果干草莓干杏干黄桃干果脯混合装 食品饮料、保健食品 休闲食品 蜜饯果干

算法思路

原仓库

特点:

抽取核心逻辑,去掉了 Spring 框架,可以直接使用,更加方便的集成到其他系统 去掉了模型训练的步骤,内置准确度达 85%的模型 更新了 SparkAPI,支持 Spark 最新版本 2.4.0

在这里感谢原作者 @jingpeicomp,这是一个非常有意义的项目。

用法

AppConfigProperties appConfigProperties = new AppConfigProperties();
PredictProduct predictProduct = new PredictProduct(appConfigProperties);
List<ProductCategory> res = predictProduct.predict(input);

Demo 程序运行步骤

  1. 运行 Spark Standalone Mode 参考链接

  2. 在appConfigProperties中修改配置

    1. 数据地址product_category/data
    2. 模型地址product_category/model
    3. 特征向量维度 10000
    4. Spark Master 地址 如果是Standalone 应该是spark://127.0.0.1:7077
    5. Spark应用名称
  3. 打包程序得到 jar 包 mvn clean package -Dmaven.test.skip=true

  4. 提交 jar 包到 Spark 进行运算 bin/spark-submit --master spark://your_spark_master --class "com.company.Main" XXX.jar

运行效果

Result.csv

predicttheproduct's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.