ml_linear_regression 0.0.1 copy "ml_linear_regression: ^0.0.1" to clipboard
ml_linear_regression: ^0.0.1 copied to clipboard

Lightweight Dart implementation of simple linear regression model for numeric prediction.

ml_linear_regression #

A lightweight Dart package that implements simple linear regression using the least squares method.

Useful for numeric predictions such as price estimation, productivity modeling, trend analysis, and educational performance estimation.


✨ Features #

  • Train (fit) with input-output data
  • Predict new values (predict or predictOne)
  • Inspect model equation (slope, intercept)
  • Evaluate performance (score, meanSquaredError)
  • Zero-variance and validation-safe

🚀 Quick Example #

final model = LinearRegression();

model.fit([1, 2, 3], [3, 5, 7]); // y ≈ 2x + 1
print(model.predictOne(4));     // ≈ 9
print(model.score([1,2,3], [3,5,7])); // ≈ 1.0
1
likes
150
points
8
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Lightweight Dart implementation of simple linear regression model for numeric prediction.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on ml_linear_regression