LinearRegression
Royalty FreeLanguage
Java
Metrics
API Calls - 88
Avg call duration -
N/A
Permissions
This is not a recognized license.
This is necessary for algorithms that rely on external services,
however it also implies that this algorithm is able to send your
input data outside of the Algorithmia platform.
Run an example
Input
Output
{
"slope": 0.5000909090909093,
"intercept": 3.0000909090909094,
"correlation": 0.8164205163448399
}
Install and use
Install
Install the Algorithmia CLI client by running:
curl -sSLf https://algorithmia.com/install.sh | sh
Then authenticate by running:
$ algo auth
# When prompted for api endpoint, hit enter
# When prompted for API key, enter your key: YOUR_API_KEY
Use
algo run jtbandes/LinearRegression/0.1.0 -d '// Anscombe's Quartet:
[[10.0,8.04],[8.0,6.95],[13.0,7.58],[9.0,8.81],[11.0,8.33],[14.0,9.96],[6.0,7.24],[4.0,4.26],[12.0,10.84],[7.0,4.82],[5.0,5.68]]
[[10.0,9.14],[8.0,8.14],[13.0,8.74],[9.0,8.77],[11.0,9.26],[14.0,8.10],[6.0,6.13],[4.0,3.10],[12.0,9.13],[7.0,7.26],[5.0,4.74]]
[[10.0,7.46],[8.0,6.77],[13.0,12.74],[9.0,7.11],[11.0,7.81],[14.0,8.84],[6.0,6.08],[4.0,5.39],[12.0,8.15],[7.0,6.42],[5.0,5.73]]
[[8.0,6.58],[8.0,5.76],[8.0,7.71],[8.0,8.84],[8.0,8.47],[8.0,7.04],[8.0,5.25],[19.0,12.50],[8.0,5.56],[8.0,7.91],[8.0,6.89]]' --timeout 300
Warning
This algorithm's sample input contains a
'
character. This can be used to inject malicious code when running commands
(e.g. "'; sudo rm -rf / ;"). Use with caution.