Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix apportion abundance doc page #6

Conversation

leewujung
Copy link
Collaborator

@leewujung leewujung commented Oct 12, 2024

@brandynlucca : I decided to do a PR to your branch directly because there are many indexing errors and it would be very messy to do via comments. I also simplified the text. Please go through the equations and let me know if you don't agree with my changes or have questions.

For eq. 4-7 we can change them back to the form with male and female fish laid out separately if you think that works better. I changed my mind midway and didn't go back to change them back.

I also removed all unused images from previous commits.

One change I didn't do but I think we should discuss is whether the number of fish samples should be represented as $n$ or $N$. I think from our previous discussion and later written in the docs Glossary page, it should be $N$, so I used $r_N$ for the number proportion (note I typed it differently in latex compared to your previous form). But I have not changed the other equations.

Edit 1: Looking at the Apportioning kriged biomass density page again, I used a probability notation for number proportion instead of $r_N$, and used $r$ for weight proportion. I also did use $N$ for the number of fish samples. Let's discuss which ones to use.

Edit 2: Looking at the docs again, and specifically the data flow, I think we should stick with using $N$ for abundance and $n$ for the number of fish samples. I'll do a PR to change the Apportioning kriged biomass density page and the Glossary. Looking more into that page, there are repeated materials for the number proportion of fish samples, in addition to the notation difference. I think we can merge these into a single section with probably 3 page (symbol definitions, kriged biomass, back-calculation) - I can work on that once this and OSOceanAcoustics#216 are merged.

$
\hat{\textit{NASC}^{k}} = \hat{N}^{k} \bar{\sigma}_{\textrm{bs}}
$
In Chu's Echopro implementation, both $\hat{N}_{s}^{k}$ and $\hat{N}^{k}$ are calculated using a single $\overline{W}(\ell)$ fit from **all** (male, female, and unsexed) fish samples, instead of sex-specific fits.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In Chu's Echopro implementation, both $\hat{N}_{s}^{k}$ and $\hat{N}^{k}$ are calculated using a single $\overline{W}(\ell)$ fit from **all** (male, female, and unsexed) fish samples, instead of sex-specific fits.
Both $\hat{N}_{s}^{k}$ and $\hat{N}^{k}$ are calculated using a single $\overline{W}(\ell)$ fit from **all** (male, female, and unsexed) fish samples, instead of sex-specific fits in the original `EchoPro` MATLAB implementation.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that including this as a separate admonition is fine; however, the wording seems to imply a distinction with Echpop. If this were ever implemented in Echopop, we'd likely replicate the MATLAB code for consistency, no? I have no strong opinion on this one way or another, but just want to make sure we avoid implying there is a difference between Echopop and EchoPro here when they may not be one in the future.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I agree with not implying either way, but am confused here -- wouldn't the changes you added make it actually different from EchoPro? since it says "instead of sex-specific fits in the original EchoPro MATLAB implementation"?

Copy link
Owner

@brandynlucca brandynlucca Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I agree with not implying either way, but am confused here -- wouldn't the changes you added make it actually different from EchoPro? since it says "instead of sex-specific fits in the original EchoPro MATLAB implementation"?

I didn't want to change the meaning of your suggested change too much without discussing that first.

Suggested change
In Chu's Echopro implementation, both $\hat{N}_{s}^{k}$ and $\hat{N}^{k}$ are calculated using a single $\overline{W}(\ell)$ fit from **all** (male, female, and unsexed) fish samples, instead of sex-specific fits.
Both $\hat{N}_{s}^{k}$ and $\hat{N}^{k}$ are calculated using a single $\overline{W}(\ell)$ fit from **all** (male, female, and unsexed) fish samples in the original `EchoPro` MATLAB implementation.

\hat{\textit{NASC}^k} = \hat{N}^k \times \bar{\sigma}_\textrm{bs}^i,
$$

when the transect interval $k$ falls in stratum $i$. See [](stratification) for more information.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that the attention admonition concerning the strata indexing was removed. Instead of removing it entirely, would it make sense to include it here since the subsequent calculations are implicitly indexed by $i$ (or in some cases explicitly such as the proportions) sans $\overline{W}(\ell)$?

Copy link
Collaborator Author

@leewujung leewujung Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking this would be covered by the 4-section refactoring suggested in OSOceanAcoustics#279, and there we can clearly list out in for what variables indexing using $k$ actually implies a specific stratum $i$ due to the geographical location of the $k$ interval?

### Number proportions

The sex-specific abundances for unaged $\eqref{eq:total_unaged_sex}$ and aged $\eqref{eq:total_aged_sex}$ fish are then summed together to calculate the total unaged ($n^{\textrm{unaged}}$), aged ($n^{\textrm{aged}}$), and all ($n$) fish:
The sex-specific numbers for unaged $\eqref{eq:total_unaged_sex}$ and aged $\eqref{eq:total_aged_sex}$ fish are then summed to calculate the total number of unaged fish($n^{\textrm{unaged}}$), aged ($n^{\textrm{aged}}$), and all ($n$) fish:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps 'numbers' should be replaced with 'counts'? I suppose it is not a huge deal so long as we are consistent in usage.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now everywhere else we use "numbers," including in the glossary. I have no problem with changing it to "counts" if it is more clearer.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wait, wouldn't "number proportion" then need to be "count proportion"? it sounds a little weird.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aye, that's true. I think it's fine to use 'number' so long as we are consistent.


$$
\begin{equation}
\begin{aligned}
r_{n,~\textrm{M},\ell}^{\textrm{unaged/unaged}} &= \frac{n_{\textrm{M},\ell}^{\textrm{unaged}}}{n_{\textrm{M}}^{\textrm{unaged}}} \nonumber \\
r_{n,~\textrm{F},\ell}^{\textrm{unaged/unaged}} &= \frac{n_{\textrm{F},\ell}^{\textrm{unaged}}}{n_{\textrm{F}}^{\textrm{unaged}}} \nonumber
{r_N}_{\textrm{M},\ell}^{\textrm{unaged/unaged}} &= \frac{n_{\textrm{M},\ell}^{\textrm{unaged}}}{n_{\textrm{M}}^{\textrm{unaged}}} \nonumber \\
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I think these should be $r_n$. To me this implies that these are relative proportions calculated from abundances when they are actually computed using the fish numbers/counts. Perhaps that is not a significant distinction given that these are used to apportion the derived abundances; however, I think if we use $r_N$ here then we would want to use $r_B$ (we currently do not have a subscript denoting "weight" specifically for this since we just use $r$ currently) for the weight proportions since they are used to apportion the derived biomasses.

Copy link
Collaborator Author

@leewujung leewujung Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$r_n$ is fine - this is something I had not changed after changing all $N$ to $n$ in #280. In the apportioning biomass page I wrote this ratio as a probability, but using a ratio is fine too.

For weight proportion, I prefer that we stay with $r_w$ instead of $r_B$ .

@leewujung
Copy link
Collaborator Author

In OSOceanAcoustics#280 I just changed weight proportion from $P(\cdot|\cdot)$ to $r_w$, in addition to the original $N$ to $n$ change for number of fish samples.

@brandynlucca brandynlucca merged commit 9679177 into brandynlucca:brandynlucca_WIP_kriging_abundance_apportionment_docs Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants