Comments (2)
@idroz I added openmp support and verified that it works on mac. Here are the new timings on a dataset of 7,000 obs and 11 columns and 100 trees of depth 32. Roughly 4x speedup.
It's all under this branch: add-openmp
Unit: milliseconds
expr min lq mean median uq max neval
new 229.6577 244.6078 269.6257 253.532 269.4523 471.8144 100
old 981.9939 1013.5965 1067.6469 1031.105 1099.3970 1640.0559 100
To get it to work on mac you have to first:
brew install llvm
And then edit your ~/.R/Makevars
file to look like so:
CXX = /usr/local/opt/llvm/bin/clang
CXXFLAGS = -I/usr/local/opt/llvm/include -fopenmp
LDFLAGS = -L/usr/local/opt/llvm/lib -fopenmp=libiomp5
That last bit with -fopenmp=libiomp5
was a real pain to figure out. I have to add some safety checks. The code will crash if your data.frame has types other than numeric, integer, or factor.
To call the omp parallel predict function do the following:
p <- predict(mod, newdata, iterative=TRUE)
from isofor.
Todos:
- Clean up code -- remove printfs
- switch callocs to mallocs
- change for loop zero-initialization to memcpy?
from isofor.
Related Issues (18)
- Recurse index HOT 3
- move tree induction to C and add openmp support
- 'there is no package called isofor' HOT 1
- Isofor and r2pmml
- Add feature sub-sampling option for large datasets
- Importance of variables HOT 1
- Installation in R HOT 1
- How we do plot Partial Dependency Plots and Average Path Length Versus Number of Trees?
- Error in env$X[idx, ] : incorrect number of dimensions HOT 5
- Predict sparse node membership matrix
- Trouble installing macOS 10.14 Mojave HOT 1
- How to install isofor package in R on Ubuntu 18?
- Not able to install the package isofor from github.
- Unable to install isofor HOT 7
- is this package still being maintained? HOT 3
- Add visualization capabilities to better understand anomalies
- Having a hard time installing the tool HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isofor.