mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
52345d9013
commit
4204bf6d28
|
@ -1,6 +1,7 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
|
|
||||||
class RidgeRegression:
|
class RidgeRegression:
|
||||||
def __init__(
|
def __init__(
|
||||||
self, alpha: float = 0.001, lambda_: float = 0.1, iterations: int = 1000
|
self, alpha: float = 0.001, lambda_: float = 0.1, iterations: int = 1000
|
||||||
|
@ -14,7 +15,9 @@ class RidgeRegression:
|
||||||
self.alpha = alpha
|
self.alpha = alpha
|
||||||
self.lambda_ = lambda_
|
self.lambda_ = lambda_
|
||||||
self.iterations = iterations
|
self.iterations = iterations
|
||||||
self.theta: np.ndarray | None = None # Initialize as None, later will be ndarray
|
self.theta: np.ndarray | None = (
|
||||||
|
None # Initialize as None, later will be ndarray
|
||||||
|
)
|
||||||
|
|
||||||
def feature_scaling(
|
def feature_scaling(
|
||||||
self, features: np.ndarray
|
self, features: np.ndarray
|
||||||
|
|
Loading…
Reference in New Issue
Block a user