data = h5['data']
n = data.shape[0]
chunk_size = 1000
icpa = IncrementalPCA(n_components=10, batch_size=16)
for i in range(0, n // chunk_size):
    ipca.partial_fit(data[i * chunk_size:(i + 1) * chunk_size])
Incremental PCA on big data