Comments (3)
you were right, there was a bug in the python wrapper. after a model is fit, we try to apply linear scaling to bring it in the range of the target: https://github.com/heal-research/operon/blob/master/python/operon/sklearn.py#L318
however, this did not work correctly when the variance of the target was zero (y = np.ones(100)
). should be fixed in e7b8326
from operon.
Hi,
You are trying to train a model on random data. It can happen that inside cross-validation, the model prediction on the test fold is NaN, infinity or too large, hence the error. My suggestion would be to just catch this exception when it happens, or implement some logic to handle the invalid values in the model prediction.
from operon.
I believe this problem is related to the implementation of this package. In fact, other machine learning algorithms, such as linear regression, can work well in this situation. For example, the following code does not work properly even if it is a rather common situation.
import numpy as np
from operon.sklearn import SymbolicRegressor
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
X = np.random.rand(100, 5)
y = np.ones(100)
est = SymbolicRegressor(
local_iterations=5,
generations=10, # just large enough since we have an evaluation budget
n_threads=1,
random_state=None,
time_limit=2 * 60 * 60, # 2 hours
max_evaluations=int(5e5),
population_size=10
)
# est = LinearRegression()
x_train, x_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)
est.fit(x_train, y_train)
print(est.predict(x_test))
print(np.any(np.isnan(est.predict(x_test))))
In fact, I'm trying to replicate the experiment of the "srbench" benchmark (https://github.com/EpistasisLab/srbench/), but I find this issue will happen during the running procedure.
from operon.
Related Issues (20)
- TypeError: __init__(): incompatible constructor arguments HOT 1
- getting the build process to recognize a lower python version HOT 2
- Add option to disable evolution / optimization of variable coefficients (fix coefficients to one) HOT 2
- Usage instructions for command line interface do not show all supported symbols for --enable-symbols and --disable-symbols. HOT 1
- Python bindings HOT 6
- Evidential regression? HOT 3
- Building python binding and packaging HOT 2
- building operon HOT 9
- Can't build on linux HOT 1
- buliding problem HOT 3
- error in cmake HOT 4
- double free or corruption (out) HOT 8
- Custom cost function HOT 3
- Question about running ctest based on the instructions in HACKING.md HOT 5
- Building operon fails with a compiler error HOT 2
- Where can I find a c++ example of using operon? HOT 5
- About implementing specific custom primitives HOT 7
- Typo in selection operator definition produces segfault on CLI HOT 1
- Update license and file headers 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 operon.