JankowskiDaniel / Neural-Deep-Retina

0 stars 0 forks source link

Preserve data sparsity in the StandardScaler() #28

Closed kapiblue closed 2 months ago

kapiblue commented 2 months ago

Preserve sparsity of the input data by using mean = 0.

This can be achieved by:

from sklearn.preprocessing import StandardScaler

scaler = StandardScaler(with_mean=False)
scaler.fit(data)

Examine the performance

https://stackoverflow.com/questions/21875518/features-scaling-and-mean-normalization-in-a-sparse-matrix