Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

🐛 thresholding in the BRT vignette may be wrong #127

Closed
tpoisot opened this issue Oct 12, 2021 · 0 comments
Closed

🐛 thresholding in the BRT vignette may be wrong #127

tpoisot opened this issue Oct 12, 2021 · 0 comments
Assignees
Labels

Comments

@tpoisot
Copy link
Member

tpoisot commented Oct 12, 2021

Contact Details

No response

What happened?

The adjacency matrix should be calculated this way

obs = y .> 0

for (i, c) in enumerate(cutoff)
    predic = distribution[xy] .>= c
    tp = sum(obs .& predic)
	tn = sum(.!obs .& (.!predic))
    fp = sum(.!obs .& predic)
    fn = sum(obs .& (.!predic))
    J[i] = tp / (tp + fn) + tn / (tn + fp) - 1
	FPR[i] = fp/(fp+tn)
	TPR[i] = tp/(tp+fn)
end

Stacktrace

No response

@tpoisot tpoisot added the bug Something isn't working label Oct 12, 2021
@tpoisot tpoisot self-assigned this Oct 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant