Skip to content

QuickStart example script is erroring #204

@dforbush2

Description

@dforbush2

Describe the bug
The quickstart example script here https://sysidentpy.org/getting-started/quickstart-guide/ errors.

To Reproduce
Steps/code to reproduce:

  1. Install sysIdentpy per instructions.
  2. Run the example code at the provided link.
  3. See error: "ValueError: If order_selection is False, you must define n_terms value."

Expected results
I'd like to see this run as an example I could extend to my own project.

Actual results
The error

File ~\anaconda3\envs\sysidentenv\Lib\site-packages\sysidentpy\parameter_estimation\estimators.py:256, in Estimators.recursive_least_squares(self, psi, y)
254 k = np.divide(k_numerator, k_denominator)
255 self.xi[i, 0] = y[i, 0] - np.dot(psi_tmp.T, theta[:, i - 1])
--> 256 theta[:, i] = list(theta[:, i - 1].reshape(-1, 1) + k.dot(self.xi[i, 0]))
258 p1 = p.dot(psi[i, :].reshape(-1, 1)).dot(psi[i, :].reshape(-1, 1).T).dot(p)
259 p2 = (
260 psi[i, :].reshape(-1, 1).T.dot(p).dot(psi[i, :].reshape(-1, 1))
261 + self._lam
262 )

ValueError: setting an array element with a sequence. The requested array would exceed the maximum number of dimension of 1.

Environment
sysIdentpy = 0.2.0

Additional context
I've tried adding various n_terms values, getting errors like "ValueError: setting an array element with a sequence. The requested array would exceed the maximum number of dimension of 1."
In response, I've tried changing my input to model to:

model.fit(X=np.squeeze(x_train), y=np.squeeze(y_train))

Which also errors. Please advise

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