-
Notifications
You must be signed in to change notification settings - Fork 15
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
Linear Regression #28
Comments
Hello Daniel, I was able to recreate your error by calculating Logistic Regression with "AW3D30.tif" from the test dataset as a discrete data set. LSAT tries to be smart when adding data sets to the calculation and guesses the type of parameter based on the data type: Make sure to select the corresponding type for continuous/discrete data sets. Kind regards |
Hi Nick,
I was able to fix the error, I’m very grateful for your support. The error was, as you said, the LSAT read DEMs, Slopes … as continue data, but the type of pixel was in integer. So, with a geoprocess I changed the pixel type to float and LSAT worked perfectly.
Thanks a lot
Daniel
From: BGR - Engineering Geological Hazard Assessment ***@***.***>
Sent: Monday, August 1, 2022 11:23 AM
To: BGR-EGHA/LSAT ***@***.***>
Cc: Daniel Cuervo ***@***.***>; Author ***@***.***>
Subject: Re: [BGR-EGHA/LSAT] Linear Regression (Issue #28)
Hello Daniel,
I was able to recreate your error by calculating Logistic Regression with "AW3D30.tif" from the test dataset as a discrete data set.
LSAT tries to be smart when adding data sets to the calculation and guesses the type of parameter based on the data type:
int -> categorical / discrete (e.g. lithologie)
float -> continuous (e.g. slope)
If a raster with n different values is loaded as a discrete data set LSAT will create n arrays where one value is 1 and the others are 0. This will use a lot of memory if there are a lot of unique values leading to the Crash you described.
Make sure to select the corresponding type for continuous/discrete data sets.
If all it took to fix it for you was selecting continuous for that raster and your other ones work fine the wrong automatic selection is most likely the source of the crash.
If not, please share the raster data set (if possible) so I can take a closer look.
Kind regards
Nick
—
Reply to this email directly, view it on GitHub<#28 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWAMBUF2C5FJDEWFZO7DQETVW7TTZANCNFSM55HZKMKA>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Hi BGR,
I have a question, when I used the Linear Regression analysis, I got a problem with the following error message:
Traceback (most recent call last):
File "D:\LSAT-main\core\libs\Analysis\LogisticRegressionAnalysis.py", line 49, in run
stack, labels, stack_full, noDataArray, nr_of_unique_parameters = rasterprepwork.prepareInputData(
File "D:\LSAT-main\core\libs\Rasterprepwork\rpw_main.py", line 39, in prepareInputData
stack_red, stack = self.getstackFromCategoricalData(
File "D:\LSAT-main\core\libs\Rasterprepwork\rpw_main.py", line 114, in getstackFromCategoricalData
value_array_red = value_array[noDataArray != raster.nodata]
numpy.core._exceptions.MemoryError: Unable to allocate 629. MiB for an array with shape (1, 15577, 21186) and data type int16
However, this error does not occur when my parameters are in discrete data. So, Do I have to input the data in discrete data? or is that a error? Can I solve that issue?
The text was updated successfully, but these errors were encountered: