11 releases (6 breaking)
0.7.0 | Sep 1, 2024 |
---|---|
0.6.0 | Aug 31, 2024 |
0.5.0 | Aug 29, 2024 |
0.4.0 | Aug 27, 2024 |
0.1.2 | Aug 22, 2024 |
#436 in Math
130KB
1.5K
SLoC
rusty_math
This is a Rust library for mathematical, statistical and machine learning operations.
Version 0.7.0
New version now supports K-Means clustering. See clustering module for more details.
Features
- GCD
- LCM
- Factorial
- Check if a number is prime
- Find all primes numbers less than a number
- Permutation
- Combination
- Integration
- Differentiation
- Solve a linear equation
- Find roots of a polynomial using Falsi Reguli and Newton-Raphson methods
- Linear Regression
- Logistic Regression
- Lasso and Ridge Regression
- Logistic Regression
- Naive Bayes Classifier
- K-Nearest Neighbors
- K-Means Clustering
- R2 score
- Mean squared error
- Accuracy
- Precision
- Confusion Matrix
- Recall
- F1 score
Installation
To use rusty_math
in your project, add the following to your Cargo.toml
file:
[dependencies]
rusty_math = "0.7.0"
Modules
- numbers: Functions to find the GCD, LCM, factorial, to check for prime, to find all prime numbers less than n.
- calculus: Find the definite integral and slope of a function at a point.
- Linear: Fit and predict a several types linear functions.
- Equations: Solve a system of linear equations and find a root of polynomials using Falsi Reguli and Newton-Raphson methods
- naive_bayes: Fit a Gaussian Naive Bayes classifier and predict classes.
- knn: Fit and predict target values using K-nearest neighbors classification and regression models.
- clustering: Clustering Algorithms like KMeans.
- Metrics: Score machine learning models.
See detailed documation for list of functionalities in each module.
Usage
use rusty_math::gcd;
fn main() {
let result = gcd(12, 15);
println!("GCD of 12 and 15 is {}",result) ;
}
Contributing
Contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a pull request.
In case of any questions or feedback feel free to contact me at [email protected]
License
This project is licensed under the MIT License.
Dependencies
~770KB
~14K SLoC