Comments (6)
Thanks for the comments.
Could you share the dataset you used and your setup? Then, we can reproduce the bug.
Thanks!
from pyhsiclasso.
Sorry to be inadequate.
I uses sklearn.datesets.load_boston to test this module.
If I do as follows, bug doesn't occur.
dataset = load_boston()
# set dataframe
X1_ = pd.DataFrame(dataset.data, columns=dataset.feature_names)
y1_ = pd.DataFrame(dataset.target, columns=['y'])
X1_ = X1_.iloc[:,:]
X1 = np.array(X1_)
y1 = np.array(y1_)
X1_col = X1_.columns
hsic_lasso = HSICLasso()
hsic_lasso.input(X1,y1.flatten(),featname=list(X1_col))
hsic_lasso.regression(num_feat=X1.shape[1], discrete_x=False, n_jobs=2)
hsic_lasso.dump()
hsic_lasso.get_index_score()
but, I do as follows, reduce explanatory variables,
X1_ = X1_.iloc[:,:5]
ValueError: attempt to get argmax of an empty sequence
is occured.
A bug occurs here.
~/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages/pyHSICLasso/nlars.py in nlars(X, X_ty, num_feat, max_neighbors)
97 XtXbeta = np.dot(X.transpose(), np.dot(X, beta))
98 c = X_ty - XtXbeta
---> 99 j = np.argmax(c[I])
100 C = max(c[I])
101
from pyhsiclasso.
Thanks for the detailed information. We will investigate this case.
from pyhsiclasso.
I've got the same problem with another dataset with few explanatory variables.
Then I've replicated the error with sklearn.datasets.load_boston
and 5 features. It seems that I
array gets empty ([]) when lasso_cond=0
. And this exception is not controlled on the while loop or compensated anyway.
Any hint to fix this issue? I think the library is very interesting, and HSIC-based optimization may be useful too for datasets with few columns.
Thank you!
from pyhsiclasso.
Thanks for your input. We have been looking at alternative Lasso solvers. Unfortunately, we haven't found one that checks all of our boxes... We'll be on the lookout for a new solvers that would address this issue.
from pyhsiclasso.
Thanks for reporting the bug. Has anyone solved it?
from pyhsiclasso.
Related Issues (15)
- Update Version 1.0.1 HOT 1
- Update V1.1.0
- Multi-variate output support
- Support parallel processing
- The number of selected features is less than specified HOT 3
- Block Lasso selects less features than vanilla algorithm HOT 2
- Clarification on the difference between an input vs. output kernel HOT 1
- ImportError: cannot import name 'PackageFinder' from 'pip._internal.index' HOT 3
- As a predictor? HOT 4
- Modeling combinatorial effects of features? HOT 2
- Number of selected features HOT 1
- input
- Is there a way to extract the predicted value of the trained HSIC Lasso (Regression)? HOT 2
- Update Version 1.0.2
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 pyhsiclasso.