Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Key features defined in `Cargo.toml`:

- `ndarray-bindings` — optional `ndarray` integration.
- `serde` — serialization support (also pulls in `typetag`).
- `datasets` — built-in sample datasets; implies `std_rand` and `serde`.
- `datasets` — built-in sample datasets; implies `serde` only. Since 0.7.0 it does not imply `std_rand` (breaking change, #416). Enable `std_rand` together with `datasets` to seed the generators from OS entropy.
- `std_rand` — enables standard RNG facilities in `rand`.
- `js` — for `wasm32-unknown-unknown` in-browser usage.

Expand Down
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Add to Cargo.toml:

```toml
[dependencies]
smartcore = "^0.6"
smartcore = "^0.7"
```

For the latest changes from the `main` branch:
Expand All @@ -55,6 +55,22 @@ Optional features (examples):

Check Cargo.toml for available features and compatibility notes.

## Breaking changes in 0.7.0

> [!WARNING]
> The `datasets` feature no longer enables `std_rand` (#416).
>
> - The generators `make_blobs`, `make_circles` and `make_moons` no longer take their seed from the OS RNG.
> - Without `std_rand` they use a fixed seed and return the same output on every call.
> - With `std_rand` they take their seed from OS entropy, as before.
>
> To keep the 0.6 behaviour, enable both features:
>
> ```toml
> [dependencies]
> smartcore = { version = "^0.7", features = ["datasets", "std_rand"] }
> ```

## Quick start

Here is a minimal example fitting a KNN classifier from native Rust vectors using DenseMatrix:
Expand Down Expand Up @@ -103,7 +119,7 @@ Recent refactors emphasize reusable components in trees/forests and expanded mul
## Data access and readers

- CSV readers: Read matrices from CSV with configurable delimiter and header rows, with helpful error messages and testing utilities (including non-IO reader abstractions).
- Dataset generators: make_blobs, make_circles, make_moons for quick experiments.
- Dataset generators: make_blobs, make_circles, make_moons for quick experiments. Since 0.7.0 they use a fixed seed unless you also enable `std_rand` (see the breaking changes note above).
- Built-in datasets (feature-gated): digits, diabetes, breast cancer, boston, with serialization utilities to persist or refresh .xy bundles.


Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
//! ```
//! Check `smartcore`'s `Cargo.toml` for available features.
//!
//! **Breaking change in 0.7**: the `datasets` feature no longer enables `std_rand`. The
//! generators `make_blobs`, `make_circles` and `make_moons` then use a fixed seed and
//! return the same output on each call. Enable `std_rand` together with `datasets` to
//! seed the generators from OS entropy, as in 0.6.
//!
//! ## Using Jupyter
//! For quick introduction, Jupyter Notebooks are available [here](https://github.com/smartcorelib/smartcore-jupyter/tree/main/notebooks).
//! You can set up a local environment to run Rust notebooks using [EVCXR](https://github.com/google/evcxr)
Expand Down
Loading