When working with our platform, you'll encounter two related parameters: Influence (shown in the webapp) and Strength (used in the API). This article explains how these parameters relate to each other and how to convert between them.
Influence: A value ranging from 1 to 100 displayed in the webapp interface
Strength: The corresponding API parameter, ranging from 0.01 to 1.00
The conversion between Influence and Strength follows this formula:
Strength = 1 - Influence + 0.01
Here are some example conversions:
To convert an Influence value to its corresponding Strength:
Take your Influence value (1-100)
Subtract it from 1
Add 0.01
Round to 2 decimal places
For example:
If Influence = 80 -> Strength = 1 - 80 + 0.01 = 0.21
Here's the conversion function used in our system:
export const reverseStrength = (value: number): number => {
return parseFloat((1 - value + 0.01).toFixed(2));
};
Influence values should always be whole numbers between 1 and 100
Strength values will always be between 0.01 and 1.00
Results are always rounded to 2 decimal places
If you encounter any issues with parameter conversion or have questions, please contact our support team for assistance.
Was this helpful?