n1m3 / linregress Goto Github PK
View Code? Open in Web Editor NEWordinary least squared linear regression with some basic statistics
License: MIT License
ordinary least squared linear regression with some basic statistics
License: MIT License
I'm not sure if this could work, but it could imagine that there could be added compile safety for accessing the parameter etc with rustc 1.51?
I'm interesting in running regression on the entire set of variables. However it seems that the FormulaRegressionBuilder
requires a formula to work. Is there any thought to adding an "all variables" mode, or else provide an array of variable names so that it's a bit easier to automate? I would like to avoid building a string formula programatically if I can.
Are there any release notes on the changes made from verzion 0.4.4 to 0.5.0? I am upgrading an old codebase that I inherited from another developer and I am encountering some errors that suggest that some of the underlying behavior of linregress has changed in some way as of version 0.5.0. In particular, there was a line that looks like this after upgrading:
Some((model.parameters()[0], model.parameters()[1..].to_vec(), model.se().to_vec()))
This compiles, however now we get a number of unit test failures as a result of this. Would appreciate any insight into what the 0.5.0 changes included and what I can eo to upgrade the code properly.
Just wanted to pop in and say thank you! I'm writing a tutorial with baseball data and wanted a simple, easy to use example. This crate worked perfectly on the first try, due to your excellent documentation.
Thank you!
Not a huge problem, just a bit surprising that the RegressionModel.residuals
is returned in the same struct as the others data, but is a different "shape" of data, so when accessed via .pairs()
truncates most of the data
For example, the debug output shows this:
...
pvalues: RegressionParameters {
intercept_value: 5.749549530737332e-269,
regressor_names: [
"x1",
"x2",
],
regressor_values: [
9.27933982277656e-11,
0.0008234351722466723,
],
},
residuals: RegressionParameters {
intercept_value: -27.015828794746632,
regressor_names: [
"x1",
"x2",
],
regressor_values: [
-29.59495810026061,
-26.127909406281596,
-26.19444350122059,
-26.362871508164616,
-26.362871508164616,
-29.145193769650938,
-25.75539341699686,
...
Accessing pvalues
using .pairs()
would return the expected data (e.g [("x1", 9.27933982277656e-11"), ("x2", 0.0008234351722466723)]
)
Problem is doing same for residuals
would only return [("x1", -29.59495810026061), ("x2", -26.127909406281596)]
I would like to bring to your attention the fact that your licensing is incompatible with your dependencies.
Your crate is MIT licensed but depends upon nalgebra
which is Apache-2.0 licensed only. While Apache-2.0 projects can use MIT licensed components, the reverse is not so.
Consider for instance that MIT is GPL v2 compatible, while Apache-2.0 is not; Your crate being MIT licensed is thus misleading to any potential GPL-v2 projects that consider using your crate - they'd end up constructing a non-compliant product.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.