Skip to content

Initial Subset with Streaming SO #29

@devinity1337

Description

@devinity1337
from apricot import FacilityLocationSelection
import numpy

X = numpy.exp(numpy.random.randn(1000, 50))
print(X)

X_corr = numpy.corrcoef(X) ** 2

model = FacilityLocationSelection(10, 'corr',initial_subset=[1, 5, 6, 8, 10])
model.partial_fit(X)

print(model.ranking, X_corr[model.ranking].max(axis=0).sum())

Gives an error:

ValueError: operands could not be broadcast together with shapes (995,) (1000,)

The size mismatch is equal to the initial subset size and the error only occurs when I use an initial subset so something goes wrong with the streaming with the initial subset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions