mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 18:49:26 +08:00
Move CI tests from Travis to GitHub (#3889)
* Add initial support for moving tests to GitHub * Add setup Python step in the workflow * Remove Travis CI config file * Fix GitHub action file for build to trigger on PR * Use Python 3.8 as tensorflow is not yet supported * Fix ciphers.hill_cipher doctest error * Fix: instagram crawler tests failing on GitHub actions * Fix floating point errors in doctest * Small change to test cache * Apply suggestions from code review Co-authored-by: Christian Clauss <cclauss@me.com> * Update instagram_crawler.py Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -25,8 +25,9 @@ def linear_regression_prediction(
|
||||
First method: linear regression
|
||||
input : training data (date, total_user, total_event) in list of float
|
||||
output : list of total user prediction in float
|
||||
>>> linear_regression_prediction([2,3,4,5], [5,3,4,6], [3,1,2,4], [2,1], [2,2])
|
||||
5.000000000000003
|
||||
>>> n = linear_regression_prediction([2,3,4,5], [5,3,4,6], [3,1,2,4], [2,1], [2,2])
|
||||
>>> abs(n - 5.0) < 1e-6 # Checking precision because of floating point errors
|
||||
True
|
||||
"""
|
||||
x = [[1, item, train_mtch[i]] for i, item in enumerate(train_dt)]
|
||||
x = np.array(x)
|
||||
|
Reference in New Issue
Block a user