iERP-ai / businesswithcovid-generator

Script generating data for the businesswithcorona.com - generatorrrr
http://businesswithcorona.com
0 stars 0 forks source link

Calculate business score prediction #5

Closed flesicek closed 4 years ago

flesicek commented 4 years ago

For now, business score prediction will be done using rules. We will add AI as second step later.

rules will look into historical calculated business score first to determine how the score should looks like. This is an illustrative image: sample image

Rules:

  1. if today's business score is less than 3 ->

    • today+1 - today+21 = will be equal current business score
  2. if "val1" is more than 8 and "len1" is higher than 14 ->

    • today+1 - today+4 = today's business score
    • if "val2" is less than 7 -> today+5 - today+21 = val2
    • if "val2" is more or equal 7 -> today+5 - today+21 = (val2 - 1)
  3. if "val1" < "val2" and "len1" is higher than 5 days ->

    • today+1 - today+4 = today's business score
    • today+5 - today+21 = val1*0.6
  4. if "val1" is more than 8 and "len1" is lower than 14 ->

    • today+1 - today+(14-"len1") = today's business score
    • if "val2" is less than 7 -> today+(14-"len1") - today+21 = val2
    • if "val2" is more or equal 7 -> today+(14-"len1") - today+21 = (val2 - 1)
  5. if "val1" > "val2" and val1 is between 3 and 5 ->

    • today+1 - today+4 = today's business score
    • today+5 - today+21 = 8
  6. if "val1" > "val2" and val1 is between 5 and 8 ->

    • today+1 - today+4 = today's business score
    • today+5 - today+21 = 8.2
  7. if "val1" < "val2" and "len1" is higher than 5 days ->

    • today+1 - today+4 = today's business score
    • today+5 - today+21 = val1*0.6

generate a prediction based on these rules into a big array for each country.

tommycarstensen commented 4 years ago

What if val1=7.575, val2=8.945, len1=1, len2=5; i.e. val1 < val2 and len1 < 5?

[1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.0699999999999998, 1.0699999999999998, 1.0699999999999998, 1.0699999999999998, 1.0699999999999998, 1.0699999999999998, 1.0699999999999998, 1.77, 1.77, 2.77, 2.77, 2.77, 5.32, 5.32, 5.32, 5.32, 8.32, 8.32, 8.32, 8.32, 8.32, 8.32, 8.32, 8.32, 8.32, 8.32, 8.945, 8.945, 8.695, 8.695, 8.695, 8.945, 8.945, 8.945, 8.945, 8.945, 7.575]
flesicek commented 4 years ago

if “val1” < “val2" and “len1” is lower than 5 days -> today+1 - today+4 = today’s business score today+5 - today+21 = val1*0.8

dukosk commented 4 years ago

Hu guys, sorry for being late to the party, below are reviewed and adjusted rules, my comments are bolted and only ones with comments should be changed. Thanks! Rules:

  1. if today's business score is less than 3 ->

    • today+1 - today+21 = will be equal current business score
  2. if "val1" is more than 8 and "len1" is higher than 14 -> DK: here should be one more condition “and Val1 is more than Val2”

    • today+1 - today+4 = today's business score
    • if "val2" is less than 7 -> today+5 - today+21 = val2 DK: this should be value “7”
    • if "val2" is more or equal 7 -> today+5 - today+21 = (val2 - 1) DK: this should be Val2
  3. if "val1" < "val2" and "len1" is higher than 5 days ->

    • today+1 - today+4 = today's business score
    • today+5 - today+21 = val1*0.6 DK: This should be Val2
  4. if "val1" is more than 8 and "len1" is lower than 14 -> DK: here should be one more condition “and Val1 is more than Val2”

    • today+1 - today+(14-"len1") = today's business score
    • if "val2" is less than 7 -> today+(14-"len1") - today+21 = val2 DK: this should be value “7”
    • if "val2" is more or equal 7 -> today+(14-"len1") - today+21 = (val2 - 1) DK: this should be Val2
  5. if "val1" > "val2" and val1 is between 3 and 5 ->

    • today+1 - today+4 = today's business score
    • today+5 - today+21 = 8
  6. if "val1" > "val2" and val1 is between 5 and 8 ->

    • today+1 - today+4 = today's business score
    • today+5 - today+21 = 8.2
  7. if "val1" < "val2" and "len1" is higher than 5 days ->DK: condition on duration should be “lower or equal than 5days”

    • today+1 - today+4 = today's business score
    • today+5 - today+21 = val1*0.6 generate a prediction based on these rules into a big array for each country.