Comments (3)
Hello. Apologies for a late response.
Honestly, I am not familiar with joblib and I am not doing machine learning right now. But parallelism would be a nice addition here, so I'll fix this.
Can you provide the exact error message? If you want, can you also provide a code snippet/sample (with data removed of course) on how you use my library with joblib?
Thanks!
from edhsmm.
@Tianxu-Jia Good day!
Finally had time for this. I think that only fit
has the problem, because only fit
modifies model parameters. For now, we can do something like:
from joblib import Parallel, delayed
models = [M0, M1, M2]
data = [data0, data1, data2]
Parallel(n_jobs=-1, require='sharedmem')(delayed(i.fit)(j) for i, j in zip(models, data))
The "sharedmem" allows mutation/editing of objects in the main program. See here: https://joblib.readthedocs.io/en/latest/parallel.html#shared-memory-semantics
Work is ongoing so that we can also do something like this (if one does not prefer sharedmem for some reason):
from joblib import Parallel, delayed
models = [M0, M1, M2]
data = [data0, data1, data2]
[M0, M1, M2] = Parallel(n_jobs=-1)(delayed(i.fit)(j) for i, j in zip(models, data))
And because of these changes, I'll also introduce model "names".
R1 = GaussianHSMM(n_states = 3, n_durations = 4, name = "Model 1") # new parameter "name"
Names are showed in printed messages. This is helpful when models are run in parallel.
FIT: reestimation complete for loop 3.
FIT (Model 1): converged at loop 3.
FIT: reestimation complete for loop 4.
These changes will be released in the next version 0.2.2.
Thanks!
from edhsmm.
Update: 0.2.2 is now released which includes the features I presented above.
I think I can now close this issue, but feel free to re-open it if you have questions.
from edhsmm.
Related Issues (14)
- Implement check() function in HSMM class HOT 1
- Pre-allocating instead of resizing ndarray + More HOT 1
- Left-censoring HOT 2
- About the Left censoring method HOT 2
- Sojourn time parametric modelisation HOT 2
- Using multiple sequences of observation HOT 7
- Trying to create HSMM with left-to-right assumption HOT 3
- Recomment code HOT 1
- Bug in score() function in HSMM HOT 1
- Archiving this Repo
- Multi-Dimensional Feature Space HOT 5
- What is the selection criteria of D in HSMM? HOT 4
- Duration Distributions 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 edhsmm.