def _check_daal_supported_parameters(self): _class_name = self.__class__.__name__ if self.n_jobs != 1: warnings.warn(_class_name + ' ignores non-default settings of n_jobs') if self.verbose != 0: warnings.wanr(_class_name + ' ignores non-default settings of verbose') if self.warm_start: warnings.warn(_class_name + ' ignores non-default settings of warm_start') if self.criterion != "gini": warnings.warn(_class_name + ' currently only supports criterion="gini"') if self.min_impurity_decrease != 0.0: warnings.warn( _class_name + " currently does not support min_impurity_decrease." "It currently supports min_impurity_split to control tree growth." ) if self.max_leaf_nodes is not None: warnings.warn(_class_name + " currently does not support non-default " "setting for max_leaf_nodes.") if self.min_weight_fraction_leaf != 0.0: warnings.warn(_class_name + " currently does not support non-default " "setting for min_weight_fraction_leaf.") if self.min_samples_leaf != 1: warnings.warn(_class_name + " currently does not support non-default " "setting for min_samples_leaf.")
def memd(*args): x, seq, t, ndir, N_dim, N, sd, sd2, tol, nbit, MAXITERATIONS, stop_crit, stp_cnt = set_value( args) r = x n_imf = 1 q = [] while stop_emd(r, seq, ndir, N_dim) == False: # current mode m = r # computation of mean and stopping criterion if stop_crit == 'stop': stop_sift, env_mean = stop(m, t, sd, sd2, tol, seq, ndir, N, N_dim) else: counter = 0 stop_sift, env_mean, counter = fix(m, t, seq, ndir, stp_cnt, counter, N, N_dim) # In case the current mode is so small that machine precision can cause # spurious extrema to appear if np.max(np.abs(m)) < (1e-10) * (np.max(np.abs(x))): if stop_sift == False: warnings.warn('emd:warning', 'forced stop of EMD : too small amplitude') else: print('forced stop of EMD : too small amplitude') break # sifting loop while stop_sift == False and nbit < MAXITERATIONS: # sifting m = m - env_mean # computation of mean and stopping criterion if stop_crit == 'stop': stop_sift, env_mean = stop(m, t, sd, sd2, tol, seq, ndir, N, N_dim) else: stop_sift, env_mean, counter = fix(m, t, seq, ndir, stp_cnt, counter, N, N_dim) nbit = nbit + 1 if nbit == (MAXITERATIONS - 1) and nbit > 100: warnings.wanr('emd:warning', 'forced stop of sifting : too many erations') q.append(m.transpose()) n_imf = n_imf + 1 r = r - m nbit = 0 # Stores the residue q.append(r.transpose()) q = np.asarray(q) # sprintf('Elapsed time: %f\n',toc); return (q)