Skip to content

Installation

Install the LOESS library for your preferred language.

install.packages("rfastloess", repos = "https://thisisamirv.r-universe.dev")
conda install -c conda-forge r-rfastloess
# Install Rust first: https://rustup.rs/
devtools::install_github("thisisamirv/loess-project", subdir = "bindings/r")
pip install fastloess
conda install -c conda-forge fastloess
# Install Rust first: https://rustup.rs/
git clone https://github.com/thisisamirv/loess-project
cd loess-project/bindings/python
pip install maturin
maturin develop --release
# loess-rs (no_std compatible)
[dependencies]
loess-rs = "*"

# fastLoess (parallel)
[dependencies]
fastLoess = "*"
Crate Feature Description
loess-rs std Enable standard library (default)
Pkg.add("FastLOESS")
using Pkg
Pkg.develop(url="https://github.com/thisisamirv/loess-project", subdir="bindings/julia/julia")
npm install fastloess
git clone https://github.com/thisisamirv/loess-project
cd loess-project/bindings/nodejs
npm install
npm run build
npm install fastloess-wasm
<script type="module">
  import { Loess } from "https://cdn.jsdelivr.net/npm/fastloess-wasm@<version>/index.js";
</script>
# Install Rust first: https://rustup.rs/
# Install wasm-pack: https://rustwasm.github.io/wasm-pack/installer/
git clone https://github.com/thisisamirv/loess-project
cd loess-project/bindings/wasm
# For bundlers (Webpack, Vite, etc.)
wasm-pack build --target bundler
# For Node.js
wasm-pack build --target nodejs
# For browser (no bundler)
wasm-pack build --target web
wget https://github.com/thisisamirv/loess-project/releases/latest/download/libfastloess-linux-x64.so
wget https://github.com/thisisamirv/loess-project/releases/latest/download/fastloess.hpp
g++ -o myapp myapp.cpp -L. -lfastloess-linux-x64
curl -LO https://github.com/thisisamirv/loess-project/releases/latest/download/libfastloess-macos-x64.dylib
curl -LO https://github.com/thisisamirv/loess-project/releases/latest/download/fastloess.hpp
clang++ -o myapp myapp.cpp -L. -lfastloess-macos-x64
wget https://github.com/thisisamirv/loess-project/releases/latest/download/fastloess-win32-x64.dll
wget https://github.com/thisisamirv/loess-project/releases/latest/download/fastloess.hpp
cl myapp.cpp /link fastloess-win32-x64.lib
# Install Rust first: https://rustup.rs/
git clone https://github.com/thisisamirv/loess-project
cd loess-project/bindings/cpp

# Build the library
cargo build --release

# Headers are at: include/fastloess.hpp (C++)
# Library is at: target/release/libfastloess_cpp.so (Linux)
#                target/release/libfastloess_cpp.dylib (macOS)
#                target/release/fastloess_cpp.dll (Windows)
conda install -c conda-forge libfastloess

Verify Installation

library(rfastloess)

x <- c(1, 2, 3)
y <- c(2, 4, 6)

model <- Loess()
result <- model$fit(x, y)
print("Installed successfully!")
import fastloess as fl
import numpy as np

x = np.array([1.0, 2.0, 3.0])
y = np.array([2.0, 4.0, 6.0])

model = fl.Loess()
result = model.fit(x, y)
print("Installed successfully!")
use fastLoess::prelude::*;

fn main() -> Result<(), LoessError> {
    let x = vec![1.0, 2.0, 3.0];
    let y = vec![2.0, 4.0, 6.0];

    let model = Loess::new().build()?;
    let result = model.fit(&x, &y)?;

    println!("Installed successfully!");
    Ok(())
}
using FastLOESS

x = [1.0, 2.0, 3.0]
y = [2.0, 4.0, 6.0]

model = Loess()
result = fit(model, x, y)
println("Installed successfully!")
const fl = require('fastloess');

const x = new Float64Array([1.0, 2.0, 3.0]);
const y = new Float64Array([2.0, 4.0, 6.0]);

const model = new fl.Loess({});
const result = model.fit(x, y);
console.log("Installed successfully!");
import { Loess } from 'fastloess-wasm';

async function verify() {
    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!");
}
verify();
#include <fastloess.hpp>
#include <iostream>
#include <vector>

int main() {
    std::vector<double> x = {1.0, 2.0, 3.0, 4.0, 5.0};
    std::vector<double> y = {2.0, 4.1, 5.9, 8.2, 9.8};

    fastloess::Loess model;
    model.fit(x, y).value();

    std::cout << "Installed successfully!" << std::endl;
    return 0;
}