Estimates
15min
/create model create a baseline roi estimation model that is siloed for your organization these models are trained on a minimal amount of data request parameters model name a reference name for the model must be unique among the models created in your account must not include spaces example request { model name \["new donors"] } response parameters model id a unique id associated with your model initial evaluation metrics a nested json library of evaluation metrics associated with this starter model as you fine tune the model with your own data (using the /fine tune model endpoint), these metrics will improve example response { model id \["sdf4dfc"], initial evaluation metrics { donations { area under roc curve 0 65, gain detected by model 0 23, mean absolute percentage error 0 34, precision 0 74, recall 0 84 }, amount raised { area under roc curve 0 61, gain detected by model 0 12, mean absolute percentage error 0 38, precision 0 53, recall 0 60 }, opt outs { area under roc curve 0 65, gain detected by model 0 10, mean absolute percentage error 0 12, precision 0 82, recall 0 79 } } } /fine tune model use your own internal data on dispatched text messages, the audiences that received them, and the aggregate observed outcomes to improve the model the data you send to this endpoint will not be accessible in any way to users outside of your organization request parameters model id unique id of the model you wish to fine tune, as generated by the /create model endpoint csv url public url of a csv with the following fields text message , image (optional), audience size , audience percent past donors (optional), audience mean past donation (optional), donations , amount raised , opt outs authorize payment boolean (true or false) indicating whether you are approving us to debit your credit balance example request { object type \["matched audience"], object id \["xcrfsdf3"], authorize payment \[true] } response parameters status a message indicating whether the payment was successful possible values include “success” and “error” error details if the payment was unsuccessful, details will be provided credits used the number of credits used in this transaction credits remaining the number of credits remaining in your account example response { status \["success"], error details \[], credits used \[450], credits remaining \[49550] } { status \["error"], error details \["invalid id provided "], credits used \[0], credits remaining \[50000] } /estimate performance specify a model, high level audience traits, and a text message then receive estimates of how that text message will perform with the given audience request parameters model id unique id first generated by the /create model endpoint audience size the number of people who will receive the text message audience percent past donors the percent of recipients who have made a known donation in the past (optional) audience mean past donation the average donation given by text message recipients in the past (optional) text message the text message you are intending to evaluate the format should match the examples used in the /fine tune model endpoint image the url of any image you might be sending with your text message example request { model id \["h535dd9f"], audience size \[55000], audience percent past donors \[0 45], audience mean past donation \[], text message \["hi dan! this is tony the tiger i'm running in a tight race against the domino's noid and i need $5 now!" image \["https //test com/avoidthenoid png"] } response parameters estimated donations the range of donations expected, with an 80% confidence level estimated amount raised the range of total gross returns expected, with an 80% confidence level estimated opt outs the range of opt outs expected, with an 80% confidence level example response { estimated donations { minimum \[15], maximum \[43], confidence level \[0 8] }, estimated amount raised { minimum \[242], maximum \[629], confidence level \[0 8] }, estimated opt outs { minimum \[3405], maximum \[12439], confidence level \[0 8] } }