Skip to content

Commit

Permalink
0.6.3 a37
Browse files Browse the repository at this point in the history
  • Loading branch information
winedarksea committed Nov 26, 2023
1 parent fdf6cb9 commit 3ca0453
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
41 changes: 24 additions & 17 deletions autots/models/cassandra.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def fit(
self.x_array = x_array # can remove this later, it is for debugging
if np.any(np.isnan(x_array.astype(float))): # remove later, for debugging
nulz = x_array.isnull().sum()
if self.verbose > 1:
if self.verbose > 2:
print(
f"the following columns contain nan values: {nulz[nulz > 0].index.tolist()}"
)
Expand All @@ -554,7 +554,7 @@ def fit(
corr = np.corrcoef(x_array, rowvar=0)
nearz = x_array.columns[np.isnan(corr).all(axis=1)]
if len(nearz) > 0:
if self.verbose > 1:
if self.verbose > 2:
print(f"Dropping zero variance feature columns {nearz}")
x_array = x_array.drop(columns=nearz)
# remove colinear features
Expand All @@ -567,13 +567,13 @@ def fit(
np.min(corr * np.tri(corr.shape[0]), axis=0) > self.max_colinearity
]
if len(corel) > 0:
if self.verbose > 1:
if self.verbose > 2:
print(f"Dropping colinear feature columns {corel}")
x_array = x_array.drop(columns=corel)
if self.max_multicolinearity is not None:
colin = x_array.columns[w < self.max_multicolinearity]
if len(colin) > 0:
if self.verbose > 1:
if self.verbose > 2:
print(f"Dropping multi-colinear feature columns {colin}")
x_array = x_array.drop(columns=colin)

Expand Down Expand Up @@ -951,7 +951,7 @@ def _predict_linear(
self.predict_x_array = x_array # can remove this later, it is for debugging
if np.any(np.isnan(x_array.astype(float))): # remove later, for debugging
nulz = x_array.isnull().sum()
if self.verbose > 1:
if self.verbose > 2:
print(
f"the following columns contain nan values: {nulz[nulz > 0].index.tolist()}"
)
Expand Down Expand Up @@ -1874,6 +1874,8 @@ def get_new_params(self, method='fast'):
k=1,
)[0]
trend_model = {'Model': model_str}
if model_str in ['WindowRegression', 'MultivariateRegression']:
method = "no_gpu"
trend_model['ModelParameters'] = ModelMonster(model_str).get_new_params(
method=method
)
Expand Down Expand Up @@ -1972,18 +1974,23 @@ def get_new_params(self, method='fast'):
trend_anomaly_detector_params = AnomalyRemoval.get_new_params(method=method)
else:
trend_anomaly_detector_params = None
linear_model = random.choices(
[
'lstsq',
'linalg_solve',
'l1_norm',
'dwae_norm',
'quantile_norm',
'l1_positive',
'bayesian_linear',
], # the minimize based norms get slow and memory hungry at scale
[0.9, 0.2, 0.01, 0.01, 0.005, 0.01, 0.05],
)[0]
if method == 'deep':
linear_model = random.choices(
[
'lstsq',
'linalg_solve',
'l1_norm',
'dwae_norm',
'quantile_norm',
'l1_positive',
'bayesian_linear',
], # the minimize based norms get slow and memory hungry at scale
[0.9, 0.2, 0.01, 0.01, 0.005, 0.01, 0.05],
)[0]
else:
linear_model = random.choices(
['lstsq', 'linalg_solve', 'bayesian_linear',], [0.8, 0.15, 0.05]
)[0]
recency_weighting = random.choices(
[None, 0.05, 0.1, 0.25, 0.5], [0.7, 0.1, 0.1, 0.1, 0.05]
)[0]
Expand Down
1 change: 1 addition & 0 deletions autots/models/model_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
"KalmanStateSpace",
"MultivariateMotif",
'Theta',
"VECM",
# "BallTreeMultivariateMotif", # might need sample_fraction tuning
# "WindowRegression" # same base shaping as BallTreeMM
]
Expand Down
3 changes: 2 additions & 1 deletion autots/models/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ def retrieve_classifier(
'Transformer': 0.02, # slow
'ExtraTrees': 0.07,
'RadiusNeighbors': 0.05,
'MultioutputGPR': 0.001,
'MultioutputGPR': 0.0001,
}
gpu = ['Transformer', 'KerasRNN']
gradient_boosting = {
Expand Down Expand Up @@ -777,6 +777,7 @@ def generate_regressor_params(
model_dict = {method: sklearn_model_dict[method]}
elif model_dict is None:
model_dict = sklearn_model_dict
# used in Cassandra
if method == "no_gpu":
model_dict = {x: y for (x, y) in model_dict.items() if x not in gpu}
model_list = list(model_dict.keys())
Expand Down

0 comments on commit 3ca0453

Please sign in to comment.