# Machine learning kit

> The machine learning kit is the ml feature of fframes-kit (fframes-kit = { .., features = ["ml"] }) and needs no other crate.

Page: https://fframes-kit.pages.dev/docs/machine-learning/
Cargo feature: `ml` (`fframes-kit = { version = "..", features = ["ml"] }`)

The machine learning kit is the `ml` feature of `fframes-kit`
(`fframes-kit = { .., features = ["ml"] }`) and needs no other crate. It builds for wasm32,
so every figure here also runs in the editor. It draws ManimML's figures; it runs no model.
Weights, activations and samples are data you pass. Every entry names its scene in the
components gallery (`cargo run --release -p components-gallery -- strip <Scene> -n 8`).

- **Placement.** A figure is placed in units of `ui.space` (Manim's frame: 8 units tall, `y`
  up, the origin in the middle). Its sizes are in pixels.
- **Time.** Animations are props with a start and a duration in seconds, sampled at the
  frame's time, so any frame can be rendered on its own.

- [NeuralNetwork](https://fframes-kit.pages.dev/docs/machine-learning/neural-network.md): NeuralNetwork draws layers from left to right around center, spacing pixels between neighbouring layers.
- [VariationalAutoencoder](https://fframes-kit.pages.dev/docs/machine-learning/variational-autoencoder.md): VariationalAutoencoder draws ManimML's autoencoder as a NeuralNetwork: the image input, the feed-forward layers of the encoder (neurons per layer, [5, 3]…
- [Decision trees](https://fframes-kit.pages.dev/docs/machine-learning/decision-trees.md): A DecisionTree is a trained tree given as data: its nodes with the root first, the names of its features and of its classes.
- [Normal distributions and MCMC](https://fframes-kit.pages.dev/docs/machine-learning/normal-distributions-and-mcmc.md): Gaussian2D { mean, covariance } is a 2D normal distribution. density(p) is its probability density, principal_axes() the standard deviation along each…
