+ Reply to Thread
Results 1 to 3 of 3

Help with Formula/ Power Query to calculate Precision and Recall metrics

  1. #1
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Red face Help with Formula/ Power Query to calculate Precision and Recall metrics

    Hi Team,

    I have the coding data generated by an automated model and then the coding data being generated by a human agent..I want to compare the same to generate the two metrics -precision and recall...In my input file the data is at a ctextid ,vbillid level...I need to compared the agentcode -code generated by human versus the predictcode (code generated by human)..

    The precision metric is calculated as follows: Overlap of count of codes between agentcode and predictcode/ len(predictcode) *100
    The recall metric is calculated as follows:Overlap of count of codes between agentcode and predictcode/ len(agentcode) *100

    Can you please help me here...

    Thanks,
    Arun
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Help with Formula/ Power Query to calculate Precision and Recall metrics

    Please Login or Register  to view this content.
    In E2

    =p_c($C2,$D2,1)

    in F2

    =p_c($C2,$D2,2)
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Help with Formula/ Power Query to calculate Precision and Recall metrics

    Please try

    =ROWS(FILTERXML("<x><m>"&SUBSTITUTE(C2&","&D2,",","</m><m>")&"</m></x>","//m[preceding::*=.]"))/(LEN(C2:D2)-LEN(SUBSTITUTE(C2:D2,",",))+1)
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA or Marco of formula help to calculate metrics NEEDED!!!
    By elginamboree in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2021, 07:59 PM
  2. Replies: 19
    Last Post: 06-30-2020, 03:16 AM
  3. [SOLVED] Power Query - excel formula translation into Power Query
    By afgi in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 02-19-2020, 03:38 AM
  4. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  5. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  6. Replies: 15
    Last Post: 03-29-2018, 11:29 AM
  7. Replies: 1
    Last Post: 11-05-2013, 06:54 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1