def _validate_fit_memory_usage(self, X):
    max_memory_usage_ratio = self.params_aux['max_memory_usage_ratio']
    model_size_bytes = ((4 * X.shape[0]) * X.shape[1])
    expected_final_model_size_bytes = (model_size_bytes * 3.6)
    if (expected_final_model_size_bytes > 10000000):
        available_mem = psutil.virtual_memory().available
        model_memory_ratio = (expected_final_model_size_bytes / available_mem)
        if (model_memory_ratio > (0.15 * max_memory_usage_ratio)):
            logger.warning(f'	Warning: Model is expected to require {round((model_memory_ratio * 100), 2)}% of available memory...')
        if (model_memory_ratio > (0.2 * max_memory_usage_ratio)):
            raise NotEnoughMemoryError
def _validate_fit_memory_usage(self, X):
    max_memory_usage_ratio = self.params_aux['max_memory_usage_ratio']
    model_size_bytes = ((4 * X.shape[0]) * X.shape[1])
    expected_final_model_size_bytes = (model_size_bytes * 3.6)
    if (expected_final_model_size_bytes > 10000000):
        available_mem = psutil.virtual_memory().available
        model_memory_ratio = (expected_final_model_size_bytes / available_mem)
        if (model_memory_ratio > (0.15 * max_memory_usage_ratio)):
            logger.warning(f'	Warning: Model is expected to require {round((model_memory_ratio * 100), 2)}% of available memory...')
        if (model_memory_ratio > (0.2 * max_memory_usage_ratio)):
            raise NotEnoughMemoryError