Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DATA add ill-conditionned simulated data #5

Open
tomMoral opened this issue Oct 26, 2020 · 0 comments
Open

DATA add ill-conditionned simulated data #5

tomMoral opened this issue Oct 26, 2020 · 0 comments

Comments

@tomMoral
Copy link
Member

As discussed in this comment from sklearn, when the features of the dataset are not scaled, there can be slow convergence of optimization methods.

Adding an example which such ill-conditioned matrix would be very interesting.
The data generation mechanism is (quick extract, check this before coding :) ):

from sklearn.datasets import make_low_rank_matrix

n_samples, n_features = 1000, 10000

w_true = rng.randn(n_features)

X = make_low_rank_matrix(n_samples, n_features, random_state=rng)
X[:, 0] *= 1e3
X[:, -1] *= 1e3

z = X @ w_true + 1
z += 1e-1 * rng.randn(n_samples)

# Balanced binary classification problem
y = (z > np.median(z)).astype(np.int32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant