Comments (5)
Hey @StrikerRUS, sorry, didn't expect you to reply so quickly :) I've edited my previous message right when you posted your reply. I've read your post carefully one more time and came to a conclusion that what you're saying makes sense.
from m2cgen.
Hey @StrikerRUS! Thanks for creating this issue.
Besides using pow
and exp
we also perform vector additions and multiplications by scalar. This can be potentially replaced with manually written functions similar to ones we introduced in other languages. However I don't see much benefit of doing this, especially considering that numpy
is basically a de facto standard in the Data Science and Machine Learning community.
UPD However I don't have strong arguments against using exp
and pow
from math
package. If there is an evidence that they perform faster than numpy
(and apparently there is) then we should consider using them instead.
from m2cgen.
@izeigerman Thanks a lot for your prompt response!
Besides using pow and exp we also perform vector additions and multiplications by scalar.
Is self.with_vectors
indicator used for that? I'm not suggesting replacing vector operators with manually written functions. I just suggested dropping numpy
for fully scalar operations.
However I don't see much benefit of doing this,
I guess ~8x speedup worth it!
especially considering that numpy is basically a de facto standard in the Data Science and Machine Learning community.
Sure, but generated runtime Python module can be used far away from data science community 🙂 .
from m2cgen.
Great research btw 👍
from m2cgen.
@izeigerman No problem! I'm sorry too: I read fast, type slowly and GitHub doesn't provide live updates for editions. 😃
I'm glad you liked the idea!
from m2cgen.
Related Issues (20)
- The converted C model compiles very slow,how can i fix it?
- Unable to export LGBM model that uses `categorical_feature` HOT 2
- Convert ML model to c# HOT 2
- Issue with xgboost export in python: not same values splits HOT 1
- Getting predict_prob when convert m2cgen to different languages
- Feature Request: support for multioutput regression HOT 1
- Process ended with exit code -1073741571 (0xC00000FD) HOT 1
- Results dont match
- Add Fortran
- LightGBM models
- Unable to export code from XGBoost 1.7.5 models HOT 6
- How to use model for jpg photo?
- Issue while Exporting a LightGBM Model to C#
- XGBoost exported to C generates wrong indices for input array
- Logitraw objective function ignored for xgb.Booster
- Cannot export XGBClassifier model: TypeError: unsupported operand type(s) for /: 'float' and 'NoneType' HOT 4
- Memory overflow in program run after compilation of C code transformed by the xgboost model HOT 1
- Cannot export XGBClassifier model: TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'
- XGBoost GCC Memory Allocation Error: cc1plus.exe: out of memory allocating 65536 bytes
- xgbmodel is larger than 500M, convert to c, always Segmentation fault
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 m2cgen.