We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85020a7 commit 52345d9Copy full SHA for 52345d9
machine_learning/ridge_regression.py
@@ -1,7 +1,5 @@
1
import numpy as np
2
import pandas as pd
3
-from typing import Optional, Tuple
4
-
5
6
class RidgeRegression:
7
def __init__(
@@ -16,9 +14,7 @@ def __init__(
16
14
self.alpha = alpha
17
15
self.lambda_ = lambda_
18
self.iterations = iterations
19
- self.theta: Optional[np.ndarray] = (
20
- None # Initialize as None, later will be ndarray
21
- )
+ self.theta: np.ndarray | None = None # Initialize as None, later will be ndarray
22
23
def feature_scaling(
24
self, features: np.ndarray
0 commit comments