mikebryant / ac-nh-turnip-prices

Price calculator/predictor for Turnip prices
https://turnipprophet.io
Apache License 2.0
1.45k stars 245 forks source link

Confidence Graph #217

Open SvecTech opened 4 years ago

SvecTech commented 4 years ago

First, I wanted to say I love this calculator. Its amazing truly.

One suggestion I have is to possibly show on the graph the confidence between the min and max values. So in my example below, it shows that for Tues PM the max value is 190 and min is 57 but there's a 75% chance that the value is between 133 and 86. Showing that on the graph would be helpful.

graph chart
Current Values
Previous Pattern: Small Spike
Purchase: 95
Mon AM: 107
Mon PM: 105
Tues AM: 128
chadmiller commented 4 years ago

I don't think a confidence graph is right because there are several functions to choose among. A trend flat across at 200 and one flat across at 50, eg, should show that there is very little in the middle.

A better view would have a kind of heatmap of the predicted values. Paint a swath across with some semitransparent color, so that they add up in force.

The danger is that uneducated readers will interpret darkest as the direction they'll go, so please include a floating note, like "2% = 1 week out of 50, this will be you".

marianhlavac commented 4 years ago

A better view would have a kind of heatmap of the predicted values. Paint a swath across with some semitransparent color, so that they add up in force.

I like the heatmap idea.

SvecTech commented 4 years ago

Heatmap, confidence, anything would be an improvement since right now it looks like I have the potential to have 190 by Tues PM. But the odds of that happening are 0.00101%. It would be nice to have that visually represented on the graph in some way :)

Screen Shot 2020-04-21 at 1 28 59 PM
rpigott commented 4 years ago

@SvecTech That's actually a bug. With those prices you are guaranteed a fluctuating pattern.

There is some numerical instability that still needs to be worked out in the new method for accurately evaluating the probability in certain intervals for dependent decaying phases. With a 95 buy price the off peak price would need to exceed 1.4*95=133 to actually permit a small-spike pattern, but at 128 < 133 it does not.

theRTC204 commented 4 years ago

The screenshot suggests that the fudge factor was still in the equation when it was taken.

Without the fudge factor, there is no indication in the app that Small Spike would be possible. https://turnipprophet.io?prices=95.107.105.128.........&pattern=3

SvecTech commented 4 years ago

Ahh ok this is a much better graph from your link @theRTC204

I do think updating the graph would be great though. Since there are only 2 outcomes for Tuesday PM (either 86-133 or 57-77) it would be nice to see that on the graph. (Ie. there’s a 75% chance it’s between 86-133 and a 25% chance it will be between 57-77.)

This is still a phenomenal tool either way. And getting feedback via git is awesome too!

kolgza commented 4 years ago

ACNH Turnip Calculator has a chart which essentially does what @chadmiller describes.

A better view would have a kind of heatmap of the predicted values. Paint a swath across with some semitransparent colour, so that they add up in force.

Screenshot_2020-04-26 Turnip Calculator(1)

Compare to Turnip Prophet, which shows does not make it clear that prices above 200 are unlikely in this situation. image

Unfortunately, it also includes a yellow line that seems to represents an average of all the possible possible trends, which is a fundamentally flawed way of depicting a forecast (because of radically different possible patterns).

A graph similar to that of ACNH Turnip Calculator—except with a much greater range of contrast —would be a decent solution to this problem. The poor contrast in the graph for ACNH Turnip Calculator does make it needlessly difficult to differentiate between the different possible patterns.

chadmiller commented 4 years ago

FWIW, I don't like the bold containing boundaries, as we should reserve boldness to indicate likelihood and the boundary doesn't mean very much.

The dotted patterns for buy price shouldn't be so strong either, since the "buy price" isn't necessarily the price one bought at, if one was on another island; don't conflate "my island buy-price pattern value" and "my purchased price". The dotted line would indicate the latter when it really mean the former.

kolgza commented 4 years ago

I actually think that out of everything, a box plot would actually be the most ideal chart for this. image

Not only does it fulfills @SvecTech 's criteria to be able to see the range in which half of the outcomes lie in, but it also fixes one of my annoyances with both the current line chart, and the ac-turnip.com calculator: they both depict turnip prices as a continuous function. Such is not the case—turnip prices only change twice a day, but the line graph subtly implies they constantly ebb and flow.

EDIT: Here is a chart.js module for box plots.

SvecTech commented 4 years ago

@kolgza best idea yet hands down!

mikebryant commented 4 years ago

Actually looking at that module - given we have data where the probabilities are in multiple ranges (e.g. the price for the day is either high, or low, but can't ever be in-between), the violin plot looks pretty nice.

Can show if the probability is 0 for values in the middle etc.

SvecTech commented 4 years ago

I toggle for the type of graph could solve that. Defaults to the current layout with a button to switch to the boxplot. I truly like that boxplot idea.

kolgza commented 4 years ago

What else might be interesting is to include a box plot to display what the maximum and minimum are most likely to be. The reason for this is because of patterns such as big spike. image

In the case above, at some point during the week, the price of turnips is more-likely-than-not going to rise above 208. However, for any given day, the likeliness of that happening on that specific day is low. This might misleadingly suggest that the likeliness of a big spike pattern happening at all is low.

kolgza commented 4 years ago

I toggle for the type of graph could solve that. Defaults to the current layout with a button to switch to the boxplot. I truly like that boxplot idea.

We probably would not need this if the the violin plots showed the interquartile range. image