簡體   English   中英

尋找降低機器學習分類誤報率的想法

[英]Looking for ideas to lower the false positive rate in Machine Learning Classification

有沒有辦法降低經典欺詐預測問題中的誤報率。 目前我正在研究經典的欺詐檢測。 真實標簽樣本50000份(結果待查)。 這些訓練標簽相當平衡。 我選擇的邏輯回歸 model 表現良好,f1 得分超過 90%。 現在當使用 model 預測新案例時,結果為 50/50(欺詐和非欺詐)。 有沒有辦法調整 model 讓通過非欺詐案件並懲罰誤報率,以便我們檢測到更少數量的欺詐案件(可能少於一百萬中的 200),但它們很可能是欺詐。 希望清除。

以下是邏輯回歸 model 采用的所有參數。

sklearn.linear_model.LogisticRegression(penalty='l2', *, dual=False, tol=0.0001, C=1.0, fit_intercept=True, intercept_scaling=1, class_weight=None, random_state=None, solver='lbfgs', max_iter=100, multi_class='auto', verbose=0, warm_start=False, n_jobs=None, l1_ratio=None)

大多數情況下,默認值運行良好,因此,如果您更改了參數,請嘗試使用默認值。 如果您已經在使用默認參數但結果仍然很差,那么您可能需要根據您的數據集更改參數值。 為此,您需要知道所有這些參數的含義。 如果您不知道,請點擊此鏈接

因此,您想讓 model 更頻繁地預測“非欺詐”。 取決於您使用的 model。 如果您希望您可以自由設置邏輯回歸 model 的 output 的閾值,該閾值僅允許 output 實際上更接近 1 的實例被歸類為“Fraud”。 例如,這可以在 sklearn 中通過使用 predict_log_proba(X) 或 predict_proba(X)(對數概率或概率)訪問 model 的 output 概率來完成。 (來源: https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression

If your model is supposed to output 1 for 'Fraud', you may threshold the output using an if (if output > 0.8 then 'Fraud').

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM