Skip to content

model response vector and experiment vector shape do not match with multiple sensors #96

@shangwjen

Description

@shangwjen

For probeye 3.0.4, in the situation of multiple output sensors with a single correlation results in a shape mismatch error:
image
This occurs due to the list concatenation of the values from the multiple output sensors.

Is this intended? And if yes, what would be a solution to make this situation work?

To reproduce the error edit test_1D_correlation_multiplicative_model_error from line 171 to 187 with:

for i in range(n_experiments):
    y_test = np.random.multivariate_normal(mean=y_true, cov=cov)
    problem.add_experiment(
        name=f"Test_{i}",
        sensor_data={
            "x": x_test,
            "y": y_test,
            "y1": y_test+1,
        },
    )
    if plot:
        plt.scatter(
            x_test,
            y_test,
            label=f"measured data (test {i + 1})",
            s=10,
            zorder=10,
        )

where "y1": y_test + 1 is added.

and for line 205 replace with:

self.output_sensors = [Sensor("y", std_model="sigma"), Sensor("y1", std_model="sigma")]

where Sensor("y1", std_model="sigma") was added to the line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions