emrehanks / R-ArcGIS-LSM_ToolPack

This tool is to develop an easy-to-use tool package called Landslide Susceptibility Mapping Tool Pack (LSM Tool Pack) for producing landslide susceptibility maps based on integrating R with ArcMap Software. The proposed tool contains 5 main modules namely: (1) Data Preparation (DP), (2) Feature (Factor) Selection (FS), (3) Logistic Regression (LR), (4) Random Forest (RF), (5) Performance Evaluation (PE) and (6) Create Raster Stack (Multi-Bands).
Apache License 2.0
40 stars 11 forks source link

Error in Feature Selection #4

Closed bilalkashmar closed 3 years ago

bilalkashmar commented 3 years ago

Hello. What should I so. Unfortunately I am not a programmer.

Executing: FeatureSelection "D:\Desktop\Nabatiye_Data\Final Data 30\Stack.tif" # "D:\Desktop\Nabatiye_Data\Final Data 30\train.tif" "Chi Square" ALL 10 10 70 "D:\Desktop\NEW METHOD\Stat.xls" "D:\Desktop\NEW METHOD\O S" Start Time: Mon Jun 21 16:26:14 2021 Running script FeatureSelection... trying URL 'https://CRAN.R-project.org/bin/windows/contrib/3.6/FSelector_0.33.zip' Content type 'application/zip' length 95509 bytes (93 KB) downloaded 93 KB package 'FSelector' successfully unpacked and MD5 sums checked The downloaded binary packages are in C:\Users\admin\AppData\Local\Temp\RtmpyQtIxq\downloaded_packages trying URL 'https://CRAN.R-project.org/bin/windows/contrib/3.6/xlsx_0.6.5.zip' Content type 'application/zip' length 375465 bytes (366 KB) downloaded 366 KB package 'xlsx' successfully unpacked and MD5 sums checked The downloaded binary packages are in C:\Users\admin\AppData\Local\Temp\RtmpyQtIxq\downloaded_packages Loading required package: FSelector package 'FSelector' was built under R version 3.6.3 Error: package or namespace load failed for 'FSelector': .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry Loading required package: xlsx package 'xlsx' was built under R version 3.6.3 Error: package or namespace load failed for 'xlsx': .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry Error in sample : cannot take a sample larger than the population when 'replace = FALSE' Failed to execute (FeatureSelection). Failed at Mon Jun 21 16:26:31 2021 (Elapsed Time: 17.21 seconds)

emrehanks commented 3 years ago

Dear Bilal, I recommend you try again sure about that the Java Runtime Environment (https://java.com/en/download/manual.jsp; note) installed on your PC.

Note: Install both 32 and 64-bit version

bilalkashmar commented 3 years ago

Hello. Thank you for your fast answer. I tried your solution but the error is still occuring. May I send you my data and try to find the error I am doing please? Thank you again.

Executing: FeatureSelection "D:\Desktop\Nabatiye_Data\Final Data 30\Stack.tif" # "D:\Desktop\Nabatiye_Data\Final Data 30\train.tif" "Chi Square" ALL 10 10 70 "D:\Desktop\NEW METHOD\stt.xls" "D:\Desktop\NEW METHOD\O S" Start Time: Mon Jun 21 16:55:48 2021 Running script FeatureSelection... Error in sample : cannot take a sample larger than the population when 'replace = FALSE' Failed to execute (FeatureSelection). Failed at Mon Jun 21 16:55:59 2021 (Elapsed Time: 11.35 seconds)

bilalkashmar commented 3 years ago

Hello. Help please

emrehanks commented 3 years ago

Hi, the new version of FSelector (v0.33) can be caused a problem when running 2_Feature Selection Module, therefore I advised to install and changed the older version of this library from this " https://cran.r-project.org/src/contrib/Archive/FSelector/FSelector_0.31.tar.gz". R library usually in your folder location at "C:\Users\"UserName"\Documents\R\win-library\3.6". Please delete the new version of the FSelector package and replaced it with the older version (0.31).

Best regards Emrehan K. Sahin

On Tue, Jun 22, 2021 at 11:54 AM bilalkashmar @.***> wrote:

Hello. Help please

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/emrehanks/R-ArcGIS-LSM_ToolPack/issues/4#issuecomment-865762421, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDPXMEMM7JIQZG57NJ4BYTTUBFUPANCNFSM47BSZT3A .

--

Dr. Emrehan Kutluğ ŞAHİN http://www.gyte.edu.tr/personel/1040/9106100/emrehan-kutlu-ahin.aspx Abant İzzet Baysal Üniversitesi / Abant İzzet Baysal University Harita Mühendisliği / Geomatic Engineering Bolu @.** +90 374 254 1000 - 4828*

bilalkashmar commented 3 years ago

Hello. My library is located in "C:\Program Files\R\R-3.6.0\library". I deleted the old Fselector file and copied the one you've sent me. The same error is occuring. I will paste the link for the data I am using if you can help me.

https://drive.google.com/drive/folders/1XY3iTMkjNZQ6cN6kKYosITKriuisohwo?usp=sharing

Executing: FeatureSelection "D:\Desktop\NEW SCRIPT\Output\Stack.tif" # "D:\Desktop\NEW SCRIPT\Output\Train.tif" "Chi Square" ALL 10 10 70 "D:\Desktop\NEW SCRIPT\false\sss.xls" "D:\Desktop\NEW SCRIPT\Output\RS" Start Time: Tue Jun 22 12:36:25 2021 Running script FeatureSelection... Error in sample : cannot take a sample larger than the population when 'replace = FALSE' Failed to execute (FeatureSelection). Failed at Tue Jun 22 12:36:36 2021 (Elapsed Time: 11.06 seconds)

Thank you

bilalkashmar commented 3 years ago

Hello. Thank you for helping me. The error I made was in Data Preparation. It is now fixed.

emrehanks commented 3 years ago

I'm glad that the issue is resolved. I hope the tool pack will be useful in your research.

Best regards Emrehan K. Sahin

On Tue, Jun 22, 2021 at 12:53 PM bilalkashmar @.***> wrote:

Closed #4 https://github.com/emrehanks/R-ArcGIS-LSM_ToolPack/issues/4.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/emrehanks/R-ArcGIS-LSM_ToolPack/issues/4#event-4921654395, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDPXMH3VPNRE4FC7CJ76CDTUBMSFANCNFSM47BSZT3A .

--

Dr. Emrehan Kutluğ ŞAHİN http://www.gyte.edu.tr/personel/1040/9106100/emrehan-kutlu-ahin.aspx Abant İzzet Baysal Üniversitesi / Abant İzzet Baysal University Harita Mühendisliği / Geomatic Engineering Bolu @.** +90 374 254 1000 - 4828*