iT邦幫忙

2019 iT 邦幫忙鐵人賽

DAY 26
0
Everything on Azure

Azure Machine Learning Studio系列 第 26

Azure Machine Learning Studio 文字分析 Preprocess Text

  • 分享至 

  • twitterImage
  •  

若資料集有包含大量文字,而且需要使用此資料來協助預測,在 Azure Machine Learning Studio 中,可以使用 Preprocess Text 來處理文字資料,目前支援 6 種語言:

  • 英文
  • 西班牙文
  • 法文
  • 荷蘭文
  • 德文
  • 義大利文

https://ithelp.ithome.com.tw/upload/images/20181108/20111935GEyZGMqAkA.png

Preprocess Text 文字分析可以執行以下處理,Ex:清除 the , a 等常見單字、數字、特殊字元、重複字元、電子郵件地址、URL...等文字,將單字轉為小寫,句子間用 ||| 隔開:
https://ithelp.ithome.com.tw/upload/images/20181108/201119355Fl4CIJmcN.png

  1. 【Dataset】新增資料集:Book Reviews from Amazon 書籍評價資料集,包含兩個欄位,一個是評分,一個是文字評論
    https://ithelp.ithome.com.tw/upload/images/20181108/20111935VXSkiXz4LH.png

  2. 【Edit Metadata】將評分欄位 Col 1 設為 Make categorical
    https://ithelp.ithome.com.tw/upload/images/20181108/20111935lqe2LgrG1T.png

  3. 【Group Categorical Values】新增 Group Categorical Values ,將評分欄位 Col1 的值分為低分、高分兩種
    https://ithelp.ithome.com.tw/upload/images/20181108/20111935HPOfAK5zVY.png

  4. 【Preprocess Text】新增 Preprocess Text,選擇 Col2 文字評論欄位,使用預設勾選的文字處理,可以清除雜訊資料,找出重要的特徵
    https://ithelp.ithome.com.tw/upload/images/20181108/20111935LfANNXeAug.png

    可以看到新的欄位 Preprocessed Col2 為 Col 2 的文字處理後的結果
    https://ithelp.ithome.com.tw/upload/images/20181108/20111935Qdz01qnsYc.png

  5. 【Split Data】將資料切分為訓練集、測試集資料

  6. 【Extract N-Gram Features from Text】新增 Extract N-Gram Features from Text,從剛剛處理過的文字中,選取與預測目標最相關的特徵
    https://ithelp.ithome.com.tw/upload/images/20181108/201119351iaK8S7Dab.png

    設定以下屬性:
    https://ithelp.ithome.com.tw/upload/images/20181108/20111935HLNpQMlkse.png

    https://ithelp.ithome.com.tw/upload/images/20181108/20111935Ym9iAbdmzT.png

  7. 【Train Model】訓練模型

  8. 【Two-Class Logistic Regression】二元分類邏輯迴歸分析
    https://ithelp.ithome.com.tw/upload/images/20181108/20111935Xy68TSUVRK.png

  9. 【Extract N-Gram Features from Text】再新增一個 Extract N-Gram Features from Text,來處理測試資料集

  10. 【Score Model】計分模型:執行預測
    https://ithelp.ithome.com.tw/upload/images/20181108/20111935oOxSkDa295.png

    設定以下屬性:
    https://ithelp.ithome.com.tw/upload/images/20181108/20111935ujk31PYJnM.png

    https://ithelp.ithome.com.tw/upload/images/20181108/20111935uyvHFHNAlR.png

  11. 【Evalute Model】評分模型:查看預測結果
    https://ithelp.ithome.com.tw/upload/images/20181108/20111935kcRfl5y5za.png

參考文章:在 Azure Machine Learning Studio 中建立文字分析模型


上一篇
Azure Machine Learning Studio 推薦模型 Train Matchbox Recommender
下一篇
Azure Machine Learning Studio 使用 SQL 語法 Apply SQL Transformation
系列文
Azure Machine Learning Studio30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言