This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def treatoutliers(self, df=None, columns=None, factor=1.5, method='IQR', treament='cap'): | |
""" | |
Removes the rows from self.df whose value does not lies in the specified standard deviation | |
:param columns: | |
:param in_stddev: | |
:return: | |
""" | |
# if not columns: | |
# columns = self.mandatory_cols_ + self.optional_cols_ + [self.target_col] | |
if not columns: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vif_func<-function(in_frame,thresh=10,trace=T,wts=NULL,...){ | |
library(fmsb) | |
if(any(!'data.frame' %in% class(in_frame))) in_frame<-data.frame(in_frame) | |
if(is.null(wts)) | |
wts <- rep(1, ncol(in_frame)) | |
if(!is.null(wts)) | |
if(length(wts)!=ncol(in_frame)) stop('length of weights must equal number of variables') |