Installation
Install the LOESS library for your preferred language.
From NPM (recommended)
Section titled “From NPM (recommended)”npm install fastloess-wasmFrom CDN
Section titled “From CDN”<script type="module"> import init, { Loess } from "https://cdn.jsdelivr.net/npm/fastloess-wasm@0.9/fastloess_wasm.js"; await init();</script>From Source
Section titled “From Source”# Install Rust first: https://rustup.rs/# Install wasm-pack: https://rustwasm.github.io/wasm-pack/installer/git clone https://github.com/thisisamirv/loess-projectcd loess-project/bindings/wasm# For bundlers (Webpack, Vite, etc.)wasm-pack build --target bundler# For Node.jswasm-pack build --target nodejs# For browser (no bundler)wasm-pack build --target webVerify Installation
Section titled “Verify Installation”const { Loess } = require('fastloess-wasm');
const x = new Float64Array([1.0, 2.0, 3.0]);const y = new Float64Array([2.0, 4.0, 6.0]);const model = new Loess({});const result = model.fit(x, y);console.log("Installed successfully!");Installed successfully!