smartcore icon indicating copy to clipboard operation
smartcore copied to clipboard

Examples on website does not work with smartcore 0.3.0

Open Luosuu opened this issue 1 year ago • 3 comments

I'm submitting a

  • [x] bug report.
  • [ ] improvement.
  • [ ] feature request.

Current Behaviour:

The example provided in the official website does not run properly with the version 0,3,0.

The current document is for version 0.2.0 and the example for SVM:

let y_hat_svm = SVC::fit(&x_train, &y_train, SVCParameters::default().with_c(10.0))
    .and_then(|svm| svm.predict(&x_test))
    .unwrap();

will result in the error:

mismatched types
expected reference `&SVCParameters<f64, u32, DenseMatrix<f64, Vec<u32, Global>>`
found struct `SVCParameter<{float}, _, _, _>` rustc(E0308)

Expected Behaviour:

Error should be removed.

Steps to reproduce:

run the example code directly with smartcore 0.3.0

Snapshot:

Environment:

  • rustc version 1.65.0 (897e37553 2022-11-02)
  • cargo version 1.65.0 (4bc8f24d3 2022-10-20)
  • OS details WSL2 Debian

Do you want to work on this issue?

no

Luosuu avatar Nov 17 '22 07:11 Luosuu

thanks for reporting this.

Working examples can be found in the notebooks: https://github.com/smartcorelib/smartcore-jupyter/tree/main/notebooks

Mec-iS avatar Nov 17 '22 10:11 Mec-iS

thanks for reporting this.

Working examples can be found in the notebooks: https://github.com/smartcorelib/smartcore-jupyter/tree/main/notebooks

Is there any plan of adding documentation for smartcore 0.3.0 on the website?

Luosuu avatar Nov 17 '22 14:11 Luosuu

the content of the website is open for revisions at https://github.com/smartcorelib/smartcorelib.org

Mec-iS avatar Nov 17 '22 14:11 Mec-iS