Skip to content

Installation

Install the LOWESS library for your preferred language.

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

# fastLowess (parallel + GPU)
[dependencies]
fastLowess = { version = "1.3", features = ["cpu"] }
Crate Feature Description
lowess std Enable standard library (default)
fastLowess cpu Enable CPU parallelism via Rayon
fastLowess gpu Enable GPU acceleration via wgpu (beta)
Pkg.add("FastLOWESS")
using Pkg
Pkg.develop(url="https://github.com/thisisamirv/lowess-project", subdir="bindings/julia/julia")
npm install fastlowess
git clone https://github.com/thisisamirv/lowess-project
cd lowess-project/bindings/nodejs
npm install
npm run build
npm install fastlowess-wasm
<script type="module">
  import { smooth } from "https://cdn.jsdelivr.net/npm/fastlowess-wasm@0.99/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/lowess-project
cd lowess-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/lowess-project/releases/latest/download/libfastlowess-linux-x64.so
wget https://github.com/thisisamirv/lowess-project/releases/latest/download/fastlowess.hpp
g++ -o myapp myapp.cpp -L. -lfastlowess-linux-x64
curl -LO https://github.com/thisisamirv/lowess-project/releases/latest/download/libfastlowess-macos-x64.dylib
curl -LO https://github.com/thisisamirv/lowess-project/releases/latest/download/fastlowess.hpp
clang++ -o myapp myapp.cpp -L. -lfastlowess-macos-x64
wget https://github.com/thisisamirv/lowess-project/releases/latest/download/fastlowess-win32-x64.dll
wget https://github.com/thisisamirv/lowess-project/releases/latest/download/fastlowess.hpp
cl myapp.cpp /link fastlowess-win32-x64.lib
# Install Rust first: https://rustup.rs/
git clone https://github.com/thisisamirv/lowess-project
cd lowess-project/bindings/cpp

# Build the library
cargo build --release

# Headers are at: include/fastlowess.hpp (C++)
# Library is at: target/release/libfastlowess_cpp.so (Linux)
#                target/release/libfastlowess_cpp.dylib (macOS)
#                target/release/fastlowess_cpp.dll (Windows)
conda install -c conda-forge libfastlowess

Verify Installation

library(rfastlowess)

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

result <- fastlowess(x, y)
print("Installed successfully!")
import fastlowess as fl
import numpy as np

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

result = fl.smooth(x, y)
print("Installed successfully!")
use lowess::prelude::*;

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

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

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

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

result = smooth(x, y)
println("Installed successfully!")
const fl = require('fastlowess');

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

const result = fl.smooth(x, y);
console.log("Installed successfully!");
import init, { smooth } from 'fastlowess-wasm';

async function verify() {
    await init();
    const x = new Float64Array([1.0, 2.0, 3.0]);
    const y = new Float64Array([2.0, 4.0, 6.0]);
    const result = smooth(x, y);
    console.log("Installed successfully!");
}
verify();
#include <fastlowess.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};

    fastlowess::Lowess model;
    auto result = model.fit(x, y);

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