机器学习 建立模型

When businesses plan to start incorporating machine learning to enhance their solutions, they more often than not think that it is mostly about algorithms and analytics. Most of the blogs/training on the matter also only talk about taking fixed format files, training models and printing the result. Naturally, businesses tend to think that hiring good data scientists should get the job done. What they often fail to appreciate is that it is also a good old system and data engineering problem, with the data models and algorithms sitting at the core.

当企业计划开始合并机器学习以增强其解决方案时,他们常常会认为这主要与算法和分析有关。 关于此事的大多数博客/培训也只谈论获取固定格式的文件,培训模型并打印结果。 自然,企业倾向于认为雇用优秀的数据科学家应该完成这项工作。 他们经常不能理解的是,这也是一个很好的旧系统和数据工程问题,数据模型和算法是核心。

About a few years ago, at an organisation I was working in, business deliberated on using machine learning models to enhance user engagement. The use cases that were initially planned revolved around content recommendations. However later, as we worked more in the field we started using it for more diverse problems like, Topic Classification, Keyword Extraction, Newsletter Content Selection etc.

大约几年前,在我工作过的一个组织中,企业考虑使用机器学习模型来增强用户参与度。 最初计划的用例围绕内容建议。 但是后来,随着我们在该领域的工作越来越深入,我们开始将其用于更多样化的问题,例如主题分类,关键字提取,新闻稿内容选择等。

I would use our experience in designing and incorporating machine learnt models in production to illustrate the engineering and human aspects in building a data science application and team.

我将利用我们在生产中设计和合并机器学习模型的经验来说明在构建数据科学应用程序和团队时的工程和人为方面。

In big data analysis, training models were the crux of our data science application. But to make things work in production, many missing pieces of the puzzle were also required to be solved.

在大数据分析中,训练模型是我们数据科学应用程序的关键。 但是要使事情在生产中可行,还需要解决许多缺失的难题。

These were:

这些曾经是:

  1. Getting data into the system on a regular basis from multiple sources.定期从多个来源将数据导入系统。
  2. Cleaning and transformation in more than one structures for use.清洁和改造多个结构以供使用。
  3. Training and retraining models, saving and reusing as required.培训和再培训模型,根据需要保存和重用。
  4. How to apply incremental changes.如何应用增量更改。
  5. Exposing model outputs for consumption through API’s.公开模型输出以供通过API使用。

Scaling consumption API’s was also a concern for us. In our existing system, Content was mostly static and served from CDN cache. Certain content related data were served by application servers, but then all the users get the same data. Data was served from cache, which was updated every 5–10 seconds. Also the data pertained to around 7000 odd items on any particular day. Hence, overall low memory consumption and low number of writes.

扩展消耗API也是我们关注的问题。 在我们现有的系统中,内容大部分是静态的,由CDN缓存提供。 某些与内容相关的数据由应用程序服务器提供,但是所有用户都获得相同的数据。 数据由缓存提供,缓存每5-10秒更新一次。 此外,该数据在任何特定日期涉及大约7000个奇数物品。 因此,总体上内存消耗低,写入次数少。

Now, the personalized content output was for around 35 million users. Also new content was available every 10 minutes or so. Everything needed to be served by our application servers. Thus, this meant a far higher number of writes as well cache size to be handled than what we had handled earlier.

现在,个性化内容输出可用于约3500万用户。 每10分钟左右就有新内容可用。 我们的应用程序服务器需要提供所有服务。 因此,这意味着要处理的写入数量和缓存大小比我们之前处理的要多得多。

The challenge for us was to design a system to do all these. So a data-science / ML project was not limited to building vectors and running models, but involved designing a complete system with data as the lead player.

我们面临的挑战是设计一个能够完成所有这些任务的系统。 因此,数据科学/机器学习项目不仅限于构建向量和运行模型,还涉及设计一个以数据为主要参与者的完整系统。

When we started building our solution, we found that we had three facets that our decisions needed to cater too, namely System, Data and Team . Thus we would discuss our approach to these all three aspects separately.

在开始构建解决方案时,我们发现我们的决策也需要满足三个方面的需求,即System,Data和Team。 因此,我们将分别讨论这三个方面的方法。

Data Architecture:

数据架构:

