MLUserFeedbackMixin#

class MLUserFeedbackMixin#

Bases: object

Methods Summary

delete_feedback(project_id, feedback_id)

Delete User Feedback.

get_feedback(project_id, feedback_id)

Get a single User Feedback.

get_feedbacks(project_id[, user_name, ...])

Return the user feedbacks for a project in a list.

get_labels_per_model(project_id[, model_id])

Get the classification labels of models.

modify_feedback(project_id, feedback_id[, ...])

Modify an existing User Feedback.

new_feedback(project_id, feedback, action[, ...])

Create a new User Feedback.

Methods Documentation

delete_feedback(project_id, feedback_id)#

Delete User Feedback.

Parameters:
  • project_id – Id of the Squirro project.

  • feedback_id – Id of the User Feedback.

get_feedback(project_id, feedback_id)#

Get a single User Feedback.

Parameters:
  • project_id – Id of the Squirro project.

  • feedback_id – Id of the User Feedback

get_feedbacks(project_id, user_name=None, user_id=None, model_id=None, groundtruth_id=None, label=None, extract_query=None, item_id=None, processed=False, exclude_body=True, count=100, start=0)#

Return the user feedbacks for a project in a list.

Parameters:
  • project_id – Id of the Squirro project

  • user_name – user_name to filter by

  • user_id – user_id to filter by

  • model_id – Id of the Model to filter by

  • groundtruth_id – Id of the GroundTruth to filter by

  • label – label to filter GroundTruth by

  • extract_query – text to filter the feedback extracts by

  • item_id – item_id to filter by

  • processed – filter by processed or unprocessed feedbacks. Default is False

  • exclude_body – Exclude body in the return of a document level feedback

  • count – Max number of feedbacks return per result

  • start – Zero based starting point

Returns:

get_labels_per_model(project_id, model_id=None)#

Get the classification labels of models.

Parameters:
  • project_id – Id of the Squirro project.

  • model_id – Id of a Model. If it is not given, then the labels of all the the models in the given project are returned.

modify_feedback(project_id, feedback_id, action=None, suggested_label=None, suggested_model_id=None, groundtruth_label_id=None, selected_label=None, processed=None, state=None)#

Modify an existing User Feedback.

Parameters:
  • project_id – Id of the Squirro project.

  • feedback_id – Id of the User Feedback

  • action – Dictionary of the user assessment

  • suggested_label – Suggested label for the feedback element

  • suggested_model_id – Model identifier of the suggested label

  • groundtruth_label_id – Id of the label that was created from this feedback

  • selected_label – label tag that was selected from this feedback

  • processed – Indication flag of a processed feedback

  • state – State of the feedback element

Returns:

new_feedback(project_id, feedback, action, suggested_label=None, suggested_model_id=None)#

Create a new User Feedback.

Parameters:
  • project_id – Id of the Squirro project.

  • feedback – Dictionary of the feedback element

  • action – Dictionary of the user assessment

  • suggested_label – Suggested label for the feedback element

  • suggested_model_id – Model identifier of the suggested label

Returns: