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

Error in sample.int(length(x), size, replace, prob) : cannot take a sample larger than the population when 'replace = FALSE' #33

Open
AndreaSanchezTapia opened this issue Apr 13, 2019 · 2 comments
Labels

Comments

@AndreaSanchezTapia
Copy link
Member

When running random forests with equalize = T
Probably due to cases when the presences outnumber the absences, so equalize cannot sample correctly.

@Tai-Rocha
Copy link

I get the same error running Random Forest and BRT. When "equalize= False" BRT works to the end , but RF give me another error:

"Error in randomForest.default(x, y, mtry = mtryStart, ntree = ntreeTry, :
NA not permitted in predictors
In addition: Warning message:
In randomForest.default(x, y, mtry = mtryStart, ntree = ntreeTry, :
The response has five or fewer unique values. Are you sure you want to do regression?"

I have a datase with 1178 final poitns with 1000 pseudoabsences

@AndreaSanchezTapia
Copy link
Member Author

AndreaSanchezTapia commented Jul 30, 2019

@Tai-Rocha isto não parece relacionado com a issue, mas com as camadas preditoras que você está usando, pois na seleção de pseudoausências você está obtendo NAs em alguma delas. se você limpou por fora ainda há "buracos" no stack, ou você rodou sem clean = T, pois as funções já controlam isto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants