{"id":13399286,"url":"https://github.com/kapelner/bartMachine","last_synced_at":"2025-03-14T04:31:18.972Z","repository":{"id":92221266,"uuid":"14871291","full_name":"kapelner/bartMachine","owner":"kapelner","description":"An R-Java Bayesian Additive Regression Trees implementation","archived":false,"fork":false,"pushed_at":"2024-02-23T19:15:24.000Z","size":31401,"stargazers_count":61,"open_issues_count":3,"forks_count":27,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-07-31T19:18:49.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kapelner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-02T18:45:54.000Z","updated_at":"2024-06-24T14:18:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"936a9e28-c0d3-4fd6-8749-e4e434a1bdae","html_url":"https://github.com/kapelner/bartMachine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapelner%2FbartMachine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapelner%2FbartMachine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapelner%2FbartMachine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapelner%2FbartMachine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kapelner","download_url":"https://codeload.github.com/kapelner/bartMachine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526627,"owners_count":20305108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T19:00:35.994Z","updated_at":"2025-03-14T04:31:13.962Z","avatar_url":"https://github.com/kapelner.png","language":"HTML","funding_links":[],"categories":["人工智能","HTML"],"sub_categories":["Spring Cloud框架"],"readme":"IMPORTANT\n===========\n\n* Before even loading this package you must set the memory option via e.g. `options(java.parameters = \"-Xmx5g\")` to set a larger amount of RAM than the default of 500MB which will get you intro trouble. Only then invoke `library(bartMachine)`. If you don't do this YOU WILL GET OUT OF MEMORY ERRORS OR STUFF THAT LOOKS LIKE THIS `Error in validObject(.Object) : invalid class “jobjRef” object: invalid object for slot \"jobj\" in class \"jobjRef\": got class \"NULL\", should be or extend class \"externalptr\"`.\n\n\nbartMachine\n===========\n\nAn R-Java Bayesian Additive Regression Trees implementation (BART)\nSoftware for Supervised Statistical Learning\n\nCopyright (C) 2023\nAdam Kapelner  \nDepartment of Mathematics, Queens College, City University of New York \n\u0026 \nJustin Bleich\nDepartment of Statistics, The Wharton School of the University of Pennsylvania\n\nThis is a Java implementation of the algorithm found in Chipman, George, \u0026 McCulloch \n[BART: Bayesian Additive Regressive Trees. The Annals of Applied Statistics. \n2010 4(1): 266-298](http://projecteuclid.org/DPubS/Repository/1.0/Disseminate?view=body\u0026id=pdfview_1\u0026handle=euclid.aoas/1273584455 \"PDF download of the BART paper\") as well as many other features.\n\nNews from the Past Year\n---------\n6/25/23\n\nv1.3.4 released - better interaction investigator, convenient relabeling for classification\n\n2/27/23\n\nv1.3.3.1 released -- fixed bug in bartMachine constructor call that prevented local variables from being passed in.\n\n12/29/22\n\nv1.3.3 is released --- fastutil is no longer used and we have now downgraded back to trove losing the 2x speedup. I'm really sorry for the people who've used the package between Aug 25, 2022 - Dec 29, 2022 as there were probably bugs.\n\n\nThe Paper\n---------\n\nFor a vignette describing the BART model and bartMachine's features, see our [JSS paper](https://www.jstatsoft.org/article/view/v070i04).\n\n\nThe Manual\n----------\n\nSee the [manual](https://github.com/kapelner/bartMachine/blob/master/bartMachine.pdf?raw=true \"BART package manual\") for detailed information about the \npackage's functions and parameters.\n\n \nSetup Instructions\n------------------\n\nTo install the bartMachine package in R, you first need to install Java and rJava and configure your computer, then you \ncan install the package from CRAN or compile from source.\n\n### Install Java JDK (not the JRE)\n\nDownload the latest [Java JDK](https://jdk.java.net/) and install it properly. (Java 7 or above is required for v1.2.x and Java 8 or above is required for v1.3 and above). bartMachine requires rJava which requires the JDK; you cannot just have a JRE!\n\n### Install rJava\n\nUse `install.packages(\"rJava\")` within R. If you experience errors, make sure your `JAVA_HOME` system variable is set to the root of your java installation (on a windows machine that would look something like `C:\\Program Files\\Java\\jdk-13.0.2`). Also try running `R CMD javareconf` from the command line. On ubuntu, you should run `sudo apt-get install r-cran-rjava` to install from the command prompt. If you still have errors, you are not alone! rJava is tough to install and idiosyncratic across different platforms. Google your error message! The majority of issues have been resolved on Q\u0026A forums.\n\n### Install bartMachine via CRAN\n\nUse `install.packages(\"bartMachine\")` within R.\n\n### Install bartMachine via compilation from source\n\nDue to CRAN limitations, we cannot release bartMachine for Java \u003e7. Thus it is recommended to install bartMachine from source. This is recommended as you will get the benefits of Java 8-14 as well as the latest release of bartMachine if it's not on CRAN yet (see [changelog](https://github.com/kapelner/bartMachine/blob/master/bartMachine/CHANGELOG).\n\n1. Make sure you have [git](http://git-scm.com/downloads \"Download git for all operating systems\") \nproperly installed.\n\n2. Run `git clone https://github.com/kapelner/bartMachine.git` from your command line and navigate into the cloned project directory via `cd bartMachine`.\n\n3. Make sure you have a [Java JDK](https://jdk.java.net/14/) installed properly. Then make sure the bin directory is an element in the PATH variable (on a windows machine it would look something like `C:\\Program Files\\Java\\jdk-13.0.2\\bin`). We also recommend making a system variable `JAVA_HOME` pointing to the directory (save \\bin).\n\n3. Make sure you have [apache ant](http://ant.apache.org/bindownload.cgi \"Download apache ant for all operating systems\") installed properly. \nMake sure you add the bin directory for ant to your system PATH variable (on a windows machine it would be something like `C:\\Program Files (x86)\\apache-ant-1.10.8\\bin`). We also recommend making a system variable `ANT_HOME` pointing to the directory (save \\bin).\n\n4. Compile the JAVA source code into a JAR using `ant`. You should see a compilation record and then `BUILD SUCCESSFUL` and a total time.\n\n5. Now you can install the package into R using `R CMD INSTALL bartMachine`. On Windows systems, this may fail because it expects multiple architectures. This can be corrected by running `R CMD INSTALL --no-multiarch bartMachine` (I haven't seen this issue in years though). This may also fail if you don't have the required packages installed (run `install.packages(\"bartMachineJARs\")` and `install.packages(\"missForest\")`). Upon successful installation, the last line of the output should read `DONE (bartMachine)`. In R, you can now run `library(bartMachine)` and start using the package normally.\n\n\n#### Limiting CPU usage\n(At least under GNU/Linux) even if you set `set_bart_machine_num_cores(1)`, CPU usage per process can be much larger than 100% (reaching at times 200% or 300%). This can lead to CPU overloading, especially if you run multiple bartMachines in parallel (for example, if you use the [SuperLearner](https://cran.r-project.org/web/packages/SuperLearner/) package and use parallelization). This seems to be a consequence of the garbage collector. One way to avoid this problem is to issue `Sys.setenv(JAVA_TOOL_OPTIONS = \"-XX:ParallelGCThreads=1\")` *before* invoking `library(bartMachine)`. (If you use a cluster, for example a SNOW cluster, you will want to do this in the slaves too, for example `clusterEvalQ(the_name_of_your_cluster, {Sys.setenv(JAVA_TOOL_OPTIONS = \"-XX:ParallelGCThreads=1\")})`).\n\nAcknowledgements\n------------------\n\nWe thank Ed George, Abba Krieger, Shene Jensen and Richard Berk for helpful discussions. We thank Matt Olson for pointing out an important memory issue. We thank [JProfiler](http://www.ej-technologies.com/products/jprofiler/overview.html) for profiling the code which allowed us to create a lean implementation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapelner%2FbartMachine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkapelner%2FbartMachine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapelner%2FbartMachine/lists"}