mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 10:31:29 +08:00
psf/black code formatting (#1421)
* added sol3.py for problem_20 * added sol4.py for problem_06 * ran `black .` on `\Python`
This commit is contained in:

committed by
Christian Clauss

parent
11e2207182
commit
7592cba417
@ -125,6 +125,7 @@ class Decision_Tree:
|
||||
print("Error: Decision tree not yet trained")
|
||||
return None
|
||||
|
||||
|
||||
class Test_Decision_Tree:
|
||||
"""Decision Tres test class
|
||||
"""
|
||||
@ -139,12 +140,9 @@ class Test_Decision_Tree:
|
||||
"""
|
||||
squared_error_sum = np.float(0)
|
||||
for label in labels:
|
||||
squared_error_sum += ((label-prediction) ** 2)
|
||||
squared_error_sum += (label - prediction) ** 2
|
||||
|
||||
return np.float(squared_error_sum/labels.size)
|
||||
|
||||
|
||||
|
||||
return np.float(squared_error_sum / labels.size)
|
||||
|
||||
|
||||
def main():
|
||||
|
Reference in New Issue
Block a user