cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tom_Eering
Frequent Visitor

Highest Classification Score

Hi,

 

I have made a AI model that classifies text, this classification is used further in a flow.

Sometimes a text gets 2 classifications. When this happens the step comes in a "for each " block.

 

Is it possible to only use the highest score as classification. By setting it as variable for example? 

1 ACCEPTED SOLUTION

Accepted Solutions
Antrod
Microsoft
Microsoft

Hi @Tom_Eering,

 

Using variables and conditions you should be able to achieve that. What you can do is store the highest confidence with the associated classification in an object and update it if current confidence value if higher that the stored value:

Antrod_0-1641912796458.png

Antrod_1-1641912826025.png

 

Formulas I used in the condition action are:

item()['confidence']

variables('MaxConfidence')['confidence']

 

Hope that helps.

 

Thanks.

 

View solution in original post

2 REPLIES 2
Antrod
Microsoft
Microsoft

Hi @Tom_Eering,

 

Using variables and conditions you should be able to achieve that. What you can do is store the highest confidence with the associated classification in an object and update it if current confidence value if higher that the stored value:

Antrod_0-1641912796458.png

Antrod_1-1641912826025.png

 

Formulas I used in the condition action are:

item()['confidence']

variables('MaxConfidence')['confidence']

 

Hope that helps.

 

Thanks.

 

Tom_Eering
Frequent Visitor

@AntrodThank you very much exactly what I meant.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Kudoed Authors
Users online (1,384)