DillLittle / Capstone-Repository

0 stars 0 forks source link

To do: analysis and figures #4

Open Lewis-Barnett-NOAA opened 3 months ago

Lewis-Barnett-NOAA commented 3 months ago

1) strongest gradient with medium range and medium observation error 2) weakest gradient with medium range and medium observation error 3) medium gradient with lowest range and medium observation error 4) medium gradient with highest range and medium observation error 5) lowest observation error, medium gradient and range 6) highest observation error, medium gradient and range

DillLittle commented 2 months ago

What should I set the operating model at for the graphs?

Lewis-Barnett-NOAA commented 2 months ago

Use the current settings in the code

On Fri, Jun 21, 2024 at 1:38 PM DillLittle @.***> wrote:

What should I set the operating model at for the graphs?

— Reply to this email directly, view it on GitHub https://github.com/DillLittle/Capstone-Repository/issues/4#issuecomment-2183423176, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJP4UK2N7LBISJS6MELTZISFM7AVCNFSM6AAAAABHWZQMUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGQZDGMJXGY . You are receiving this because you were assigned.Message ID: @.***>

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

DillLittle commented 2 months ago

like simulate and sample?

Lewis-Barnett-NOAA commented 2 months ago

For the simulation from the tweedie operating model function, yes. I haven't done much of any changes to the sampling function so you may need to check that those settings are still consistent...but I believe I changed them accordingly. I was in the midst of changing the sampling proportions a bit to see how that changed the results, but I think I've settled on a version close to the best example.

I have been experimenting with different parameters a bunch, but I will push the latest result file when this run completes. But you can do your part regardless I think, given the same functions and parameters from the function script and sim script.

On Fri, Jun 21, 2024 at 1:54 PM DillLittle @.***> wrote:

like simulate and sample?

— Reply to this email directly, view it on GitHub https://github.com/DillLittle/Capstone-Repository/issues/4#issuecomment-2183451453, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJP32XCW53FELJPQS373ZISHHRAVCNFSM6AAAAABHWZQMUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGQ2TCNBVGM . You are receiving this because you were assigned.Message ID: @.***>

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

DillLittle commented 2 months ago

Ok word I took sampling off the visualizations but I'll put it back in

Lewis-Barnett-NOAA commented 2 months ago

