after_merge
stringlengths
28
79.6k
before_merge
stringlengths
20
79.6k
url
stringlengths
38
71
full_traceback
stringlengths
43
922k
traceback_type
stringclasses
555 values
def get_prediction( self, start=None, end=None, dynamic=False, index=None, exog=None, **kwargs ): r""" In-sample prediction and out-of-sample forecasting Parameters ---------- start : int, str, or datetime, optional Zero-indexed observation number at which to start forecasting, ie., ...
def get_prediction( self, start=None, end=None, dynamic=False, index=None, exog=None, **kwargs ): """ In-sample prediction and out-of-sample forecasting Parameters ---------- start : int, str, or datetime, optional Zero-indexed observation number at which to start forecasting, ie., ...
https://github.com/statsmodels/statsmodels/issues/6244
c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:914: RuntimeWarning: overflow encountered in square params_variance = (residuals[k_params_ma:]**2).mean() c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:976: UserWarning: Non-stationary starting autoregressive parameters found. Using zeros as starting p...
IndexError
def summary(self, alpha=0.05, start=None): # Create the model name # See if we have an ARIMA component order = "" if self.model.k_ar + self.model.k_diff + self.model.k_ma > 0: if self.model.k_ar == self.model.k_ar_params: order_ar = self.model.k_ar else: order_ar...
def summary(self, alpha=0.05, start=None): # Create the model name # See if we have an ARIMA component order = "" if self.model.k_ar + self.model.k_diff + self.model.k_ma > 0: if self.model.k_ar == self.model.k_ar_params: order_ar = self.model.k_ar else: order_ar...
https://github.com/statsmodels/statsmodels/issues/6244
c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:914: RuntimeWarning: overflow encountered in square params_variance = (residuals[k_params_ma:]**2).mean() c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:976: UserWarning: Non-stationary starting autoregressive parameters found. Using zeros as starting p...
IndexError
def start_params(self): params = np.zeros(self.k_params, dtype=np.float64) endog = self.endog.copy() mask = ~np.any(np.isnan(endog), axis=1) endog = endog[mask] # 1. Factor loadings (estimated via PCA) if self.k_factors > 0: # Use principal components + OLS as starting values r...
def start_params(self): params = np.zeros(self.k_params, dtype=np.float64) endog = self.endog.copy() # 1. Factor loadings (estimated via PCA) if self.k_factors > 0: # Use principal components + OLS as starting values res_pca = PCA(endog, ncomp=self.k_factors) mod_ols = OLS(endo...
https://github.com/statsmodels/statsmodels/issues/6230
[ 624.6127141 27.2029389 3732.25387731 6.90035198 0.77157448] --------------------------------------------------------------------------- MissingDataError Traceback (most recent call last) <ipython-input-15-f70718facc54> in <module> 9 endog2.iloc[4, :] = np.nan 10 mod = sm.tsa.Dynami...
MissingDataError
def start_params(self): params = np.zeros(self.k_params, dtype=np.float64) # A. Run a multivariate regression to get beta estimates endog = pd.DataFrame(self.endog.copy()) endog = endog.interpolate() endog = endog.fillna(method="backfill").values exog = None if self.k_trend > 0 and self.k_e...
def start_params(self): params = np.zeros(self.k_params, dtype=np.float64) # A. Run a multivariate regression to get beta estimates endog = pd.DataFrame(self.endog.copy()) endog = endog.interpolate() endog = endog.fillna(method="backfill").values exog = None if self.k_trend > 0 and self.k_e...
https://github.com/statsmodels/statsmodels/issues/6127
AttributeError Traceback (most recent call last) <ipython-input-150-40d241e2864d> in <module> 2 model = VARMAX(train,exog=exog_train, order=order, trend=trend, enforce_stationarity=False, enforce_invertibility=False) 3 # fit model ----> 4 model.start_params /anaconda3/lib/python3.7/site...
AttributeError
def fit( self, maxlag=None, method="cmle", ic=None, trend="c", transparams=True, start_params=None, solver="lbfgs", maxiter=35, full_output=1, disp=1, callback=None, **kwargs, ): """ Fit the unconditional maximum likelihood of an AR(p) process. Parameters...
def fit( self, maxlag=None, method="cmle", ic=None, trend="c", transparams=True, start_params=None, solver="lbfgs", maxiter=35, full_output=1, disp=1, callback=None, **kwargs, ): """ Fit the unconditional maximum likelihood of an AR(p) process. Parameters...
https://github.com/statsmodels/statsmodels/issues/947
res.t_test(np.eye(len(res.params))) Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> res.t_test(np.eye(len(res.params))) File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-all-new2\statsmodels\statsmodels\base\model.py", line 1137, in t_test raise ValueError('Need covariance of param...
ValueError
def fit( self, start_params=None, trend="c", method="css-mle", transparams=True, solver="lbfgs", maxiter=500, full_output=1, disp=5, callback=None, start_ar_lags=None, **kwargs, ): """ Fits ARMA(p,q) model using exact maximum likelihood via Kalman filter. Par...
def fit( self, start_params=None, trend="c", method="css-mle", transparams=True, solver="lbfgs", maxiter=500, full_output=1, disp=5, callback=None, start_ar_lags=None, **kwargs, ): """ Fits ARMA(p,q) model using exact maximum likelihood via Kalman filter. Par...
https://github.com/statsmodels/statsmodels/issues/947
res.t_test(np.eye(len(res.params))) Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> res.t_test(np.eye(len(res.params))) File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-all-new2\statsmodels\statsmodels\base\model.py", line 1137, in t_test raise ValueError('Need covariance of param...
ValueError
def attach_cov(self, result): return DataFrame(result, index=self.cov_names, columns=self.cov_names)
def attach_cov(self, result): return DataFrame(result, index=self.param_names, columns=self.param_names)
https://github.com/statsmodels/statsmodels/issues/2270
In [34]: results._results.cov_params.shape Out[34]: (36, 36) In [37]: results.cov_params --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-37-14357748fa96> in <module>() <snip> ValueError: Shape of pa...
ValueError
def fit(self, maxlags=None, method="ols", ic=None, trend="c", verbose=False): # todo: this code is only supporting deterministic terms as exog. # This means that all exog-variables have lag 0. If dealing with # different exogs is necessary, a `lags_exog`-parameter might make # sense (e.g. a sequence of ...
def fit(self, maxlags=None, method="ols", ic=None, trend="c", verbose=False): # todo: this code is only supporting deterministic terms as exog. # This means that all exog-variables have lag 0. If dealing with # different exogs is necessary, a `lags_exog`-parameter might make # sense (e.g. a sequence of ...
https://github.com/statsmodels/statsmodels/issues/2270
In [34]: results._results.cov_params.shape Out[34]: (36, 36) In [37]: results.cov_params --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-37-14357748fa96> in <module>() <snip> ValueError: Shape of pa...
ValueError
def cov_params(self): """Estimated variance-covariance of model coefficients Notes ----- Covariance of vec(B), where B is the matrix [params_for_deterministic_terms, A_1, ..., A_p] with the shape (K x (Kp + number_of_deterministic_terms)) Adjusted to be an unbiased estimator Ref: Lütkep...
def cov_params(self): """Estimated variance-covariance of model coefficients Notes ----- Covariance of vec(B), where B is the matrix [params_for_deterministic_terms, A_1, ..., A_p] with the shape (K x (Kp + number_of_deterministic_terms)) Adjusted to be an unbiased estimator Ref: Lütkep...
https://github.com/statsmodels/statsmodels/issues/2270
In [34]: results._results.cov_params.shape Out[34]: (36, 36) In [37]: results.cov_params --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-37-14357748fa96> in <module>() <snip> ValueError: Shape of pa...
ValueError
def _cov_alpha(self): """ Estimated covariance matrix of model coefficients w/o exog """ # drop exog kn = self.k_exog * self.neqs return self.cov_params()[kn:, kn:]
def _cov_alpha(self): """ Estimated covariance matrix of model coefficients w/o exog """ # drop exog return self._cov_params()[self.k_exog * self.neqs :, self.k_exog * self.neqs :]
https://github.com/statsmodels/statsmodels/issues/2270
In [34]: results._results.cov_params.shape Out[34]: (36, 36) In [37]: results.cov_params --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-37-14357748fa96> in <module>() <snip> ValueError: Shape of pa...
ValueError
def stderr(self): """Standard errors of coefficients, reshaped to match in size""" stderr = np.sqrt(np.diag(self.cov_params())) return stderr.reshape((self.df_model, self.neqs), order="C")
def stderr(self): """Standard errors of coefficients, reshaped to match in size""" stderr = np.sqrt(np.diag(self._cov_params())) return stderr.reshape((self.df_model, self.neqs), order="C")
https://github.com/statsmodels/statsmodels/issues/2270
In [34]: results._results.cov_params.shape Out[34]: (36, 36) In [37]: results.cov_params --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-37-14357748fa96> in <module>() <snip> ValueError: Shape of pa...
ValueError
def ksstat(x, cdf, alternative="two_sided", args=()): """ Calculate statistic for the Kolmogorov-Smirnov test for goodness of fit This calculates the test statistic for a test of the distribution G(x) of an observed variable against a given distribution F(x). Under the null hypothesis the two distr...
def ksstat(x, cdf, alternative="two_sided", args=()): """ Calculate statistic for the Kolmogorov-Smirnov test for goodness of fit This calculates the test statistic for a test of the distribution G(x) of an observed variable against a given distribution F(x). Under the null hypothesis the two distr...
https://github.com/statsmodels/statsmodels/issues/5333
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/_lilliefors.py", line 344, in kstest_fit pval = lilliefors_table.prob(d_ks, nobs) File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/tabledist.py", line 120, in pro...
ValueError
def get_lilliefors_table(dist="norm"): """ Generates tables for significance levels of Lilliefors test statistics Tables for available normal and exponential distribution testing, as specified in Lilliefors references above Parameters ---------- dist : string. distribution being te...
def get_lilliefors_table(dist="norm"): """ Generates tables for significance levels of Lilliefors test statistics Tables for available normal and exponential distribution testing, as specified in Lilliefors references above Parameters ---------- dist : string. distribution being te...
https://github.com/statsmodels/statsmodels/issues/5333
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/_lilliefors.py", line 344, in kstest_fit pval = lilliefors_table.prob(d_ks, nobs) File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/tabledist.py", line 120, in pro...
ValueError
def pval_lf(d_max, n): """ Approximate pvalues for Lilliefors test This is only valid for pvalues smaller than 0.1 which is not checked in this function. Parameters ---------- d_max : array_like two-sided Kolmogorov-Smirnov test statistic n : int or float sample size ...
def pval_lf(Dmax, n): """approximate pvalues for Lilliefors test This is only valid for pvalues smaller than 0.1 which is not checked in this function. Parameters ---------- Dmax : array_like two-sided Kolmogorov-Smirnov test statistic n : int or float sample size Retu...
https://github.com/statsmodels/statsmodels/issues/5333
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/_lilliefors.py", line 344, in kstest_fit pval = lilliefors_table.prob(d_ks, nobs) File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/tabledist.py", line 120, in pro...
ValueError
def f(n): poly = np.array([1, np.log(n), np.log(n) ** 2]) return np.exp(poly.dot(params.T))
def f(n): return np.array([0.86, 0.91, 0.96, 1.06, 1.25]) / np.sqrt(n)
https://github.com/statsmodels/statsmodels/issues/5333
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/_lilliefors.py", line 344, in kstest_fit pval = lilliefors_table.prob(d_ks, nobs) File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/tabledist.py", line 120, in pro...
ValueError
def __init__( self, alpha, size, crit_table, asymptotic=None, min_nobs=None, max_nobs=None ): self.alpha = np.asarray(alpha) if self.alpha.ndim != 1: raise ValueError("alpha is not 1d") elif (np.diff(self.alpha) <= 0).any(): raise ValueError("alpha is not sorted") self.size = np.asar...
def __init__(self, alpha, size, crit_table): self.alpha = np.asarray(alpha) self.size = np.asarray(size) self.crit_table = np.asarray(crit_table) self.n_alpha = len(alpha) self.signcrit = np.sign(np.diff(self.crit_table, 1).mean()) if self.signcrit > 0: # increasing self.critv_bounds =...
https://github.com/statsmodels/statsmodels/issues/5333
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/_lilliefors.py", line 344, in kstest_fit pval = lilliefors_table.prob(d_ks, nobs) File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/tabledist.py", line 120, in pro...
ValueError
def _critvals(self, n): """ Rows of the table, linearly interpolated for given sample size Parameters ---------- n : float sample size, second parameter of the table Returns ------- critv : ndarray, 1d critical values (ppf) corresponding to a row of the table Notes...
def _critvals(self, n): """rows of the table, linearly interpolated for given sample size Parameters ---------- n : float sample size, second parameter of the table Returns ------- critv : ndarray, 1d critical values (ppf) corresponding to a row of the table Notes ...
https://github.com/statsmodels/statsmodels/issues/5333
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/_lilliefors.py", line 344, in kstest_fit pval = lilliefors_table.prob(d_ks, nobs) File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/tabledist.py", line 120, in pro...
ValueError
def prob(self, x, n): """ Find pvalues by interpolation, either cdf(x) Returns extreme probabilities, 0.001 and 0.2, for out of range Parameters ---------- x : array_like observed value, assumed to follow the distribution in the table n : float sample size, second parameter...
def prob(self, x, n): """find pvalues by interpolation, eiter cdf(x) or sf(x) returns extrem probabilities, 0.001 and 0.2, for out of range Parameters ---------- x : array_like observed value, assumed to follow the distribution in the table n : float sample size, second paramet...
https://github.com/statsmodels/statsmodels/issues/5333
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/_lilliefors.py", line 344, in kstest_fit pval = lilliefors_table.prob(d_ks, nobs) File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/tabledist.py", line 120, in pro...
ValueError
def crit(self, prob, n): """ Returns interpolated quantiles, similar to ppf or isf use two sequential 1d interpolation, first by n then by prob Parameters ---------- prob : array_like probabilities corresponding to the definition of table columns n : int or float sample siz...
def crit(self, prob, n): """returns interpolated quantiles, similar to ppf or isf use two sequential 1d interpolation, first by n then by prob Parameters ---------- prob : array_like probabilities corresponding to the definition of table columns n : int or float sample size, se...
https://github.com/statsmodels/statsmodels/issues/5333
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/_lilliefors.py", line 344, in kstest_fit pval = lilliefors_table.prob(d_ks, nobs) File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/tabledist.py", line 120, in pro...
ValueError
def crit3(self, prob, n): """ Returns interpolated quantiles, similar to ppf or isf uses Rbf to interpolate critical values as function of `prob` and `n` Parameters ---------- prob : array_like probabilities corresponding to the definition of table columns n : int or float ...
def crit3(self, prob, n): """returns interpolated quantiles, similar to ppf or isf uses Rbf to interpolate critical values as function of `prob` and `n` Parameters ---------- prob : array_like probabilities corresponding to the definition of table columns n : int or float sampl...
https://github.com/statsmodels/statsmodels/issues/5333
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/_lilliefors.py", line 344, in kstest_fit pval = lilliefors_table.prob(d_ks, nobs) File "/home/testone/lib64/python3.6/site-packages/statsmodels/stats/tabledist.py", line 120, in pro...
ValueError
def _normalize_dataframe(dataframe, index): """Take a pandas DataFrame and count the element present in the given columns, return a hierarchical index on those columns """ # groupby the given keys, extract the same columns and count the element # then collapse them with a mean data = dataframe[i...
def _normalize_dataframe(dataframe, index): """Take a pandas DataFrame and count the element present in the given columns, return a hierarchical index on those columns """ # groupby the given keys, extract the same columns and count the element # then collapse them with a mean data = dataframe[i...
https://github.com/statsmodels/statsmodels/issues/5639
/home/nbuser/anaconda3_501/lib/python3.6/site-packages/statsmodels/graphics/mosaicplot.py:40: RuntimeWarning: invalid value encountered in less if np.any(proportion < 0): posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite valu...
ValueError
def _make_arma_exog(endog, exog, trend): k_trend = 1 # overwritten if no constant if exog is None and trend == "c": # constant only exog = np.ones((len(endog), 1)) elif exog is not None and trend == "c": # constant plus exogenous exog = add_trend(exog, trend="c", prepend=True, has_constan...
def _make_arma_exog(endog, exog, trend): k_trend = 1 # overwritten if no constant if exog is None and trend == "c": # constant only exog = np.ones((len(endog), 1)) elif exog is not None and trend == "c": # constant plus exogenous exog = add_trend(exog, trend="c", prepend=True) elif ex...
https://github.com/statsmodels/statsmodels/issues/3343
import pandas as pd from statsmodels.tsa.arima_model import ARIMA X = [0.5,0.5,0.5,0.5,0.5] Y = [-0.011866,0.003380,0.015357,0.004451,-0.020889] T = ['2000-01-01', '2000-01-02', '2000-01-03', '2000-01-04', '2000-01-05'] TDT = pd.to_datetime(T) df = pd.DataFrame({'x': X, 'y': Y}) df.index = TDT df x y 2000-01-01...
ValueError
def _maybe_convert_ynames_int(self, ynames): # see if they're integers issue_warning = False msg = ( "endog contains values are that not int-like. Uses string " "representation of value. Use integer-valued endog to " "suppress this warning." ) for i in ynames: try: ...
def _maybe_convert_ynames_int(self, ynames): # see if they're integers try: for i in ynames: if ynames[i] % 1 == 0: ynames[i] = str(int(ynames[i])) except TypeError: pass return ynames
https://github.com/statsmodels/statsmodels/issues/3960
result.summary() ynames = ['='.join([yname, name]) for name in ynames] TypeError: sequence item 1: expected str instance, numpy.float64 found ynames = ['='.join([yname, name]) for name in ynames] File "m:\...\statsmodels\discrete\discrete_model.py", line 3916, in <listcomp> File "m:\...\statsmodels\discrete\discrete_mo...
TypeError
def _make_dictnames(tmp_arr, offset=0): """ Helper function to create a dictionary mapping a column number to the name in tmp_arr. """ col_map = {} for i, col_name in enumerate(tmp_arr): col_map[i + offset] = col_name return col_map
def _make_dictnames(tmp_arr, offset=0): """ Helper function to create a dictionary mapping a column number to the name in tmp_arr. """ col_map = {} for i, col_name in enumerate(tmp_arr): col_map.update({i + offset: col_name}) return col_map
https://github.com/statsmodels/statsmodels/issues/1342
In [9]: sm.categorical(pd.DataFrame({'a':[1,2,12], 'b':['a','b','a']}), col='a') --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-9-5966a3ee6951> in <module>() ----> 1 sm.categorical(pd.DataFrame({'a':[...
AttributeError
def categorical(data, col=None, dictnames=False, drop=False): """ Returns a dummy matrix given an array of categorical variables. Parameters ---------- data : array A structured array, recarray, array, Series or DataFrame. This can be either a 1d vector of the categorical variable ...
def categorical( data, col=None, dictnames=False, drop=False, ): """ Returns a dummy matrix given an array of categorical variables. Parameters ---------- data : array A structured array, recarray, or array. This can be either a 1d vector of the categorical variable...
https://github.com/statsmodels/statsmodels/issues/1342
In [9]: sm.categorical(pd.DataFrame({'a':[1,2,12], 'b':['a','b','a']}), col='a') --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-9-5966a3ee6951> in <module>() ----> 1 sm.categorical(pd.DataFrame({'a':[...
AttributeError
def _get_names(self, arr): if isinstance(arr, DataFrame): if isinstance(arr.columns, MultiIndex): # Flatten MultiIndexes into "simple" column names return [".".join((level for level in c if level)) for c in arr.columns] else: return list(arr.columns) elif isin...
def _get_names(self, arr): if isinstance(arr, DataFrame): return list(arr.columns) elif isinstance(arr, Series): if arr.name: return [arr.name] else: return else: try: return arr.dtype.names except AttributeError: pass ...
https://github.com/statsmodels/statsmodels/issues/5414
Traceback (most recent call last): File "xxx/__init__.py", line 451, in do_algorithm_usecase if af.compute(): File "xxx/algorithms/es.py", line 153, in compute preds = self.fitted_model.predict(predict_from, predict_until) File "xxx/myenv/lib/python3.7/site-packages/statsmodels/base/wrapper.py", line 95, in wrapper obj...
ValueError
def __init__( self, data, ncomp=None, standardize=True, demean=True, normalize=True, gls=False, weights=None, method="svd", missing=None, tol=5e-8, max_iter=1000, tol_em=5e-8, max_em_iter=100, ): self._index = None self._columns = [] if isinstance(data...
def __init__( self, data, ncomp=None, standardize=True, demean=True, normalize=True, gls=False, weights=None, method="svd", missing=None, tol=5e-8, max_iter=1000, tol_em=5e-8, max_em_iter=100, ): self._index = None self._columns = [] if isinstance(data...
https://github.com/statsmodels/statsmodels/issues/4772
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\[...]\lib\site-packages\statsmodels\graphics\functional.py", line 32, in _pickle_method if m.im_self is None: AttributeError: 'function' object has no attribute 'im_self'
AttributeError
def _compute_bw(self, bw): """ Computes the bandwidth of the data. Parameters ---------- bw: array_like or str If array_like: user-specified bandwidth. If a string, should be one of: - cv_ml: cross validation maximum likelihood - normal_reference: normal ref...
def _compute_bw(self, bw): """ Computes the bandwidth of the data. Parameters ---------- bw: array_like or str If array_like: user-specified bandwidth. If a string, should be one of: - cv_ml: cross validation maximum likelihood - normal_reference: normal ref...
https://github.com/statsmodels/statsmodels/issues/4772
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\[...]\lib\site-packages\statsmodels\graphics\functional.py", line 32, in _pickle_method if m.im_self is None: AttributeError: 'function' object has no attribute 'im_self'
AttributeError
def __init__(self, endog, exog, var_type, reg_type="ll", bw="cv_ls", defaults=None): self.var_type = var_type self.data_type = var_type self.reg_type = reg_type self.k_vars = len(self.var_type) self.endog = _adjust_shape(endog, 1) self.exog = _adjust_shape(exog, self.k_vars) self.data = np.c...
def __init__(self, endog, exog, var_type, reg_type="ll", bw="cv_ls", defaults=None): self.var_type = var_type self.data_type = var_type self.reg_type = reg_type self.k_vars = len(self.var_type) self.endog = _adjust_shape(endog, 1) self.exog = _adjust_shape(exog, self.k_vars) self.data = np.c...
https://github.com/statsmodels/statsmodels/issues/4772
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\[...]\lib\site-packages\statsmodels\graphics\functional.py", line 32, in _pickle_method if m.im_self is None: AttributeError: 'function' object has no attribute 'im_self'
AttributeError
def _compute_reg_bw(self, bw): if not isinstance(bw, string_types): self._bw_method = "user-specified" return np.asarray(bw) else: # The user specified a bandwidth selection method e.g. 'cv_ls' self._bw_method = bw # Workaround to avoid instance methods in __dict__ ...
def _compute_reg_bw(self, bw): if not isinstance(bw, string_types): self._bw_method = "user-specified" return np.asarray(bw) else: # The user specified a bandwidth selection method e.g. 'cv_ls' self._bw_method = bw res = self.bw_func[bw] X = np.std(self.exog, axis...
https://github.com/statsmodels/statsmodels/issues/4772
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\[...]\lib\site-packages\statsmodels\graphics\functional.py", line 32, in _pickle_method if m.im_self is None: AttributeError: 'function' object has no attribute 'im_self'
AttributeError
def __init__( self, endog, exog, var_type, reg_type, bw="cv_ls", censor_val=0, defaults=None ): self.var_type = var_type self.data_type = var_type self.reg_type = reg_type self.k_vars = len(self.var_type) self.endog = _adjust_shape(endog, 1) self.exog = _adjust_shape(exog, self.k_vars) s...
def __init__( self, endog, exog, var_type, reg_type, bw="cv_ls", censor_val=0, defaults=None ): self.var_type = var_type self.data_type = var_type self.reg_type = reg_type self.k_vars = len(self.var_type) self.endog = _adjust_shape(endog, 1) self.exog = _adjust_shape(exog, self.k_vars) s...
https://github.com/statsmodels/statsmodels/issues/4772
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\[...]\lib\site-packages\statsmodels\graphics\functional.py", line 32, in _pickle_method if m.im_self is None: AttributeError: 'function' object has no attribute 'im_self'
AttributeError
def __init__( self, t=None, F=None, sd=None, effect=None, df_denom=None, df_num=None, alpha=0.05, **kwds, ): self.effect = effect # Let it be None for F if F is not None: self.distribution = "F" self.fvalue = F self.statistic = self.fvalue sel...
def __init__( self, t=None, F=None, sd=None, effect=None, df_denom=None, df_num=None, alpha=0.05, **kwds, ): self.effect = effect # Let it be None for F if F is not None: self.distribution = "F" self.fvalue = F self.statistic = self.fvalue sel...
https://github.com/statsmodels/statsmodels/issues/4588
resols2r.wald_test(np.eye(len(resols2r.params))) --------------------------------------------------------------------------- LinAlgError Traceback (most recent call last) <ipython-input-18-702444fbfca8> in <module>() ----> 1 resols2r.wald_test(np.eye(len(resols2r.params))) ...\statsmodels...
LinAlgError
def summary(self, xname=None, alpha=0.05, title=None): """Summarize the Results of the hypothesis test Parameters ----------- xname : list of strings, optional Default is `c_##` for ## in p the number of regressors alpha : float significance level for the confidence intervals. Defa...
def summary(self, xname=None, alpha=0.05, title=None): """Summarize the Results of the hypothesis test Parameters ----------- xname : list of strings, optional Default is `c_##` for ## in p the number of regressors alpha : float significance level for the confidence intervals. Defa...
https://github.com/statsmodels/statsmodels/issues/4588
resols2r.wald_test(np.eye(len(resols2r.params))) --------------------------------------------------------------------------- LinAlgError Traceback (most recent call last) <ipython-input-18-702444fbfca8> in <module>() ----> 1 resols2r.wald_test(np.eye(len(resols2r.params))) ...\statsmodels...
LinAlgError
def _fit_start_params_hr(self, order, start_ar_lags=None): """ Get starting parameters for fit. Parameters ---------- order : iterable (p,q,k) - AR lags, MA lags, and number of exogenous variables including the constant. start_ar_lags : int, optional If start_ar_lags is ...
def _fit_start_params_hr(self, order, start_ar_lags=None): """ Get starting parameters for fit. Parameters ---------- order : iterable (p,q,k) - AR lags, MA lags, and number of exogenous variables including the constant. start_ar_lags : int, optional If start_ar_lags is ...
https://github.com/statsmodels/statsmodels/issues/3504
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-51-964a74d33f5a> in <module>() 5 6 model = sm.tsa.arima_model.ARIMA(ts, order=(0, 2, 0)) ----> 7 fitted = model.fit(disp=-1) 8 9 /usr/local/lib/python3....
TypeError
def plot_simultaneous( self, comparison_name=None, ax=None, figsize=(10, 6), xlabel=None, ylabel=None ): """Plot a universal confidence interval of each group mean Visiualize significant differences in a plot with one confidence interval per group instead of all pairwise confidence intervals. Para...
def plot_simultaneous( self, comparison_name=None, ax=None, figsize=(10, 6), xlabel=None, ylabel=None ): """Plot a universal confidence interval of each group mean Visiualize significant differences in a plot with one confidence interval per group instead of all pairwise confidence intervals. Para...
https://github.com/statsmodels/statsmodels/issues/3584
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-1-35117e389add> in <module>() 35 alpha=0.05) # Significance level 36 ---> 37 tukey.plot_simultaneous(comparison_name =...
TypeError
def medcouple(y, axis=0): """ Calculates the medcouple robust measure of skew. Parameters ---------- y : array-like axis : int or None, optional Axis along which the medcouple statistic is computed. If `None`, the entire array is used. Returns ------- mc : ndarray ...
def medcouple(y, axis=0): """ Calculates the medcouple robust measure of skew. Parameters ---------- y : array-like axis : int or None, optional Axis along which the medcouple statistic is computed. If `None`, the entire array is used. Returns ------- mc : ndarray ...
https://github.com/statsmodels/statsmodels/issues/4243
from statsmodels.stats.stattools import medcouple medcouple(np.arange(9)) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "...\statsmodels\stats\stattools.py", line 451, in medcouple return np.apply_along_axis(_medcouple_1d, axis, y) File "C:\...\python-3.4.4.amd64\lib\site-packages\numpy\li...
OverflowError
def summary2(self, alpha=0.05, float_format="%.4f"): """Experimental function to summarize regression results Parameters ----------- alpha : float significance level for the confidence intervals float_format: string print format for floats in parameters summary Returns ----...
def summary2(self, alpha=0.05, float_format="%.4f"): """Experimental function to summarize regression results Parameters ----------- alpha : float significance level for the confidence intervals float_format: string print format for floats in parameters summary Returns ----...
https://github.com/statsmodels/statsmodels/issues/3651
====================================================================== ERROR: statsmodels.discrete.tests.test_discrete.test_mnlogit_factor ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/miniconda2/envs/statsmodels-test/lib/python2.7/site-pack...
ValueError
def summary_params( results, yname=None, xname=None, alpha=0.05, use_t=True, skip_header=False, float_format="%.4f", ): """create a summary table of parameters from results instance Parameters ---------- res : results instance some required information is directly ta...
def summary_params( results, yname=None, xname=None, alpha=0.05, use_t=True, skip_header=False, float_format="%.4f", ): """create a summary table of parameters from results instance Parameters ---------- res : results instance some required information is directly ta...
https://github.com/statsmodels/statsmodels/issues/3651
====================================================================== ERROR: statsmodels.discrete.tests.test_discrete.test_mnlogit_factor ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/miniconda2/envs/statsmodels-test/lib/python2.7/site-pack...
ValueError
def acorr_ljungbox(x, lags=None, boxpierce=False): """ Ljung-Box test for no autocorrelation Parameters ---------- x : array_like, 1d data series, regression residuals when used as diagnostic test lags : None, int or array_like If lags is an integer then this is taken to be the ...
def acorr_ljungbox(x, lags=None, boxpierce=False): """Ljung-Box test for no autocorrelation Parameters ---------- x : array_like, 1d data series, regression residuals when used as diagnostic test lags : None, int or array_like If lags is an integer then this is taken to be the large...
https://github.com/statsmodels/statsmodels/issues/3229
from statsmodels.stats import diagnostic as diag diag.acorr_ljungbox(np.random.random(50))[0].shape (40,) diag.acorr_ljungbox(np.random.random(20), lags=5) (array([ 0.36718151, 1.02009595, 1.23734092, 3.75338034, 4.35387236]), array([ 0.54454461, 0.60046677, 0.74406305, 0.44040973, 0.49966951])) diag.acorr_ljun...
ValueError
def acorr_ljungbox(x, lags=None, boxpierce=False): """ Ljung-Box test for no autocorrelation Parameters ---------- x : array_like, 1d data series, regression residuals when used as diagnostic test lags : None, int or array_like If lags is an integer then this is taken to be the ...
def acorr_ljungbox(x, lags=None, boxpierce=False): """Ljung-Box test for no autocorrelation Parameters ---------- x : array_like, 1d data series, regression residuals when used as diagnostic test lags : None, int or array_like If lags is an integer then this is taken to be the large...
https://github.com/statsmodels/statsmodels/issues/3229
from statsmodels.stats import diagnostic as diag diag.acorr_ljungbox(np.random.random(50))[0].shape (40,) diag.acorr_ljungbox(np.random.random(20), lags=5) (array([ 0.36718151, 1.02009595, 1.23734092, 3.75338034, 4.35387236]), array([ 0.54454461, 0.60046677, 0.74406305, 0.44040973, 0.49966951])) diag.acorr_ljun...
ValueError
def __getstate__(self): # remove unpicklable methods mle_settings = getattr(self, "mle_settings", None) if mle_settings is not None: if "callback" in mle_settings: mle_settings["callback"] = None if "cov_params_func" in mle_settings: mle_settings["cov_params_func"] = ...
def __getstate__(self): try: # remove unpicklable callback self.mle_settings["callback"] = None except (AttributeError, KeyError): pass return self.__dict__
https://github.com/statsmodels/statsmodels/issues/2685
Traceback (most recent call last): File "statsmodels/base/tests/test_shrink_pickle.py", line 290, in <module> tt.test_remove_data_pickle() File "statsmodels/base/tests/test_shrink_pickle.py", line 68, in test_remove_data_pickle res, l = check_pickle(results._results) File "statsmodels/base/tests/test_shrink_pickle.py",...
cPickle.PicklingError
def impute_pmm(self, vname): """ Use predictive mean matching to impute missing values. Notes ----- The `perturb_params` method must be called first to define the model. """ k_pmm = self.k_pmm endog_obs, exog_obs, exog_miss, predict_obs_kwds, predict_miss_kwds = ( self.get...
def impute_pmm(self, vname): """ Use predictive mean matching to impute missing values. Notes ----- The `perturb_params` method must be called first to define the model. """ k_pmm = self.k_pmm endog_obs, exog_obs, exog_miss, predict_obs_kwds, predict_miss_kwds = ( self.get...
https://github.com/statsmodels/statsmodels/issues/3754
====================================================================== ERROR: statsmodels.imputation.tests.test_mice.TestMICE.test_MICE ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/miniconda2/envs/statsmodels-test/lib/python3.6/site-package...
ValueError
def plot_distribution(self, ax=None, exog_values=None): """ Plot the fitted probabilities of endog in an nominal model, for specifed values of the predictors. Parameters ---------- ax : Matplotlib axes instance An axes on which to draw the graph. If None, new figure and axes ob...
def plot_distribution(self, ax=None, exog_values=None): """ Plot the fitted probabilities of endog in an nominal model, for specifed values of the predictors. Parameters ---------- ax : Matplotlib axes instance An axes on which to draw the graph. If None, new figure and axes ob...
https://github.com/statsmodels/statsmodels/issues/3332
====================================================================== ERROR: statsmodels.genmod.tests.test_gee.TestGEE.test_nominal_plot ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest s...
TypeError
def predict(self, exog=None, transform=True, *args, **kwargs): """ Call self.model.predict with self.params as the first argument. Parameters ---------- exog : array-like, optional The values for which you want to predict. transform : bool, optional If the model was fit via a fo...
def predict(self, exog=None, transform=True, *args, **kwargs): """ Call self.model.predict with self.params as the first argument. Parameters ---------- exog : array-like, optional The values for which you want to predict. transform : bool, optional If the model was fit via a fo...
https://github.com/statsmodels/statsmodels/issues/3182
res.predict({'temp': x_p}) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "m:\josef_new\eclipse_ws\statsmodels\statsmodels_py34_pr\statsmodels\base\model.py", line 774, in predict if len(exog) < len(exog_index): TypeError: object of type 'NoneType' has no len()
TypeError
def predict(self, exog=None, transform=True, *args, **kwargs): """ Call self.model.predict with self.params as the first argument. Parameters ---------- exog : array-like, optional The values for which you want to predict. transform : bool, optional If the model was fit via a fo...
def predict(self, exog=None, transform=True, *args, **kwargs): """ Call self.model.predict with self.params as the first argument. Parameters ---------- exog : array-like, optional The values for which you want to predict. transform : bool, optional If the model was fit via a fo...
https://github.com/statsmodels/statsmodels/issues/3182
res.predict({'temp': x_p}) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "m:\josef_new\eclipse_ws\statsmodels\statsmodels_py34_pr\statsmodels\base\model.py", line 774, in predict if len(exog) < len(exog_index): TypeError: object of type 'NoneType' has no len()
TypeError
def _get_index_loc(self, key, base_index=None): """ Get the location of a specific key in an index Parameters ---------- key : label The key for which to find the location base_index : pd.Index, optional Optionally the base index to search. If None, the model's index is ...
def _get_index_loc(self, key, base_index=None): """ Get the location of a specific key in an index Parameters ---------- key : label The key for which to find the location base_index : pd.Index, optional Optionally the base index to search. If None, the model's index is ...
https://github.com/statsmodels/statsmodels/issues/3349
====================================================================== ERROR: statsmodels.tsa.statespace.tests.test_sarimax.test_misc_exog ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Py\lib\site-packages\nose\case.py", line 197, in runTest self.test...
ValueError
def fit( self, start_params=None, method="newton", maxiter=100, full_output=True, disp=True, fargs=(), callback=None, retall=False, skip_hessian=False, **kwargs, ): """ Fit method for likelihood based models Parameters ---------- start_params : array-like...
def fit( self, start_params=None, method="newton", maxiter=100, full_output=True, disp=True, fargs=(), callback=None, retall=False, skip_hessian=False, **kwargs, ): """ Fit method for likelihood based models Parameters ---------- start_params : array-like...
https://github.com/statsmodels/statsmodels/issues/3098
Traceback (most recent call last): File "C:\git\statsmodels\statsmodels\base\model.py", line 447, in fit H = -1 * self.hessian(xopt) File "C:\git\statsmodels\statsmodels\tsa\arima_model.py", line 593, in hessian return approx_hess_cs(params, self.loglike, args=(False,)) File "C:\git\statsmodels\statsmodels\tools\numdif...
ValueError
def initialize(self): if not self.score: # right now score is not optional self.score = approx_fprime if not self.hessian: pass else: # can use approx_hess_p if we have a gradient if not self.hessian: pass # Initialize is called by # statsmodels.model.Li...
def initialize(self): if not self.score: # right now score is not optional self.score = approx_fprime if not self.hessian: pass else: # can use approx_hess_p if we have a gradient if not self.hessian: pass # Initialize is called by # statsmodels.model.Li...
https://github.com/statsmodels/statsmodels/issues/3098
Traceback (most recent call last): File "C:\git\statsmodels\statsmodels\base\model.py", line 447, in fit H = -1 * self.hessian(xopt) File "C:\git\statsmodels\statsmodels\tsa\arima_model.py", line 593, in hessian return approx_hess_cs(params, self.loglike, args=(False,)) File "C:\git\statsmodels\statsmodels\tools\numdif...
ValueError
def predict(self, exog=None, transform=True, *args, **kwargs): """ Call self.model.predict with self.params as the first argument. Parameters ---------- exog : array-like, optional The values for which you want to predict. transform : bool, optional If the model was fit via a fo...
def predict(self, exog=None, transform=True, *args, **kwargs): """ Call self.model.predict with self.params as the first argument. Parameters ---------- exog : array-like, optional The values for which you want to predict. transform : bool, optional If the model was fit via a fo...
https://github.com/statsmodels/statsmodels/issues/3087
Traceback (most recent call last): File "E:\josef_new_notebook\scripts\bug_missing_formula.py", line 10, in <modu le> test3 = result3.predict(df3) # Fails File "E:\josef_new_notebook\git\statsmodels_py34_pr\statsmodels\base\model.py" , line 767, in predict return pd.Series(predict_results, index=exog_index) File "C...
ValueError
def plot_corr( dcorr, xnames=None, ynames=None, title=None, normcolor=False, ax=None, cmap="RdYlBu_r", ): """Plot correlation of many variables in a tight color grid. Parameters ---------- dcorr : ndarray Correlation matrix, square 2-D array. xnames : list of str...
def plot_corr( dcorr, xnames=None, ynames=None, title=None, normcolor=False, ax=None, cmap="RdYlBu_r", ): """Plot correlation of many variables in a tight color grid. Parameters ---------- dcorr : ndarray Correlation matrix, square 2-D array. xnames : list of str...
https://github.com/statsmodels/statsmodels/issues/2510
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-24-f81f43c530b6> in <module>() 1 corr_columns = df_business[...] 2 corr_matrix = corr_columns.corr() ----> 3 smg.plot_corr(corr_matrix, xnames=corr_colum...
ValueError
def fit(self, maxlags=None, method="ols", ic=None, trend="c", verbose=False): """ Fit the VAR model Parameters ---------- maxlags : int Maximum number of lags to check for order selection, defaults to 12 * (nobs/100.)**(1./4), see select_order function method : {'ols'} E...
def fit(self, maxlags=None, method="ols", ic=None, trend="c", verbose=False): """ Fit the VAR model Parameters ---------- maxlags : int Maximum number of lags to check for order selection, defaults to 12 * (nobs/100.)**(1./4), see select_order function method : {'ols'} E...
https://github.com/statsmodels/statsmodels/issues/2271
model_t = VAR(data_t) results = model.fit(4, trend = 't') --------------------------------------------------------------------------- UnboundLocalError Traceback (most recent call last) <ipython-input-98-f7328095d596> in <module>() 1 model_t = VAR(data_t) ----> 2 results = model.fit(4, trend = ...
UnboundLocalError
def _cov_alpha(self): """ Estimated covariance matrix of model coefficients ex intercept """ # drop intercept and trend return self.cov_params[self.k_trend * self.neqs :, self.k_trend * self.neqs :]
def _cov_alpha(self): """ Estimated covariance matrix of model coefficients ex intercept """ # drop intercept return self.cov_params[self.neqs :, self.neqs :]
https://github.com/statsmodels/statsmodels/issues/1636
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/statsmodels/tsa/vector_ar/irf.py", line 138, in plot stderr = self.cov(orth=orth) File "/usr/lib/python2.7/dist-packages/statsmodels/tsa/vector_ar/irf.py", line 264, in cov covs[i] = chain_dot(Gi, self.cov_a, G...
ValueError
def __init__(self, endog, exog=None, missing="none", hasconst=None, **kwargs): if "design_info" in kwargs: self.design_info = kwargs.pop("design_info") if missing != "none": arrays, nan_idx = self.handle_missing(endog, exog, missing, **kwargs) self.missing_row_idx = nan_idx self....
def __init__(self, endog, exog=None, missing="none", hasconst=None, **kwargs): if missing != "none": arrays, nan_idx = self.handle_missing(endog, exog, missing, **kwargs) self.missing_row_idx = nan_idx self.__dict__.update(arrays) # attach all the data arrays self.orig_endog = self....
https://github.com/statsmodels/statsmodels/issues/2171
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 540, in runfile execfile(filename, namespace) File "/home/adrian/Desktop/ToDo/statsmodels_debugging/OLS.py", line 34, in <module> fit.predict( exog=data[:...
AttributeError
def _handle_data(self, endog, exog, missing, hasconst, **kwargs): data = handle_data(endog, exog, missing, hasconst, **kwargs) # kwargs arrays could have changed, easier to just attach here for key in kwargs: if key == "design_info": # leave this attached to data continue # pop ...
def _handle_data(self, endog, exog, missing, hasconst, **kwargs): data = handle_data(endog, exog, missing, hasconst, **kwargs) # kwargs arrays could have changed, easier to just attach here for key in kwargs: # pop so we don't start keeping all these twice or references try: seta...
https://github.com/statsmodels/statsmodels/issues/2171
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 540, in runfile execfile(filename, namespace) File "/home/adrian/Desktop/ToDo/statsmodels_debugging/OLS.py", line 34, in <module> fit.predict( exog=data[:...
AttributeError
def from_formula(cls, formula, data, subset=None, *args, **kwargs): """ Create a Model from a formula and dataframe. Parameters ---------- formula : str or generic Formula object The formula specifying the model data : array-like The data for the model. See Notes. subset : a...
def from_formula(cls, formula, data, subset=None, *args, **kwargs): """ Create a Model from a formula and dataframe. Parameters ---------- formula : str or generic Formula object The formula specifying the model data : array-like The data for the model. See Notes. subset : a...
https://github.com/statsmodels/statsmodels/issues/2171
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 540, in runfile execfile(filename, namespace) File "/home/adrian/Desktop/ToDo/statsmodels_debugging/OLS.py", line 34, in <module> fit.predict( exog=data[:...
AttributeError
def predict(self, exog=None, transform=True, *args, **kwargs): """ Call self.model.predict with self.params as the first argument. Parameters ---------- exog : array-like, optional The values for which you want to predict. transform : bool, optional If the model was fit via a fo...
def predict(self, exog=None, transform=True, *args, **kwargs): """ Call self.model.predict with self.params as the first argument. Parameters ---------- exog : array-like, optional The values for which you want to predict. transform : bool, optional If the model was fit via a fo...
https://github.com/statsmodels/statsmodels/issues/2171
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 540, in runfile execfile(filename, namespace) File "/home/adrian/Desktop/ToDo/statsmodels_debugging/OLS.py", line 34, in <module> fit.predict( exog=data[:...
AttributeError
def handle_formula_data(Y, X, formula, depth=0, missing="drop"): """ Returns endog, exog, and the model specification from arrays and formula Parameters ---------- Y : array-like Either endog (the LHS) of a model specification or all of the data. Y must define __getitem__ for now. ...
def handle_formula_data(Y, X, formula, depth=0, missing="drop"): """ Returns endog, exog, and the model specification from arrays and formula Parameters ---------- Y : array-like Either endog (the LHS) of a model specification or all of the data. Y must define __getitem__ for now. ...
https://github.com/statsmodels/statsmodels/issues/2171
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 540, in runfile execfile(filename, namespace) File "/home/adrian/Desktop/ToDo/statsmodels_debugging/OLS.py", line 34, in <module> fit.predict( exog=data[:...
AttributeError
def anova_single(model, **kwargs): """ ANOVA table for one fitted linear model. Parameters ---------- model : fitted linear model results instance A fitted linear model typ : int or str {1,2,3} or {"I","II","III"} Type of sum of squares to use. **kwargs** scale : float...
def anova_single(model, **kwargs): """ ANOVA table for one fitted linear model. Parameters ---------- model : fitted linear model results instance A fitted linear model typ : int or str {1,2,3} or {"I","II","III"} Type of sum of squares to use. **kwargs** scale : float...
https://github.com/statsmodels/statsmodels/issues/2171
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 540, in runfile execfile(filename, namespace) File "/home/adrian/Desktop/ToDo/statsmodels_debugging/OLS.py", line 34, in <module> fit.predict( exog=data[:...
AttributeError
def simultaneous_ci(q_crit, var, groupnobs, pairindices=None): """Compute simultaneous confidence intervals for comparison of means. q_crit value is generated from tukey hsd test. Variance is considered across all groups. Returned halfwidths can be thought of as uncertainty intervals around each group ...
def simultaneous_ci(q_crit, var, groupnobs, pairindices=None): """Compute simultaneous confidence intervals for comparison of means. q_crit value is generated from tukey hsd test. Variance is considered across all groups. Returned halfwidths can be thought of as uncertainty intervals around each group ...
https://github.com/statsmodels/statsmodels/issues/2065
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-30-234737c8d0af> in <module>() ----> 1 tuk.plot_simultaneous() /home/thauck/.virtualenvs/zues/local/lib/python2.7/site-packages/statsmodels/sandbox/stat...
NameError
def __init__( self, endog, exog, groups, time=None, family=None, cov_struct=None, missing="none", offset=None, dep_data=None, constraint=None, update_dep=True, ): self.missing = missing self.dep_data = dep_data self.constraint = constraint self.update_dep ...
def __init__( self, endog, exog, groups, time=None, family=None, cov_struct=None, missing="none", offset=None, dep_data=None, constraint=None, update_dep=True, ): self.missing = missing self.dep_data = dep_data self.constraint = constraint self.update_dep ...
https://github.com/statsmodels/statsmodels/issues/1877
OK!! Traceback (most recent call last): File "t.py", line 59, in <module> cov_struct=Independence(), family=sm.families.Binomial()) File "/usr/local/lib/python2.7/dist-packages/statsmodels-0.6.0-py2.7-linux-x86_64.egg/statsmodels/genmod/generalized_estimating_equations.py", line 261, in __init__ constraint=constraint) ...
IndexError
def setup_nominal(self, endog, exog, groups, time, offset): """ Restructure nominal data as binary indicators so that they can be analysed using Generalized Estimating Equations. """ self.endog_orig = endog.copy() self.exog_orig = exog.copy() self.groups_orig = groups.copy() if offset i...
def setup_nominal(self, endog, exog, groups, time, offset): """ Restructure nominal data as binary indicators so that they can be analysed using Generalized Estimating Equations. """ self.endog_orig = endog.copy() self.exog_orig = exog.copy() self.groups_orig = groups.copy() if offset i...
https://github.com/statsmodels/statsmodels/issues/1931
====================================================================== ERROR: statsmodels.genmod.tests.test_gee.TestGEEMultinomialCovType.test_wrapper ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\programs\python27\lib\site-packages\nose-1.0.0-py2.7.e...
ValueError
def __init__( self, kls, func, funcinvplus, funcinvminus, derivplus, derivminus, *args, **kwargs ): # print args # print kwargs self.func = func self.funcinvplus = funcinvplus self.funcinvminus = funcinvminus self.derivplus = derivplus self.derivminus = derivminus # explicit for sel...
def __init__( self, kls, func, funcinvplus, funcinvminus, derivplus, derivminus, *args, **kwargs ): # print args # print kwargs self.func = func self.funcinvplus = funcinvplus self.funcinvminus = funcinvminus self.derivplus = derivplus self.derivminus = derivminus # explicit for sel...
https://github.com/statsmodels/statsmodels/issues/1864
====================================================================== ERROR: Failure: TypeError (__init__() takes at least 7 arguments (1 given)) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/miniconda/envs/statsmodels-test/lib/python2.7/si...
TypeError
def _infer_freq(dates): maybe_freqstr = getattr(dates, "freqstr", None) if maybe_freqstr is not None: return maybe_freqstr try: from pandas.tseries.api import infer_freq freq = infer_freq(dates) return freq except ImportError: pass timedelta = datetime.timed...
def _infer_freq(dates): if hasattr(dates, "freqstr"): return dates.freqstr try: from pandas.tseries.api import infer_freq freq = infer_freq(dates) return freq except ImportError: pass timedelta = datetime.timedelta nobs = min(len(dates), 6) if nobs == 1:...
https://github.com/statsmodels/statsmodels/issues/1822
====================================================================== ERROR: statsmodels.graphics.tests.test_tsaplots.test_plot_month ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest self...
AttributeError
def lowess( endog, exog, frac=2.0 / 3.0, it=3, delta=0.0, is_sorted=False, missing="drop", return_sorted=True, ): """LOWESS (Locally Weighted Scatterplot Smoothing) A lowess function that outs smoothed estimates of endog at the given exog values from points (exog, endog) ...
def lowess( endog, exog, frac=2.0 / 3.0, it=3, delta=0.0, is_sorted=False, missing="drop", return_sorted=True, ): """LOWESS (Locally Weighted Scatterplot Smoothing) A lowess function that outs smoothed estimates of endog at the given exog values from points (exog, endog) ...
https://github.com/statsmodels/statsmodels/issues/967
====================================================================== ERROR: statsmodels.nonparametric.tests.test_lowess.TestLowess.test_options ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in r...
ValueError
def fit( self, maxlag=None, method="cmle", ic=None, trend="c", transparams=True, start_params=None, solver=None, maxiter=35, full_output=1, disp=1, callback=None, **kwargs, ): """ Fit the unconditional maximum likelihood of an AR(p) process. Parameters ...
def fit( self, maxlag=None, method="cmle", ic=None, trend="c", transparams=True, start_params=None, solver=None, maxiter=35, full_output=1, disp=1, callback=None, **kwargs, ): """ Fit the unconditional maximum likelihood of an AR(p) process. Parameters ...
https://github.com/statsmodels/statsmodels/issues/236
res1a = AR(data.endog).fit(maxlag=9, start_params=0.1*np.ones(9.),method="mle", disp=-1) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-josef_new\statsmodels\tsa\ar_model.py", line 550, in fit if not start_params: ValueError: The truth...
ValueError
def _compute_efficient(self, bw): """ Computes the bandwidth by estimating the scaling factor (c) in n_res resamples of size ``n_sub`` (in `randomize` case), or by dividing ``nobs`` into as many ``n_sub`` blocks as needed (if `randomize` is False). References ---------- See p.9 in socse...
def _compute_efficient(self, bw): """ Computes the bandwidth by estimating the scaling factor (c) in n_res resamples of size ``n_sub`` (in `randomize` case), or by dividing ``nobs`` into as many ``n_sub`` blocks as needed (if `randomize` is False). References ---------- See p.9 in socse...
https://github.com/statsmodels/statsmodels/issues/673
====================================================================== ERROR: statsmodels.nonparametric.tests.test_kernel_density.TestKDEMultivariate.test_continuous_cvls_efficient ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/dist-pac...
TypeError
def attach_columns(self, result): if result.squeeze().ndim <= 1 and len(result) > 1: return Series(result, index=self.xnames) else: # for e.g., confidence intervals return DataFrame(result, index=self.xnames)
def attach_columns(self, result): if result.squeeze().ndim <= 1: return Series(result, index=self.xnames) else: # for e.g., confidence intervals return DataFrame(result, index=self.xnames)
https://github.com/statsmodels/statsmodels/issues/706
model = ols('LREO_recovery ~ 0 + HREO_recovery', df_product) results = model.fit() print results.summary() OLS Regression Results ============================================================================== Dep. Variable: LREO_recovery R-squared: 0.999 Model: ...
Exception
def _isdummy(X): """ Given an array X, returns the column indices for the dummy variables. Parameters ---------- X : array-like A 1d or 2d array of numbers Examples -------- >>> X = np.random.randint(0, 2, size=(15,5)).astype(float) >>> X[:,1:3] = np.random.randn(15,2) ...
def _isdummy(X): """ Given an array X, returns the column indices for the dummy variables. Parameters ---------- X : array-like A 1d or 2d array of numbers Examples -------- >>> X = np.random.randint(0, 2, size=(15,5)).astype(float) >>> X[:,1:3] = np.random.randn(15,2) ...
https://github.com/statsmodels/statsmodels/issues/399
====================================================================== ERROR: statsmodels.discrete.tests.test_discrete.TestLogitNewton.test_dummy_dydxmean ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.6/lib...
TypeError
def _get_dummy_effects(effects, exog, dummy_ind, method, model, params): for i in dummy_ind: exog0 = exog.copy() # only copy once, can we avoid a copy? exog0[:, i] = 0 effect0 = model.predict(params, exog0) # fittedvalues0 = np.dot(exog0,params) exog0[:, i] = 1 effec...
def _get_dummy_effects(effects, exog, dummy_ind, method, model, params): for i, tf in enumerate(dummy_ind): if tf == True: exog0 = exog.copy() # only copy once, can we avoid a copy? exog0[:, i] = 0 effect0 = model.predict(params, exog0) # fittedvalues0 = np.d...
https://github.com/statsmodels/statsmodels/issues/399
====================================================================== ERROR: statsmodels.discrete.tests.test_discrete.TestLogitNewton.test_dummy_dydxmean ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.6/lib...
TypeError
def summary_params_2dflat( result, endog_names=None, exog_names=None, alpha=0.95, use_t=True, keep_headers=True, endog_cols=False, ): # skip_headers2=True): """summary table for parameters that are 2d, e.g. multi-equation models Parameter --------- result : result instan...
def summary_params_2dflat( result, endog_names=None, exog_names=None, alpha=0.95, use_t=True, keep_headers=True, endog_cols=False, ): # skip_headers2=True): """summary table for parameters that are 2d, e.g. multi-equation models Parameter --------- result : result instan...
https://github.com/statsmodels/statsmodels/issues/339
Traceback (most recent call last): File "fitting.py", line 83, in <module> print mlogit_res.summary() File "/usr/local/lib/python2.7/dist-packages/statsmodels-0.4.1-py2.7-linux-x86_64.egg/statsmodels/discrete/discrete_model.py", line 1728, in summary use_t=False) File "/usr/local/lib/python2.7/dist-packages/statsmodels...
ValueError
def add_constant(data, prepend=False): """ This appends a column of ones to an array if prepend==False. For ndarrays and pandas.DataFrames, checks to make sure a constant is not already included. If there is at least one column of ones then the original object is returned. Does not check for a con...
def add_constant(data, prepend=False): """ This appends a column of ones to an array if prepend==False. For ndarrays and pandas.DataFrames, checks to make sure a constant is not already included. If there is at least one column of ones then the original object is returned. Does not check for a con...
https://github.com/statsmodels/statsmodels/issues/260
$ dmesg | grep -e"Linux version" [ 0.000000] Linux version 2.6.32-308-ec2 (buildd@crested) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #15-Ubuntu SMP Thu Aug 19 04:03:34 UTC 2010 (Ubuntu 2.6.32-308.15-ec2 2.6.32.15+drm33.5) $ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type "help",...
TypeError
def predict(self, params, exog=None, exposure=None, offset=None, linear=False): """ Predict response variable of a count model given exogenous variables. Notes ----- If exposure is specified, then it will be logged by the method. The user does not need to log it first. """ # TODO: add o...
def predict(self, params, exog=None, exposure=None, offset=None, linear=False): """ Predict response variable of a count model given exogenous variables. Notes ----- If exposure is specified, then it will be logged by the method. The user does not need to log it first. """ # TODO: add o...
https://github.com/statsmodels/statsmodels/issues/175
results3 = model.fit(start_value=-np.ones(4), method='bfgs') Warning: Desired error not necessarily achieveddue to precision loss Current function value: 17470.629507 Iterations: 17 Function evaluations: 32 Gradient evaluations: 31 results3.predict(xf) Traceback (most recent call last): File "<stdin>", line 1, in <mod...
TypeError
def search_novel(self, query): response = self.submit_form(search_url, {"searchword": query}) data = response.json() results = [] for novel in data: titleSoup = BeautifulSoup(novel["name"], "lxml") results.append( { "title": titleSoup.body.text.title(), ...
def search_novel(self, query): response = self.submit_form(search_url, {"searchword": query}) data = response.json() results = [] for novel in data: titleSoup = BeautifulSoup(novel["name"], "lxml") results.append( { "title": titleSoup.body.text.title(), ...
https://github.com/dipu-bd/lightnovel-crawler/issues/476
2020-06-08 18:50:45,291 [DEBUG] (urllib3.connectionpool) https://www.mtlnovel.com:443 "GET /wp-admin/admin-ajax.php?action=autosuggest&amp;q=strongest%20sword%20god HTTP/1.1" 200 None 2020-06-08 18:50:45,297 [DEBUG] (SEARCH_NOVEL) Traceback (most recent call last): File "./src/core/novel_search.py", line 22, in get_sea...
KeyError
def search_novel(self, query): query = query.lower().replace(" ", "%20") # soup = self.get_soup(search_url % query) list_url = search_url % query data = self.get_json(list_url)["items"][0]["results"] results = [] for item in data: url = item["permalink"] results.append( ...
def search_novel(self, query): query = query.lower().replace(" ", "%20") # soup = self.get_soup(search_url % query) list_url = search_url % query data = self.get_json(list_url)["items"][0]["results"] results = [] for item in data: url = self.absolute_url("https://es.mtlnovel.com/?p=%s"...
https://github.com/dipu-bd/lightnovel-crawler/issues/476
2020-06-08 18:50:45,291 [DEBUG] (urllib3.connectionpool) https://www.mtlnovel.com:443 "GET /wp-admin/admin-ajax.php?action=autosuggest&amp;q=strongest%20sword%20god HTTP/1.1" 200 None 2020-06-08 18:50:45,297 [DEBUG] (SEARCH_NOVEL) Traceback (most recent call last): File "./src/core/novel_search.py", line 22, in get_sea...
KeyError
def search_novel(self, query): query = query.lower().replace(" ", "%20") # soup = self.get_soup(search_url % query) list_url = search_url % query data = self.get_json(list_url)["items"][0]["results"] results = [] for item in data: url = item["permalink"] results.append( ...
def search_novel(self, query): query = query.lower().replace(" ", "%20") # soup = self.get_soup(search_url % query) list_url = search_url % query data = self.get_json(list_url)["items"][0]["results"] results = [] for item in data: url = self.absolute_url("https://fr.mtlnovel.com/?p=%s"...
https://github.com/dipu-bd/lightnovel-crawler/issues/476
2020-06-08 18:50:45,291 [DEBUG] (urllib3.connectionpool) https://www.mtlnovel.com:443 "GET /wp-admin/admin-ajax.php?action=autosuggest&amp;q=strongest%20sword%20god HTTP/1.1" 200 None 2020-06-08 18:50:45,297 [DEBUG] (SEARCH_NOVEL) Traceback (most recent call last): File "./src/core/novel_search.py", line 22, in get_sea...
KeyError
def search_novel(self, query): query = query.lower().replace(" ", "%20") # soup = self.get_soup(search_url % query) list_url = search_url % query data = self.get_json(list_url)["items"][0]["results"] results = [] for item in data: url = item["permalink"] results.append( ...
def search_novel(self, query): query = query.lower().replace(" ", "%20") # soup = self.get_soup(search_url % query) list_url = search_url % query data = self.get_json(list_url)["items"][0]["results"] results = [] for item in data: url = self.absolute_url("https://id.mtlnovel.com/?p=%s"...
https://github.com/dipu-bd/lightnovel-crawler/issues/476
2020-06-08 18:50:45,291 [DEBUG] (urllib3.connectionpool) https://www.mtlnovel.com:443 "GET /wp-admin/admin-ajax.php?action=autosuggest&amp;q=strongest%20sword%20god HTTP/1.1" 200 None 2020-06-08 18:50:45,297 [DEBUG] (SEARCH_NOVEL) Traceback (most recent call last): File "./src/core/novel_search.py", line 22, in get_sea...
KeyError
def search_novel(self, query): query = query.lower().replace(" ", "+") soup = self.get_soup(search_url % query) results = [] if soup.get_text(strip=True) == "Sorry! No novel founded!": return results # end if for tr in soup.select("tr"): a = tr.select("td a") results.app...
def search_novel(self, query): query = query.lower().replace(" ", "+") soup = self.get_soup(search_url % query) results = [] for tr in soup.select("tr"): a = tr.select("td a") results.append( { "title": a[0].text.strip(), "url": self.absolute_...
https://github.com/dipu-bd/lightnovel-crawler/issues/476
2020-06-08 18:50:45,291 [DEBUG] (urllib3.connectionpool) https://www.mtlnovel.com:443 "GET /wp-admin/admin-ajax.php?action=autosuggest&amp;q=strongest%20sword%20god HTTP/1.1" 200 None 2020-06-08 18:50:45,297 [DEBUG] (SEARCH_NOVEL) Traceback (most recent call last): File "./src/core/novel_search.py", line 22, in get_sea...
KeyError
def read_novel_info(self): """Get novel title, autor, cover etc""" logger.debug("Visiting %s", self.novel_url) soup = self.get_soup(self.novel_url) self.novel_id = urlparse(self.novel_url).path.split("/")[1] logger.info("Novel Id: %s", self.novel_id) self.novel_title = soup.select_one(".series...
def read_novel_info(self): """Get novel title, autor, cover etc""" logger.debug("Visiting %s", self.novel_url) soup = self.get_soup(self.novel_url) self.novel_id = urlparse(self.novel_url).path.split("/")[1] logger.info("Novel Id: %s", self.novel_id) self.novel_title = soup.select_one(".series...
https://github.com/dipu-bd/lightnovel-crawler/issues/476
2020-06-08 18:50:45,291 [DEBUG] (urllib3.connectionpool) https://www.mtlnovel.com:443 "GET /wp-admin/admin-ajax.php?action=autosuggest&amp;q=strongest%20sword%20god HTTP/1.1" 200 None 2020-06-08 18:50:45,297 [DEBUG] (SEARCH_NOVEL) Traceback (most recent call last): File "./src/core/novel_search.py", line 22, in get_sea...
KeyError
def search_novel(self, query): url = search_url % quote(query.lower()) logger.debug("Visiting: %s", url) soup = self.get_soup(url) results = [] for li in soup.select(".book-list-info > ul > li"): results.append( { "title": li.select_one("a h4 b").text.strip(), ...
def search_novel(self, query): url = search_url % quote(query.lower()) logger.debug("Visiting: %s", url) soup = self.get_soup(url) results = [] for li in soup.select(".book-list-info li"): results.append( { "title": li.select_one("a h4 b").text.strip(), ...
https://github.com/dipu-bd/lightnovel-crawler/issues/476
2020-06-08 18:50:45,291 [DEBUG] (urllib3.connectionpool) https://www.mtlnovel.com:443 "GET /wp-admin/admin-ajax.php?action=autosuggest&amp;q=strongest%20sword%20god HTTP/1.1" 200 None 2020-06-08 18:50:45,297 [DEBUG] (SEARCH_NOVEL) Traceback (most recent call last): File "./src/core/novel_search.py", line 22, in get_sea...
KeyError
def search_novel(self, query): query = query.lower().replace(" ", "%20") # soup = self.get_soup(search_url % query) list_url = search_url % query data = self.get_json(list_url)["items"][0]["results"] results = [] for item in data: url = item["permalink"] results.append( ...
def search_novel(self, query): query = query.lower().replace(" ", "%20") # soup = self.get_soup(search_url % query) list_url = search_url % query data = self.get_json(list_url)["items"][0]["results"] results = [] for item in data: url = self.absolute_url("https://www.mtlnovel.com/?p=%s...
https://github.com/dipu-bd/lightnovel-crawler/issues/476
2020-06-08 18:50:45,291 [DEBUG] (urllib3.connectionpool) https://www.mtlnovel.com:443 "GET /wp-admin/admin-ajax.php?action=autosuggest&amp;q=strongest%20sword%20god HTTP/1.1" 200 None 2020-06-08 18:50:45,297 [DEBUG] (SEARCH_NOVEL) Traceback (most recent call last): File "./src/core/novel_search.py", line 22, in get_sea...
KeyError
def read_novel_info(self): # to get cookies and session info self.parse_content_css(self.home_url) # Determine cannonical novel name path_fragments = urlparse(self.novel_url).path.split("/") if path_fragments[1] == "books": self.novel_hash = path_fragments[2] else: self.novel_ha...
def read_novel_info(self): # to get cookies and session info self.parse_content_css(self.home_url) # Determine cannonical novel name path_fragments = urlparse(self.novel_url).path.split("/") if path_fragments[1] == "books": self.novel_hash = path_fragments[2] else: self.novel_ha...
https://github.com/dipu-bd/lightnovel-crawler/issues/465
Fail to get bad selectors Traceback (most recent call last): File "c:\python38\lib\site-packages\lncrawl\sources\babelnovel.py", line 125, in parse_content_css data = json.loads(unquote(content[0])) IndexError: list index out of range ! Error: 'chapterCount'
IndexError
def predict( self, x: np.ndarray, batch_size: int = 128, **kwargs ) -> Union[Tuple[np.ndarray, np.ndarray], np.ndarray]: """ Perform prediction for a batch of inputs. :param x: Samples of shape (nb_samples, seq_length). Note that, it is allowable that sequences in the batch could have dif...
def predict( self, x: np.ndarray, batch_size: int = 128, **kwargs ) -> Union[Tuple[np.ndarray, np.ndarray], np.ndarray]: """ Perform prediction for a batch of inputs. :param x: Samples of shape (nb_samples, seq_length). Note that, it is allowable that sequences in the batch could have dif...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/688
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-30-c849f56466d3> in <module> 3 4 # Generate attack ----> 5 x_adv = attack_pgd.generate(np.array([x2, x3]), y=None, batch_size=2) /opt/conda/lib/python3....
TypeError
def loss_gradient(self, x: np.ndarray, y: np.ndarray, **kwargs) -> np.ndarray: """ Compute the gradient of the loss function w.r.t. `x`. :param x: Samples of shape (nb_samples, seq_length). Note that, it is allowable that sequences in the batch could have different lengths. A possible example...
def loss_gradient(self, x: np.ndarray, y: np.ndarray, **kwargs) -> np.ndarray: """ Compute the gradient of the loss function w.r.t. `x`. :param x: Samples of shape (nb_samples, seq_length). Note that, it is allowable that sequences in the batch could have different lengths. A possible example...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/688
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-30-c849f56466d3> in <module> 3 4 # Generate attack ----> 5 x_adv = attack_pgd.generate(np.array([x2, x3]), y=None, batch_size=2) /opt/conda/lib/python3....
TypeError
def loss_gradient(self, x, y, **kwargs): """ Compute the gradient of the loss function w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param y: Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes) or indices of shape ...
def loss_gradient(self, x, y, **kwargs): """ Compute the gradient of the loss function w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param y: Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes) or indices of shape ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/355
MXNetError Traceback (most recent call last) <timed exec> in <module> ~/.pyenv/versions/3.7.6/envs/adversarialvideo/lib/python3.7/site-packages/art/attacks/attack.py in replacement_function(self, *args, **kwargs) 68 if len(args) > 0: 69 args = tuple(ls...
MXNetError
def predict(self, x, batch_size=128, raw=False, **kwargs): """ Perform prediction for a batch of inputs. Predictions from classifiers should only be aggregated if they all have the same type of output (e.g., probabilities). Otherwise, use `raw=True` to get predictions from all models without aggregation...
def predict(self, x, batch_size=128, **kwargs): """ Perform prediction for a batch of inputs. Predictions from classifiers should only be aggregated if they all have the same type of output (e.g., probabilities). Otherwise, use `raw=True` to get predictions from all models without aggregation. The same ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/214
import torch from torchvision import models from art.classifiers import PyTorchClassifier, EnsembleClassifier from art.attacks import ProjectedGradientDescent, HopSkipJump # load and preprocess imagenet images images = load_preprocess_images(...) resnet18 = models.resnet18(pretrained=True) alexnet = models.alexnet(p...
ValueError
def class_gradient(self, x, label=None, raw=False, **kwargs): """ Compute per-class derivatives w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param label: Index of a specific per-class derivative. If `None`, then gradients for all c...
def class_gradient(self, x, label=None, **kwargs): """ Compute per-class derivatives w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param label: Index of a specific per-class derivative. If `None`, then gradients for all classes will...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/214
import torch from torchvision import models from art.classifiers import PyTorchClassifier, EnsembleClassifier from art.attacks import ProjectedGradientDescent, HopSkipJump # load and preprocess imagenet images images = load_preprocess_images(...) resnet18 = models.resnet18(pretrained=True) alexnet = models.alexnet(p...
ValueError
def loss_gradient(self, x, y, raw=False, **kwargs): """ Compute the gradient of the loss function w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param y: Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes) or indices of shap...
def loss_gradient(self, x, y, **kwargs): """ Compute the gradient of the loss function w.r.t. `x`. :param x: Sample input with shape as expected by the model. :type x: `np.ndarray` :param y: Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes) or indices of shape ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/214
import torch from torchvision import models from art.classifiers import PyTorchClassifier, EnsembleClassifier from art.attacks import ProjectedGradientDescent, HopSkipJump # load and preprocess imagenet images images = load_preprocess_images(...) resnet18 = models.resnet18(pretrained=True) alexnet = models.alexnet(p...
ValueError
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param y: If `self.targeted` is true, then `y_val` represents the target labels. Otherwise, the targets are th...
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param y: If `self.targeted` is true, then `y_val` represents the target labels. Otherwise, the targets are th...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__(self, classifier, expectation=None): """ :param classifier: A trained model. :type classifier: :class:`Classifier` :param expectation: An expectation over transformations to be applied when computing classifier gradients and predictions. :type expectation: :class...
def __init__(self, classifier): """ :param classifier: A trained model. :type classifier: :class:`Classifier` """ self.classifier = classifier
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__( self, classifier, confidence=0.0, targeted=True, learning_rate=0.01, binary_search_steps=10, max_iter=10, initial_const=0.01, max_halving=5, max_doubling=5, batch_size=128, expectation=None, ): """ Create a Carlini L_2 attack instance. :param cl...
def __init__( self, classifier, confidence=0.0, targeted=True, learning_rate=0.01, binary_search_steps=10, max_iter=10, initial_const=0.01, max_halving=5, max_doubling=5, batch_size=128, ): """ Create a Carlini L_2 attack instance. :param classifier: A trained mo...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _loss(self, x, x_adv, target, c): """ Compute the objective function value. :param x: An array with the original input. :type x: `np.ndarray` :param x_adv: An array with the adversarial input. :type x_adv: `np.ndarray` :param target: An array with the target class (one-hot encoded). ...
def _loss(self, x, x_adv, target, c): """ Compute the objective function value. :param x: An array with the original input. :type x: `np.ndarray` :param x_adv: An array with the adversarial input. :type x_adv: `np.ndarray` :param target: An array with the target class (one-hot encoded). ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _loss_gradient(self, z, target, x, x_adv, x_adv_tanh, c, clip_min, clip_max): """ Compute the gradient of the loss function. :param z: An array with the current logits. :type z: `np.ndarray` :param target: An array with the target class (one-hot encoded). :type target: `np.ndarray` :par...
def _loss_gradient(self, z, target, x, x_adv, x_adv_tanh, c, clip_min, clip_max): """ Compute the gradient of the loss function. :param z: An array with the current logits. :type z: `np.ndarray` :param target: An array with the target class (one-hot encoded). :type target: `np.ndarray` :par...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param y: If `self.targeted` is true, then `y_val` represents the target labels. Otherwise, the targets are th...
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param y: If `self.targeted` is true, then `y_val` represents the target labels. Otherwise, the targets are th...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__( self, classifier, confidence=0.0, targeted=True, learning_rate=0.01, max_iter=10, max_halving=5, max_doubling=5, eps=0.3, batch_size=128, expectation=None, ): """ Create a Carlini L_Inf attack instance. :param classifier: A trained model. :type ...
def __init__( self, classifier, confidence=0.0, targeted=True, learning_rate=0.01, max_iter=10, max_halving=5, max_doubling=5, eps=0.3, batch_size=128, ): """ Create a Carlini L_Inf attack instance. :param classifier: A trained model. :type classifier: :class:`Cl...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _loss(self, x_adv, target): """ Compute the objective function value. :param x_adv: An array with the adversarial input. :type x_adv: `np.ndarray` :param target: An array with the target class (one-hot encoded). :type target: `np.ndarray` :return: A tuple holding the current logits and ...
def _loss(self, x_adv, target): """ Compute the objective function value. :param x_adv: An array with the adversarial input. :type x_adv: `np.ndarray` :param target: An array with the target class (one-hot encoded). :type target: `np.ndarray` :return: A tuple holding the current logits and ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def _loss_gradient(self, z, target, x_adv, x_adv_tanh, clip_min, clip_max): """ Compute the gradient of the loss function. :param z: An array with the current logits. :type z: `np.ndarray` :param target: An array with the target class (one-hot encoded). :type target: `np.ndarray` :param x_a...
def _loss_gradient(self, z, target, x_adv, x_adv_tanh, clip_min, clip_max): """ Compute the gradient of the loss function. :param z: An array with the current logits. :type z: `np.ndarray` :param target: An array with the target class (one-hot encoded). :type target: `np.ndarray` :param x_a...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param y: If `self.targeted` is true, then `y_val` represents the target labels. Otherwise, the targets are ...
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param y: If `self.targeted` is true, then `y_val` represents the target labels. Otherwise, the targets are ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def __init__( self, classifier, max_iter=100, epsilon=1e-6, nb_grads=10, batch_size=128, expectation=None, ): """ Create a DeepFool attack instance. :param classifier: A trained model. :type classifier: :class:`Classifier` :param max_iter: The maximum number of iteration...
def __init__(self, classifier, max_iter=100, epsilon=1e-6): """ Create a DeepFool attack instance. :param classifier: A trained model. :type classifier: :class:`Classifier` :param max_iter: The maximum number of iterations. :type max_iter: `int` :param epsilon: Overshoot parameter. :typ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param max_iter: The maximum number of iterations. :type max_iter: `int` :param epsilon: Overshoot parameter. ...
def generate(self, x, **kwargs): """ Generate adversarial samples and return them in an array. :param x: An array with the original inputs to be attacked. :type x: `np.ndarray` :param max_iter: The maximum number of iterations. :type max_iter: `int` :param epsilon: Overshoot parameter. ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError
def set_params(self, **kwargs): """ Take in a dictionary of parameters and applies attack-specific checks before saving them as attributes. :param max_iter: The maximum number of iterations. :type max_iter: `int` :param epsilon: Overshoot parameter. :type epsilon: `float` :param nb_grads: T...
def set_params(self, **kwargs): """Take in a dictionary of parameters and applies attack-specific checks before saving them as attributes. :param max_iter: The maximum number of iterations. :type max_iter: `int` """ # Save attack-specific parameters super(DeepFool, self).set_params(**kwargs) ...
https://github.com/Trusted-AI/adversarial-robustness-toolbox/issues/29
Traceback (most recent call last): File "cw_pytorch.py", line 172, in <module> x_test_adv = cl2m.generate(inputs, **params) File "/home/weitian/anaconda3/envs/xnor/lib/python3.6/site-packages/art/attacks/carlini.py", line 380, in generate x_adv_batch_tanh[active_and_update_adv] = x_adv_batch_tanh[update_adv] + \ IndexE...
IndexError