Horje
highly correlated features python Code Example
highly correlated features python
# Create correlation matrix
corr_matrix = df.corr().abs()

# Select upper triangle of correlation matrix
upper = corr_matrix.where(np.triu(np.ones(corr_matrix.shape), k=1).astype(np.bool))

# Find index of feature columns with correlation greater than 0.95
to_drop = [column for column in upper.columns if any(upper[column] > 0.95)]

df.drop(to_drop, axis=1, inplace=True)
highly correlated features python
# Create correlation matrix
corr_matrix = df.corr().abs()

# Select upper triangle of correlation matrix
upper = corr_matrix.where(np.triu(np.ones(corr_matrix.shape), k=1).astype(np.bool))

# Find index of feature columns with correlation greater than 0.95
to_drop = [column for column in upper.columns if any(upper[column] > 0.95)]




Whatever

Related
class Student:     def __init__(self,name,cgpa):         self.name=name         self.cgpa=cgpa s1=Student("Tom",3.68) s2=Student("Jon",3.18) print(s1.name,s1.cgpa) Code Example class Student: def __init__(self,name,cgpa): self.name=name self.cgpa=cgpa s1=Student("Tom",3.68) s2=Student("Jon",3.18) print(s1.name,s1.cgpa) Code Example
PHP unzip file into directory, change unzipped folder's name Code Example PHP unzip file into directory, change unzipped folder's name Code Example
n m Code Example n m Code Example
Reset NVRAM/PRAM Code Example Reset NVRAM/PRAM Code Example
25273917440 - 629145600 Code Example 25273917440 - 629145600 Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7