Oh, yeah well it might look better without the observations, but we can look at both versions and decide. Try it with 30 and 50 samples (as I'm doing another alternative run with 30 samples), and smaller bubbles for the point sizes maybe?

I pushed the versions with the parameters I think we'll want to use, but I'm still tinkering slightly. I'd go with what is there now and it shouldn't change much if at all. I also changed the sampling proportions in the plotting function back to make sure they match the simulated scenarios.

On Fri, Jun 21, 2024 at 2:01 PM DillLittle @.***> wrote:

Ok word I took sampling off the visualizations but I'll put it back in

— Reply to this email directly, view it on GitHub https://github.com/DillLittle/Capstone-Repository/issues/4#issuecomment-2183458472, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJPZ5CJFDTUUJPQCGBQDZISIA7AVCNFSM6AAAAABHWZQMUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGQ2TQNBXGI . You are receiving this because you were assigned.Message ID: @.***>

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

DillLittle commented 2 months ago

I did some mock ups let me know what you think

Lewis-Barnett-NOAA commented 2 months ago

I like these! I think it would be great to link them all into one 6-panel figure with cowplot(). Also, consider any adjustments that will increase contrast, for example, maybe try the circles for the observations being white or red so it still stands out when the background is dark. One other minor thing is setting the dimensions of each panel and the figure such that the x and y axes are of equal length (because they are on the the same 0-100 scale)...that way there is also a consistent way to generate the figure with the same dimensions.

Not having much contrast visually between the two observation error levels makes me think we should broaden that gap. Is that between our minimum and maximum parameter values?

On Tue, Jun 25, 2024 at 12:54 PM DillLittle @.***> wrote:

I did some mock ups let me know what you think

— Reply to this email directly, view it on GitHub https://github.com/DillLittle/Capstone-Repository/issues/4#issuecomment-2189854434, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJP2VYIEPQIRL65B5DDLZJHDGFAVCNFSM6AAAAABHWZQMUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBZHA2TINBTGQ . You are receiving this because you were assigned.Message ID: @.***>

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

DillLittle commented 2 months ago

uploaded a first attempt for the group plot but it's looking super rough right now. the observation levels are set at 0.01 and 0.3 which are the min and max.

Lewis-Barnett-NOAA commented 2 months ago

Ok cool. I did some experimenting to look at higher phi values, but it really doesn't affect the spatial pattern of the true abundance of course, and that is what I was pondering in your plots. If we went up to about 0.5 or greater we'd see more contrast in the observations, but I think this range we have is fine for now.

So, the observation error is only going to really show up as making a difference in the observations, not the true abundances. In this case, we could probably drop the panels with observation error contrast, so the figure can just be about the operating model. Then, to show the difference in observations, we could have a figure that shows the histogram of observed abundance for each of our levels of observation error.

On Wed, Jun 26, 2024 at 12:08 PM DillLittle @.***> wrote:

uploaded a first attempt for the group plot but it's looking super rough right now. the observation levels are set at 0.01 and 0.3 which are the min and max.

— Reply to this email directly, view it on GitHub https://github.com/DillLittle/Capstone-Repository/issues/4#issuecomment-2192447450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJP7ZLNRETHKG4OKKJ3DZJMGTXAVCNFSM6AAAAABHWZQMUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJSGQ2DONBVGA . You are receiving this because you were assigned.Message ID: @.***>

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

Lewis-Barnett-NOAA commented 2 months ago

In the updated runs, the min and max were 0.01 and 0.5 for observation error, so we can stick with that until we find other reasons to increase phi for contrast...maybe up to 1. But for now, just modify those two lines of code calling hist() in the script where you are plotting this to make a separate figure of the histograms by observation error level.

Have a good weekend, see you monday

On Thu, Jun 27, 2024 at 8:57 AM Lewis Barnett - NOAA Federal < @.***> wrote:

Ok cool. I did some experimenting to look at higher phi values, but it really doesn't affect the spatial pattern of the true abundance of course, and that is what I was pondering in your plots. If we went up to about 0.5 or greater we'd see more contrast in the observations, but I think this range we have is fine for now.

So, the observation error is only going to really show up as making a difference in the observations, not the true abundances. In this case, we could probably drop the panels with observation error contrast, so the figure can just be about the operating model. Then, to show the difference in observations, we could have a figure that shows the histogram of observed abundance for each of our levels of observation error.

On Wed, Jun 26, 2024 at 12:08 PM DillLittle @.***> wrote:

uploaded a first attempt for the group plot but it's looking super rough right now. the observation levels are set at 0.01 and 0.3 which are the min and max.

— Reply to this email directly, view it on GitHub https://github.com/DillLittle/Capstone-Repository/issues/4#issuecomment-2192447450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJP7ZLNRETHKG4OKKJ3DZJMGTXAVCNFSM6AAAAABHWZQMUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJSGQ2DONBVGA . You are receiving this because you were assigned.Message ID: @.***>

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

Lewis-Barnett-NOAA commented 2 months ago

Also, for multipanel plotting, there are a lot of tricks. I recommend using cowplot for some circumstances, but see this great tutorial by a colleague of mine about how to do it in both ggplot and base R. It is usually easier in ggplot, although I used to be more into base R for graphics.

Here is the tutorial for using base graphics: https://seananderson.ca/courses/11-multipanel/multipanel.pdf

Introduction to ggplot2 (has a bunch of great stuff for ggplot): https://seananderson.ca/ggplot2-fish554/

On Thu, Jun 27, 2024 at 9:01 AM Lewis Barnett - NOAA Federal < @.***> wrote:

In the updated runs, the min and max were 0.01 and 0.5 for observation error, so we can stick with that until we find other reasons to increase phi for contrast...maybe up to 1. But for now, just modify those two lines of code calling hist() in the script where you are plotting this to make a separate figure of the histograms by observation error level.

Have a good weekend, see you monday

On Thu, Jun 27, 2024 at 8:57 AM Lewis Barnett - NOAA Federal < @.***> wrote:

Ok cool. I did some experimenting to look at higher phi values, but it really doesn't affect the spatial pattern of the true abundance of course, and that is what I was pondering in your plots. If we went up to about 0.5 or greater we'd see more contrast in the observations, but I think this range we have is fine for now.

So, the observation error is only going to really show up as making a difference in the observations, not the true abundances. In this case, we could probably drop the panels with observation error contrast, so the figure can just be about the operating model. Then, to show the difference in observations, we could have a figure that shows the histogram of observed abundance for each of our levels of observation error.

On Wed, Jun 26, 2024 at 12:08 PM DillLittle @.***> wrote:

uploaded a first attempt for the group plot but it's looking super rough right now. the observation levels are set at 0.01 and 0.3 which are the min and max.

— Reply to this email directly, view it on GitHub https://github.com/DillLittle/Capstone-Repository/issues/4#issuecomment-2192447450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJP7ZLNRETHKG4OKKJ3DZJMGTXAVCNFSM6AAAAABHWZQMUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJSGQ2DONBVGA . You are receiving this because you were assigned.Message ID: @.***>

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

DillLittle commented 2 months ago

I got a version of the group plot that I don't hate up if you want to take a look. Is there a particular result set that I should load in for the observation error histograms?

Lewis-Barnett-NOAA commented 2 months ago

Looks good! I think it would be good to have an intermediate level. Try to include an additional panel for when Beta for the slope of the relationship to the gradient is 0. That would be the best example of a "weak" gradient. The level you have shown now for a weak gradient is actually an opposite gradient of fish density. So the B=0 case could be labeled the weak environtmentally-driven gradient, and the level you have shown for a weak gradient now could be relabeled accordingly. Maybe we could change the wording to the strength of a thermal barrier or some such. Anyhow, lets see how it looks with the three levels for the gradient, along with an intermediate range example.

For the dispersion/observation error histograms, I'd just do one for each of the lowest and highest dispersion values we used. The other parameters you could just set at their median or mean value.

Thanks!

On Tue, Jul 2, 2024 at 4:48 PM DillLittle @.***> wrote:

I got a version of the group plot that I don't hate up if you want to take a look. Is there a particular result set that I should load in for the observation error histograms?

— Reply to this email directly, view it on GitHub https://github.com/DillLittle/Capstone-Repository/issues/4#issuecomment-2204720983, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJP4Q5RD4BFEYODODGWTZKM34RAVCNFSM6AAAAABHWZQMUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBUG4ZDAOJYGM . You are receiving this because you were assigned.Message ID: @.***>

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

DillLittle commented 2 months ago

cool I just pushed some more graphs. Didn't realize what you meant about the gradient before I pushed but I get it now. -0.4 is a flipped gradient not a weak gradient. I'll fix in the next push

Lewis-Barnett-NOAA commented 2 months ago

The group plot looks great! However, the mid gradient looks too much like the strong gradient I think, are you using B = 0 for the medium case? Then we should end up with a relatively even surface. Some little aesthetic things might also be good, like changing the eta label to "true" and maybe making the white circles and red line a tiny bit thinner.

The histograms are fine too, but note that the estimates are the same between cases, what we want to compare is the distribution of the observations, not eta. Then also change the plot titles to "low dispersion" and "high dispersion"

Missed you at our meeting today. Next time if you can't make the meeting just please let me know beforehand by cancelling the calendar event. Hope all is well and that you had a good holiday weekend.

On Wed, Jul 3, 2024 at 1:42 PM DillLittle @.***> wrote:

cool I just pushed some more graphs. Didn't realize what you meant about the gradient before I pushed but I get it now. -0.4 is a flipped gradient not a weak gradient. I'll fix in the next push

— Reply to this email directly, view it on GitHub https://github.com/DillLittle/Capstone-Repository/issues/4#issuecomment-2207234479, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJP264O24KDDJYHUSDYLZKRO3VAVCNFSM6AAAAABHWZQMUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBXGIZTINBXHE . You are receiving this because you were assigned.Message ID: @.***>

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

DillLittle commented 2 months ago

So sorry about missing the meeting today Lewis, totally slipped my mind. I'll make sure to be more on top of it moving forwards.

DillLittle commented 1 month ago

I pushed a new group plot. I figured out how to change the line thickness and the legend title, but I'll need to keep tweaking the white circles. I also fixed the mid and weak gradient.

I'm pretty sure that I changed the phi to be showing the observed values, but I might've messed up because the two histograms are still identical. So maybe you could take a look at that.

Lewis-Barnett-NOAA commented 1 month ago

okay great, don't worry too much about the circle thickness.

I'll fix the histogram plots...they say they are showing "est" which would be the estimate not observation, no worries.

On Tue, Jul 9, 2024 at 1:09 PM DillLittle @.***> wrote:

I pushed a new group plot. I figured out how to change the line thickness and the legend title, but I'll need to keep tweaking the white circles. I also fixed the mid and weak gradient.

I'm pretty sure that I changed the phi to be showing the observed values, but I might've messed up because the two histograms are still identical. So maybe you could take a look at that.

— Reply to this email directly, view it on GitHub https://github.com/DillLittle/Capstone-Repository/issues/4#issuecomment-2218635316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJPYILWV43IH45FL3QNTZLQ7QDAVCNFSM6AAAAABHWZQMUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJYGYZTKMZRGY . You are receiving this because you were assigned.Message ID: @.***>

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

Lewis-Barnett-NOAA commented 1 month ago

I cleaned up the code, added in some necessary building blocks in the beginning to set up the parameters and so forth, and I fixed the observation histograms. See if things still look good and we could be done with these to figures.

On Tue, Jul 9, 2024 at 2:04 PM Lewis Barnett - NOAA Federal < @.***> wrote:

okay great, don't worry too much about the circle thickness.

I'll fix the histogram plots...they say they are showing "est" which would be the estimate not observation, no worries.

On Tue, Jul 9, 2024 at 1:09 PM DillLittle @.***> wrote:

I pushed a new group plot. I figured out how to change the line thickness and the legend title, but I'll need to keep tweaking the white circles. I also fixed the mid and weak gradient.

I'm pretty sure that I changed the phi to be showing the observed values, but I might've messed up because the two histograms are still identical. So maybe you could take a look at that.

— Reply to this email directly, view it on GitHub https://github.com/DillLittle/Capstone-Repository/issues/4#issuecomment-2218635316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJPYILWV43IH45FL3QNTZLQ7QDAVCNFSM6AAAAABHWZQMUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJYGYZTKMZRGY . You are receiving this because you were assigned.Message ID: @.***>

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111

DillLittle commented 1 month ago

I think I might have to tweak the parameter choices for the group plots because it looks like we're not seeing accurate high mid and low gradient and range. After that it should be good. I'm not gonna make the meeting Monday, looking forward to the next one though

Lewis-Barnett-NOAA commented 1 month ago

No worries, thanks for the heads up!

On Fri, Jul 12, 2024 at 11:29 AM DillLittle @.***> wrote:

I think I might have to tweak the parameter choices for the group plots because it looks like we're not seeing accurate high mid and low gradient and range. After that it should be good. I'm not gonna make the meeting Monday, looking forward to the next one though

— Reply to this email directly, view it on GitHub https://github.com/DillLittle/Capstone-Repository/issues/4#issuecomment-2226152568, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKMJP2ICWQKQIH63NDVZL3ZMAOBBAVCNFSM6AAAAABHWZQMUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRWGE2TENJWHA . You are receiving this because you were assigned.Message ID: @.***>

-- Lewis Barnett, PhD (he/him) Research Fish Biologist

NOAA Fisheries, Alaska Fisheries Science Center 7600 Sand Point Way NE, Bldg 4 Seattle, Washington 98115 Google Voice: (206) 526-4111