598 Commits

Author SHA1 Message Date
Palash Tyagi
62d4803075 Simplify assertion for unique labels in KMeans tests when k equals m 2025-07-13 01:35:02 +01:00
Palash Tyagi
19bc09fd5a Refactor KMeans centroid initialization and improve handling of edge cases 2025-07-13 01:29:19 +01:00
Palash Tyagi
bda9b84987 Refactor KMeans centroid initialization to handle k=1 case by setting centroid to mean of data 2025-07-13 00:16:29 +01:00
Palash Tyagi
c24eb4a08c Relax assertion tolerance in KMeans tests to align with algorithm's convergence criteria 2025-07-12 01:47:40 +01:00
Palash Tyagi
12a72317e4 Refactor KMeans fit and predict methods for improved clarity and performance 2025-07-12 01:45:59 +01:00
Palash Tyagi
049dd02c1a Remove unreachable panic 2025-07-12 01:35:51 +01:00
Palash Tyagi
bc87e40481 Add test for variance smoothing with zero smoothing in GaussianNB 2025-07-12 01:34:08 +01:00
Palash Tyagi
eebe772da6 Add test for invalid activation count in DenseNNConfig to ensure proper configuration 2025-07-12 01:11:41 +01:00
Palash Tyagi
7b0d34384a Refactor test assertions to improve readability by removing error messages from assert macros 2025-07-12 01:06:02 +01:00
Palash Tyagi
9182ab9fca Add test for PCA fit with n_components greater than n_features to verify behavior 2025-07-12 01:00:00 +01:00
Palash Tyagi
de18d8e010 applied formatting 2025-07-12 00:56:09 +01:00
Palash Tyagi
9b08eaeb35 applied formatting 2025-07-12 00:55:44 +01:00
Palash Tyagi
a3bb509202 Add test for row_copy_from_slice to check out-of-bounds access 2025-07-12 00:55:27 +01:00
Palash Tyagi
10018f7efe Refactor covariance_matrix to improve mean calculation and add broadcasting for centered data; add tests for vertical and horizontal covariance matrices 2025-07-12 00:50:14 +01:00
Palash Tyagi
b7480b20d4 Add correlation module and update exports in stats module 2025-07-12 00:30:26 +01:00
Palash Tyagi
d5afb4e87a Refactor PCA fit method to use covariance matrix directly and improve mean calculation 2025-07-12 00:30:21 +01:00
Palash Tyagi
493eb96a05 Implement covariance functions for matrices with comprehensive tests 2025-07-12 00:29:50 +01:00
Palash Tyagi
58b0a5f0d9 Add broadcasting functionality for 1-row matrices with tests 2025-07-12 00:22:22 +01:00
Palash Tyagi
37c0d312e5 Add tests for activation functions, initializers, and loss gradient in DenseNN 2025-07-10 23:47:36 +01:00
Palash Tyagi
e7c181f011 Refactor error handling in GaussianNB fit method to use assert instead of panic for empty class labels 2025-07-10 23:27:23 +01:00
Palash Tyagi
2cd2e24f57 Add test for gamma_cdf_func to validate behavior for negative input 2025-07-08 23:21:59 +01:00
Palash Tyagi
61aeedbf76 Simplify assertion in lower_incomplete_gamma test for clarity 2025-07-08 23:18:16 +01:00
Palash Tyagi
8ffa278db8 Add tests for uniform and binomial distributions; enhance gamma function tests 2025-07-08 23:16:19 +01:00
Palash Tyagi
b2a799fc30 Add test for median_horizontal function to validate horizontal median calculation 2025-07-08 21:03:05 +01:00
Palash Tyagi
5779c6b82d Refactor median and percentile functions to handle vertical and horizontal calculations correctly; add corresponding tests for validation 2025-07-08 21:00:19 +01:00
Palash Tyagi
a2fcaf1d52 Add tests for mean, variance, and standard deviation calculations in vertical and horizontal directions 2025-07-07 23:36:43 +01:00
Palash Tyagi
6711cad6e2 Add from_rows_vec method to construct Matrix from a flat Vec in row-major order and include corresponding tests 2025-07-07 23:35:00 +01:00
Palash Tyagi
46cfe43983 Add tests for row access and row_copy_from_slice methods 2025-07-07 21:30:26 +01:00
Palash Tyagi
122a972a33 Add statistical distribution functions for matrices 2025-07-07 21:22:09 +01:00
Palash Tyagi
2a63e6d5ab Enhance Matrix implementation with generic filled method and add NaN support 2025-07-07 21:20:57 +01:00
Palash Tyagi
e48ce7d6d7 Add descriptive statistics functions and module integration 2025-07-07 00:38:09 +01:00
Palash Tyagi
a08fb546a9 fixed typo 2025-07-07 00:02:24 +01:00
Palash Tyagi
e195481691 Refactor row access method to row_copy_from_slice for better clarity and functionality 2025-07-07 00:02:08 +01:00
Palash Tyagi
87d14bbf5f Moved activations module and update imports in dense_nn and logreg 2025-07-06 23:50:32 +01:00
Palash Tyagi
4f8a27298c Add mutable row access method and corresponding tests for Matrix 2025-07-06 22:21:03 +01:00
Palash Tyagi
4648800a09 fixed incorrectly commited file 2025-07-06 21:16:57 +01:00
Palash Tyagi
96f434bf94 Add tests for DenseNN training and MSE loss calculation 2025-07-06 20:48:04 +01:00
Palash Tyagi
46abeb12a7 applied formatting 2025-07-06 20:43:01 +01:00
Palash Tyagi
75d07371b2 Increase training epochs from 5000 to 10000 for improved model performance 2025-07-06 20:16:06 +01:00
Palash Tyagi
70d2a7a2b4 Refactor GaussianNB implementation for improved clarity and stability, including enhanced variance handling and additional unit tests 2025-07-06 20:13:59 +01:00
Palash Tyagi
261d0d7007 Refactor DenseNN implementation to enhance activation function handling and improve training process 2025-07-06 20:03:16 +01:00
Palash Tyagi
005c10e816 Enhance activation function tests with edge cases for sigmoid, relu, and their derivatives 2025-07-06 20:00:54 +01:00
Palash Tyagi
4c626bf09c Add leaky_relu and dleaky_relu functions with corresponding unit tests 2025-07-06 20:00:17 +01:00
Palash Tyagi
ab6d5f9f8f Refactor test module imports in LinReg to improve clarity 2025-07-06 19:17:09 +01:00
Palash Tyagi
1c8fcc0bad Refactor LogReg implementation for improved readability by adjusting formatting and organizing imports 2025-07-06 19:17:03 +01:00
Palash Tyagi
2ca496cfd1 Add repeat_rows method to Matrix and corresponding unit test 2025-07-06 19:16:46 +01:00
Palash Tyagi
85154a3be0 Add shape method to Matrix and corresponding unit test 2025-07-06 18:58:38 +01:00
Palash Tyagi
54a266b630 Add unit tests for logistic regression fit and predict methods 2025-07-06 18:52:49 +01:00
Palash Tyagi
4ddacdfd21 Add unit tests for linear regression fit and predict methods 2025-07-06 18:52:15 +01:00
Palash Tyagi
37b20f2174 Add unit tests for activation functions: sigmoid, relu, dsigmoid, and drelu 2025-07-06 17:51:43 +01:00