Comments (4)
Hi @ariellellouch,
That was actually planned, I just didn't have time to implement such feature. But basically, right now, it's possible to do it by:
- manually initializing the population with only increasing velocity models (yet still random)
- adding a penalty term for models that do not satisfy that constraint (via argument
extra_terms
inconfigure
)
But it will definitely be better to have a boolean option to automate that.
from evodcinv.
Thanks!
I am a bit scared to play with the extra_terms without an example, but will give it a go! :)
Edit:
Quick and dirty solution which assures Vs is going up with depth (I'm sure this can be made prettier and not depend on the structure of x, but I am not a good enough coder). Adding extra_terms=inc_misfit works for me.
def inc_misfit(x):
nel = int((np.size(x)-2)/3)
return 999999.9 * np.any(np.diff(x[nel:2*nel+1])<0)
from evodcinv.
As long as it works!
I added an option increasing_velocity
in configure
that initializes the population with increasing velocity models, and adds a penalty term to reject generated models given the constraint:
model.configure(
optimizer="cpso", # Evolutionary algorithm
misfit="rmse", # Misfit function type
optimizer_args={
"popsize": 10, # Population size
"maxiter": 100, # Number of iterations
"workers": -1, # Number of cores
"seed": 0,
},
increasing_velocity=True,
)
You can update to evodcinv
v2.1.1: pip install evodcinv -U
.
from evodcinv.
Fantastic, thanks again and sorry for bugging you :)
from evodcinv.
Related Issues (11)
- 2): Symbol not found: _PyBytes_FromString HOT 11
- Controlling size of inversion resuls HOT 3
- Multi-mode inversion yields models that do not predict the data HOT 4
- Output models HOT 44
- Support for Scholte wave inversion HOT 4
- Poisson's ratio HOT 5
- FileNotFoundError
- Example of plot results HOT 2
- Example not working HOT 1
- model.invert: concatenation of run results 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 evodcinv.