Comments (5)
The standard solution is to set the default values to None
and then instantiate new STLSQ()
, PolynomialFeatures()
or FiniteDifference()
objects if required in the body of the __init__
method.
E.g.
if optimizer is None:
self.optimizer = STLSQ()
else:
self.optimizer = optimizer
I can submit a pull-request to fix this if you like.
from pysindy.
This is a great suggestion, thanks! If you'd like to submit a pull-request, please do. Otherwise I can make the fix sometime in the next 24 hours.
from pysindy.
Now I'm getting 1 test fail. Any idea how this change to SINDy()
could have caused this:
optimizers = [SINDyOptimizer(o, unbias=True) for o in optimizers]
for opt in optimizers:
opt.fit(x, y)
for less_complex, more_complex in zip(optimizers, optimizers[1:]):
# relax the condition to account for
# noise and non-normalized threshold parameters
> assert less_complex.complexity <= more_complex.complexity + 1
E AssertionError: assert 4 <= (2 + 1)
E + where 4 = SINDyOptimizer(optimizer=SR3(copy_X=True, fit_intercept=True, max_iter=30,\n normalize=False, nu=1.0, threshold=0.1,\n thresholder='l1', tol=1e-05),\n unbias=True).complexity
E + and 2 = SINDyOptimizer(optimizer=Lasso(alpha=1.0, copy_X=True, fit_intercept=True,\n max_iter=100... selection='cyclic', tol=0.0001,\n warm_start=False),\n unbias=True).complexity
test/property_tests/test_optimizers_complexity.py:55: AssertionError
How does this test work?
from pysindy.
Actually, this is not related. I just rolled back my changes and this test was failing before. My changes pass pytest test/test_pysindy.py
. So I will submit a pull-request. Not sure what the other problem is.
from pysindy.
The test failure you saw is troubling. I will have to look into it separately.
from pysindy.
Related Issues (20)
- polynomial library to include second order derivative HOT 2
- Unsure on the correct use of pySINDy
- LinearRegression unknown keyword normalize HOT 5
- Implementation of graph data HOT 7
- Issue in plotting the graph using model.simulate HOT 1
- Total freedom in library functions with CustomLibrary HOT 1
- SINDy-PI for a system of ODEs
- simulating error(overflow) when expanded to the third order HOT 3
- [BUG] A lot of issues with the bayesian implementation (UQ-SINDy) HOT 3
- [BUG] No consistency in model.fit() HOT 8
- SINDy-PI/ one state derivative per model HOT 3
- Modeling Issues with Using Ensemble Methods HOT 1
- differentiation for cylindrical coordinate HOT 1
- There is a significant divergence between the model based on experimental data and the analytical solution HOT 1
- Can not import pysindy after installation HOT 8
- [BUG] SmoothedFiniteDifference does not have 'save_smooth' HOT 1
- [BUG] SSR optimizer always picks the first model it generates HOT 1
- [BUG] bad shape of model.coefficients() when using Lasso sklearn optimizer HOT 1
- Extracting dynamics and faster simulation HOT 2
- [BUG] 'PolynomialLibrary' object has no attribute 'calc_trajectory' 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 pysindy.