Emotion-probability-plugin
==========================
###### tags: `HRI`
[TOC]
## Description
### Eric
> I would propose a scoring metric something like this:
> * ```
> probability_emote = w * emotion_confidence + (1 - w) * frequency_penalty
> Where:
> * emotion_confidence: a score from 0.0 to 1.0 representing the emotion model’s confidence in it’s classification results
> * frequency_penalty: a score from 0.0 to 1.0 where a high score penalizes frequent emotes
> * ```
> frequency_penalty = 1 - emotion_frequency
> * w: a weight from 0.0 to 1.0 that controls the balance between emotion_confidence and frequency_penalty
> * Then you generate a random number between 0.0 and 1.0 and emote if it is greater than probability_emote
> * You will have to set frequency_penalty and w through trial and error, but you can start with setting w=0.5 and giving the emotion classifier and frequency penalty equal weight.
> * Setting w=1.0 would disable the frequency penalty altogether
### To discuss
[Analysis](https://docs.google.com/presentation/d/1KeiAKtmqzzR0IbbP8D5gqI-Uqjzlf8jQq_zMuVDyKQM/edit#slide=id.g113622ce877_0_154)
### Creating a Plugin for Behavior Tree
- Input-Output
- emotion_confidence: float between 0 and 1
- emotion_frequency: float between 0 and 1
- w: float between 0 and 1
- show_emotions: bool

- The Sub-Tree

---
## Old Suggestion (Ignore)
:::spoiler 1. Ratio
```
num_sentences = 0
num_non-neutral-sentences = 0
ratio = 0.7
LOOP
if (ratio*num_sentences > num_non-neutral-sentences and genre == non-neutral)
then
use non-neutral genre
num_non-neutral-sentences += 1
else
use neutral genre
num_sentences += 1
```
:::
<!-- {%hackmd theme-dark %} -->
## Compare Equations
### Table
| | PE1 | PE2 |
| --- | ---------------------------------------------------- | ---------------------------------------- |
| Eq | w * emotion_confidence + (1 - w) * frequency_penalty | 1 - e ^ (- w * emotion_confidence / frequency) |
| ec | PE1 | PE2 |
| --- | ------------------------------------ | ------------------------------------ |
| 0 |  |  |
| 1 |  |  |
### PE1


### PE2






