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:
Ankur Chattopadhyay
2019-10-22 22:43:48 +05:30
committed by Christian Clauss
parent 11e2207182
commit 7592cba417
28 changed files with 413 additions and 252 deletions

View File

@ -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():