# ML Life Cycle for LINE Shopping Recommender - 黃昱睿(Rei Huang) {%hackmd @HWDC/BJOE4qInR %} >#### 》[議程介紹](https://hwdc.ithome.com.tw/2024/session-page/3313) >#### 》[填寫議程滿意度問卷|回饋建言給辛苦的講者](https://forms.gle/K8XJtgjM9w1rXeRb7) ## sketch of ML life cycle * business issue * problem definition * ML problem * ML model building * A/B test * Evaluation * Decision ## business issue 通過 AI 提升公司獲利 ## Problem definition > identify the core issue. Focus on the primary problem. 提升獲利的傳統方案 * 折扣券 * 設計產品 * 提升用戶體驗 * 改善流程,招商 * 推薦系統 ### user journey funnel chart * pageview * click * transfer page * orders ## transform as ML problem > 定義和量化什麼為用戶感興趣 感興趣的定義:用戶未來幾天想要看的商品 計算方式 * regession (導致熱門商品會壓倒性的出現) * classifiction (相對來說會讓商品更多樣性) ## modeling * feature engineering * model data * model traning * model inference * offline evaluation ### feature engineering * behavior features * 例子 1. 年齡30~40歲,點幾了某商品 2. 年齡30~40歲的男性,點幾了某商品 3. 年齡30~40歲的男性,在首頁點幾了某商品 * features 不一定是越多越好,可以通過後續的資料驗證來驗證 feature 的有效性 ### model data 合併所有 feature 的資料 需要勘查的部分 * 合併多少資料?多久? * 整理資料的再加工 ### model training * 各項指標是否逐步提升? * 需要確定 base line 來量化 model 是否有助於提升 * 多組模型比較成效 ### model inference * embedding size * 維度少,資料小,但同時也特徵少 * inference time ### offline evaluation * 上線前的成效見真章 * 確認有無 over fitting ## execute A/B test 核心概念 1. 均勻分佈 * 全母體均勻或者 active user 均勻 3. 執行同一個實驗, user 的組別是固定的 * 每次進入網站時分為 A or B * user based or session based 5. 同一個實驗,若增加實驗比率,實驗組不變 7. 高計算效率 ## evaluation ### metric 注重兩個指標 * ML metric * Precision * MRR * business metric * CTR * CVR 若 ML metric 表現好,但 business metric 不好,意味著 problem definition 的定義方向有問題 ### feature correlation ### monitoring ## decision ## 總結 engineering 和 product owner 之間需要好的合作