We had data in multiple types of database, which backed our various applications. Data structures ranged from tabular to Document to Key-Value. Also, we had decided to use Hadoop ecosystem frameworks like Spark, Flink etc for our processing. Therefore, we chose HDFS for our data storage system for analytics.

我们在多种类型的数据库中拥有数据,这些数据支持了我们的各种应用程序。 数据结构从表格到文档再到键值。 此外,我们决定使用Spark,Flink等Hadoop生态系统框架进行处理。 因此,我们为数据存储系统选择了HDFS进行分析。

We built a 3 tier data storage system.

我们构建了3层数据存储系统。

  1. Raw Data Layer: This essentially is our Data lake and the foundation layer. Data is ingested from all our sources into this layer. Data ingestion is done from Databases as well as Kafka Streams.原始数据层:本质上这是我们的数据湖和基础层。 数据从我们所有的源中提取到该层中。 数据提取是从数据库以及Kafka Streams完成的。
  2. Cleaned / Transformed / Enriched Data Layer: This layer stores data in structures which are directly consumable by our analytics or machine learning applications. Jobs take data from our lake, clean and transform it into standardised structures creating Primary Data. There are jobs which also merged changes to create an updated state. Primary Data is further enriched to create Secondary or Tertiary Data. Jobs also create and save Feature vectors in this layer. Feature vectors are designed to be used in multiple subsequent algorithms. For example, the Content Feature vector is used for Section/Topic classification. Same feature vector, enhanced over time to include consumption information, was used for Newsletter candidate selection & recommendation.清洁/转换/丰富的数据层:此层将数据存储在结构中,这些结构可直接由我们的分析或机器学习应用程序使用。 作业从我们的湖泊中获取数据,进行清理并将其转换为标准化结构,从而创建基本数据。 有些作业还合并了更改以创建更新状态。 进一步丰富了主数据以创建辅助或第三数据。 作业还会在此层中创建和保存要素向量。 特征向量被设计用于多种后续算法。 例如,内容特征向量用于部分/主题分类。 随时间推移增强的相同特征向量包括消费信息,用于新闻通讯候选人的选择和推荐。
  3. Processed Output Layer: Analytics and Model outputs are stored in this layer. Also trained models too are stored in this layer, for subsequent use.处理的输出层:分析和模型输出存储在此层中。 训练有素的模型也存储在此层中,以备后用。

System Architecture:

系统架构:

All the jobs/applications that we made catered to either data ingestion, processing or output consumption. Thus we built a 3 tiered application layer for all our processing.

我们提供的所有作业/应用程序都可以满足数据摄取,处理或输出消耗的需求。 因此,我们为所有处理构建了一个3层的应用程序层。

  • Data Ingestion Layer: This layer includes batch jobs to import data from RDBMS and Document storage. We used Apache Sqoop for ingestion jobs. There are a bunch of jobs to ingest data from Kafka message streams. For example user activity data. Apache Netty based Rest API Server collects activity data, which is pushed to Kafka. Apache Flink based jobs consume the activity data from Kafka, generate basic statistics and also push the data to HDFS.数据摄取层:该层包括批处理作业,以从RDBMS和文档存储导入数据。 我们使用Apache Sqoop进行提取作业。 有很多作业可以从Kafka消息流中提取数据。 例如用户活动数据。 基于Apache Netty的Rest API Server收集活动数据,该数据被推送到Kafka。 基于Apache Flink的作业会使用来自Kafka的活动数据,生成基本统计信息,还将数据推送到HDFS。
  • Data Processing: We used Apache Spark jobs for all our processing. It includes jobs for cleaning, enhancements, feature vector builders, ML models and model output generation. The jobs are written in Java, Scala as well as Python.数据处理:我们使用Apache Spark作业进行所有处理。 它包括清洁,增强,特征向量生成器,ML模型和模型输出生成的工作。 这些作业用Java,Scala和Python编写。
  • Result Consumption: Processed output was pushed to RDBMS as well as Redis for consumption. The jobs were either built on Spark or Sqoop. The output is further exposed by Spring Boot Rest API endpoints for consumption. Further to this the same results were pushed out in event streams for further downstream processing or consumption.结果消耗:处理后的输出被推送到RDBMS以及Redis进行消耗。 这些作业是基于Spark或Sqoop构建的。 Spring Boot Rest API端点进一步公开了输出以供使用。 除此之外,在事件流中推出了相同的结果,以供进一步的下游处理或使用。

Team Setup:

