#linear #train #model #learning #machine-learning #weight #tangram

bin+lib tangram_linear

Tangram makes it easy for programmers to train, deploy, and monitor machine learning models

4 releases (breaking)

0.7.0 Aug 17, 2021
0.6.0 Jul 19, 2021
0.5.0 Jul 2, 2021
0.4.0 Jun 25, 2021

#826 in Machine learning

Download history 12/week @ 2024-07-16 13/week @ 2024-07-23 6/week @ 2024-07-30 6/week @ 2024-08-06 1/week @ 2024-08-20 3/week @ 2024-08-27 2/week @ 2024-09-17 20/week @ 2024-09-24 12/week @ 2024-10-01

52 downloads per month
Used in 3 crates (2 directly)

MIT license

340KB
7.5K SLoC

Rust 6.5K SLoC // 0.0% comments Python 821 SLoC // 0.0% comments

Tangram Linear

This crate implements linear machine learning models for regression and classification. There are three model types, Regressor, BinaryClassifier, and MulticlassClassifier. BinaryClassifier uses the sigmoid activation function, and MulticlassClassifier trains n_classes linear models whose outputs are combined with the softmax function.

To make training faster on multicore processors, we allow simultaneous read/write access to the model parameters from multiple threads. This means each thread will be reading weights partially updated by other threads and the weights it writes may be clobbered by other threads. This makes training nondeterministic, but in practice we observe little variation in the outcome, because there is feedback control: the change in loss is monitored after each epoch, and training terminates when the loss has stabilized.

Dependencies

~9–15MB
~200K SLoC