mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-31 10:56:43 +00:00
Resolved ruff checks
This commit is contained in:
parent
85020a76c2
commit
52345d9013
@ -1,7 +1,5 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from typing import Optional, Tuple
|
|
||||||
|
|
||||||
|
|
||||||
class RidgeRegression:
|
class RidgeRegression:
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -16,9 +14,7 @@ class RidgeRegression:
|
|||||||
self.alpha = alpha
|
self.alpha = alpha
|
||||||
self.lambda_ = lambda_
|
self.lambda_ = lambda_
|
||||||
self.iterations = iterations
|
self.iterations = iterations
|
||||||
self.theta: Optional[np.ndarray] = (
|
self.theta: np.ndarray | None = None # Initialize as None, later will be ndarray
|
||||||
None # Initialize as None, later will be ndarray
|
|
||||||
)
|
|
||||||
|
|
||||||
def feature_scaling(
|
def feature_scaling(
|
||||||
self, features: np.ndarray
|
self, features: np.ndarray
|
||||||
|
Loading…
x
Reference in New Issue
Block a user