团队设置:

This was the most crucial aspect for the success of the entire enterprise. There were two needs that were required to be fulfilled:

这是整个企业成功的最关键方面。 需要满足两个需求:

  1. Skill in understanding and applying machine learning principles and tools.理解和应用机器学习原理和工具的技能。
  2. Knowledge of our domain. Deep understanding of the content types, important aspects of content, how it matures, dies, what all things affect it etc.我们的领域知识。 对内容类型,内容的重要方面,如何成熟,消亡,所有事物对其产生什么影响等方面的深刻理解。

Also, when it came to be known that we were planning ML based products, there were a lot of people in our existing team who wanted to be part of such an initiative. Also, it was important for us to ensure that we cater to the aspirations of our existing team members too.

另外,当我们得知我们正在计划基于ML的产品时,我们现有团队中的很多人都希望成为此类计划的一部分。 同样,对我们来说,确保我们也能满足现有团队成员的愿望也很重要。

Moreover, the overall system design meant that there were two distinct parts of the problem, the core ML section and the peripherals which were more like good old software engineering.

而且,整个系统的设计意味着问题有两个截然不同的部分,核心ML部分和外围设备,它们更像是好的旧软件工程。

We decided to build our team with a combination two sets of people:

我们决定由两组人组成一个团队:

  1. Data Science experts, whom we hired. They were entrusted with the data science part of the puzzle. They also taught other team members and mentored their learning process.我们聘请的数据科学专家。 他们被赋予了难题中的数据科学部分。 他们还教了其他团队成员,并指导了他们的学习过程。
  2. System development team, who were people picked from our existing team. They built the ingestion pipelines, stream processing engines, output consumption API’s etc.系统开发团队是从我们现有团队中挑选出来的。 他们建立了摄取管道,流处理引擎,输出消耗API等。

Also, by taking people from our existing team, we were able to get the ingestion pipelines development going while we were hiring the data science people. Thus, we were able to kick start work from day one, figuratively speaking.

此外,通过从现有团队中聘用人员,我们能够在雇用数据科学人员的同时推动提取管道的开发。 因此,可以说,从第一天开始我们就可以开始工作。

As is illustrated through our experience, building a bunch of applications for training models and generating output is only a beginning. Building a system and team to harness them is an entirely different proposition.

正如我们的经验所表明的那样,构建大量用于训练模型的应用程序并生成输出只是一个开始。 建立一个系统和团队来利用它们是完全不同的主张。

翻译自: https://medium.com/@bmallick/building-a-ml-system-for-production-667923c4389e

机器学习 建立模型


http://www.taodudu.cc/news/show-997616.html

相关文章:

  • 风能matlab仿真_发现潜力:使用计算机视觉对可再生风能发电场的主要区域进行分类(第1部分)
  • 实验人员考评指标_了解实验指标
  • nba数据库统计_NBA板块的价值-从统计学上讲
  • 两个链接合并_如何找到两个链接列表的合并点
  • 工程师的成熟模型_数据工程师的成熟度
  • scrape创建_确实在2分钟内对Scrape公司进行了评论和评分
  • 如何不认识自己
  • plotly python_使用Plotly for Python时的基本思路
  • java项目经验行业_行业研究以及如何炫耀您的项目
  • 数据科学 python_适用于数据科学的Python vs(和)R
  • r怎么对两组数据统计检验_数据科学中最常用的统计检验是什么
  • 深度学习概述_深度感测框架概述
  • 为什么即使在班级均衡的情况下,准确度仍然令人困扰
  • 接受拒绝算法_通过算法拒绝大学学位
  • 为什么用scrum_为什么Scrum糟糕于数据科学
  • 使用集合映射和关联关系映射_使用R进行基因ID映射
  • 详尽kmp_详尽的分步指南,用于数据准备
  • SMSSMS垃圾邮件检测器的专业攻击
  • 使用Python进行地理编码和反向地理编码
  • grafana 创建仪表盘_创建仪表盘前要问的三个问题
  • 大数据对社交媒体的影响_数据如何影响媒体,广告和娱乐职业
  • python 装饰器装饰类_5分钟的Python装饰器指南
  • 机器学习实际应用_机器学习的实际好处是什么?
  • mysql 时间推移_随着时间的推移可视化COVID-19新案例
  • 海量数据寻找最频繁的数据_寻找数据科学家的“原因”
  • kaggle比赛数据_表格数据二进制分类:来自5个Kaggle比赛的所有技巧和窍门
  • netflix_Netflix的Polynote
  • 气流与路易吉,阿戈,MLFlow,KubeFlow
  • 顶级数据恢复_顶级R数据科学图书馆
  • 大数据 notebook_Dockerless Notebook:数据科学期待已久的未来

