aisquared.config.feedback package
Submodules
aisquared.config.feedback.BinaryFeedback module
- class aisquared.config.feedback.BinaryFeedback.BinaryFeedback(label_map: list)[source]
Bases:
BaseObject
Feedback for binary classification
Example usage:
>>> import aisquared >>> my_obj = aisquared.config.feedback.BinaryFeedback(['class1', 'class2']) >>> my_obj.to_dict() {'className': 'BinaryFeedback', 'params': {'labelMap': ['class1', 'class2']}}
- property label_map
aisquared.config.feedback.ModelFeedback module
- class aisquared.config.feedback.ModelFeedback.ModelFeedback[source]
Bases:
BaseObject
Feedback object for questions and answers for an individual model.
Example usage:
>>> import aisquared >>> my_obj = aisquared.config.feedback.ModelFeedback() >>> my_obj.add_question( 'How is the model performing?', choices = ['very poorly', 'poorly', 'neutral', 'well', 'very well'] ) >>> my_obj.add_question( 'Any additional feedback?', 'text' ) >>> my_obj.to_dict() {'className': 'ModelFeedback', 'params': {'questions': [{'question': 'How is the model performing?', 'answerType': 'singleChoice', 'choices': ['very poorly', 'poorly', 'neutral', 'well', 'very well']}, {'question': 'Any additional feedback?', 'answerType': 'text'}]}}
- add_question(question: str, answer_type: str = 'singleChoice', choices: list = [])[source]
Add a question to be asked.
- Parameters:
question (str) – The question to be asked.
answer_type (str (default 'singleChoice')) – One of either ‘singleChoice’, ‘multiChoice’, or ‘text’
choices (list (default [])) – The choices to be provided, if answer_type is ‘singleChoice’ or ‘multiChoice’
aisquared.config.feedback.MulticlassFeedback module
- class aisquared.config.feedback.MulticlassFeedback.MulticlassFeedback(label_map: list)[source]
Bases:
BaseObject
Feedback for multiclass classification
Example Usage:
>>> import aisquared >>> my_obj = aisquared.config.feedback.MulticlassFeedback(['class1', 'class2', 'class3']) >>> my_obj.to_dict() {'className': 'MulticlassFeedback', 'params': {'labelMap': ['class1', 'class2', 'class3']}}
- property label_map
aisquared.config.feedback.QualitativeFeedback module
- class aisquared.config.feedback.QualitativeFeedback.QualitativeFeedback[source]
Bases:
BaseObject
Feedback object for questions and answers for individual predictions.
Example usage:
>>> import aisquared >>> my_obj = aisquared.config.feedback.QualitativeFeedback() >>> my_obj.add_question('Any additional feedback?', 'text') >>> my_obj.to_dict() {'className': 'QualitativeFeedback', 'params': {'questions': [{'question': 'Any additional feedback?', 'answerType': 'text'}]}}
- add_question(question: str, answer_type: str = 'singleChoice', choices: list = [])[source]
Add a question to be asked.
- Parameters:
question (str) – The question to be asked.
answer_type (str (default 'singleChoice')) – One of either ‘singleChoice’, ‘multiChoice’, or ‘text’
choices (list (default [])) – The choices to be provided, if answer_type is ‘singleChoice’ or ‘multiChoice’
aisquared.config.feedback.RegressionFeedback module
- class aisquared.config.feedback.RegressionFeedback.RegressionFeedback[source]
Bases:
BaseObject
Feedback for regression
Example usage:
>>> import aisquared >>> my_obj = aisquared.config.feedback.RegressionFeedback() >>> my_obj.to_dict() {'className': 'RegressionFeedback', 'params': {}}
aisquared.config.feedback.SimpleFeedback module
- class aisquared.config.feedback.SimpleFeedback.SimpleFeedback[source]
Bases:
BaseObject
Simple thumbs-up/thumbs-down feedback for predictions
Example usage:
>>> import aisquared >>> my_obj = aisquared.config.feedback.SimpleFeedback() >>> my_obj.to_dict() {'className': 'SimpleFeedback', 'params': {}}
Module contents
The aisquared.config.feedback subpackage contains objects for configuring feedback in aisquared models.