机器学习 建立模型_建立生产的机器学习系统相关推荐

  1. 生命周期模型_建立从思想到价值的生命周期模型

    生命周期模型 数据科学家来自火星,软件工程师来自金星(第4部分)(DATA SCIENTISTS ARE FROM MARS AND SOFTWARE ENGINEERS ARE FROM VENUS ...

  2. 预测股票价格 模型_建立有马模型来预测股票价格

    预测股票价格 模型 前言 (Preface) If you are reading this, it's most likely because you love to solve puzzles. ...

  3. 机器学习管道模型_使用连续机器学习来运行您的ml管道

    机器学习管道模型 Vaithy NarayananVaithy Narayanan Follow跟随 Jul 15 7月15 使用连续机器学习来运行ML管道 (Using Continuous Mac ...

  4. lr模型和dnn模型_建立ML或DNN模型的技巧

    lr模型和dnn模型 机器学习 (Machine Learning) Everyone can fit data into any model machine learning or deep lea ...

  5. 机器学习多元线性回归_过度简化的机器学习(1):多元回归

    机器学习多元线性回归 The term machine learning may sound provocative. Machines do not learn like humans do. Ho ...

  6. 不使用机器学习的机器视觉_我关于使用机器学习进行体育博彩的发现使博彩公司总能胜出

    不使用机器学习的机器视觉 One afternoon, in the middle of my holidays the thought of using machine learning to pr ...

  7. bgb邻居关系建立模型_知识图谱上的双塔召回:阿里的IntentGC模型

    关注本人的同学可能发现,我最近点评的文章都是关于"GNN在推荐系统应用"方向的.这当然与现如今这个方向非常火有关,但是作为一个合格的炼丹师+调参侠,总要搞清楚一门技术为什么火?这么 ...

  8. 机器学习框架_编写生产级机器学习框架的经验教训

    机器学习框架 My wonderful colleagues at Atomwise and I have written a production-level PyTorch framework f ...

  9. 持久化模型_建立领域模型-持久性不可知论简介

    持久化模型 With so much water flowing under the Domain Models bridge over the last few years, it's rather ...

最新文章

  1. AI 的十种 “新数学”
  2. 如何在Go中编写多行字符串?
  3. 有nativeQuery = true和没有的区别
  4. Redux中的功能式React式编程简介
  5. Keras---text.Tokenizer:文本与序列预处理
  6. Photoshop修复和合成梦幻人物
  7. java拼装树_java 数据拼装成树结构
  8. P2805 [NOI2009]植物大战僵尸
  9. js限制文本框只能输入数字方法小结(转)
  10. Android系统 ——高通平台刷机流程(qfil)
  11. Vapnik-Chervonenkis
  12. 电钻有刷好还是无刷好_有刷电机与无刷电机究竟哪个好?看完就知道了!
  13. steam换头像出现服务器错误_推特热搜第二!史上bug最多的游戏终于出现…
  14. 猿人学web端爬虫攻防大赛赛题解析_第七题:动态字体,随风漂移
  15. Linux系统制作ios镜像Mondo Rescue工具安装及使用
  16. MySQL 通过子查询批量插入数据
  17. Linux LCD 驱动
  18. MAC下搭建Hexo博客
  19. 免费资源跟IT常用链接
  20. python调用mysql数据_python使用mysql数据库(虫师)

热门文章

  1. 2019.04.09 电商25 结算功能1
  2. 8597 石子划分问题 dpdp,只考虑第一次即可
  3. 使用 Arduino 和 LM35 温度传感器监测温度
  4. 【Top1】Tudou.com首页网页设计的制作方法
  5. Rancher中的服务升级实验
  6. Centos7下使用ELK(Elasticsearch + Logstash + Kibana)搭建日志集中分析平台
  7. HadoopHA集群搭建
  8. apache 虚拟主机详细配置:http.conf配置详解
  9. 如何使用HTTP压缩优化服务器
  10. repcached配置与简单測试