virgo-modules 0.3.0__tar.gz → 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of virgo-modules might be problematic. Click here for more details.

Files changed (23) hide show
  1. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/PKG-INFO +1 -1
  2. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/setup.py +1 -1
  3. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/src/edge_utils/shap_utils.py +7 -5
  4. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules.egg-info/PKG-INFO +1 -1
  5. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/LICENSE +0 -0
  6. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/README.md +0 -0
  7. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/setup.cfg +0 -0
  8. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/__init__.py +0 -0
  9. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/src/__init__.py +0 -0
  10. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/src/aws_utils.py +0 -0
  11. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/src/backtester.py +0 -0
  12. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/src/edge_utils/__init__.py +0 -0
  13. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/src/edge_utils/conformal_utils.py +0 -0
  14. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/src/edge_utils/edge_utils.py +0 -0
  15. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/src/hmm_utils.py +0 -0
  16. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/src/pull_artifacts.py +0 -0
  17. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/src/re_utils.py +0 -0
  18. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/src/ticketer_source.py +0 -0
  19. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules/src/transformer_utils.py +0 -0
  20. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules.egg-info/SOURCES.txt +0 -0
  21. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules.egg-info/dependency_links.txt +0 -0
  22. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules.egg-info/requires.txt +0 -0
  23. {virgo_modules-0.3.0 → virgo_modules-0.3.1}/virgo_app/virgo_modules.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: virgo_modules
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: data processing and statistical modeling using stock market data
5
5
  Home-page: https://github.com/miguelmayhem92/virgo_module
6
6
  Author: Miguel Mayhuire
@@ -5,7 +5,7 @@ with open("virgo_app/README.md", "r") as f:
5
5
 
6
6
  setup(
7
7
  name="virgo_modules",
8
- version="0.3.0",
8
+ version="0.3.1",
9
9
  description="data processing and statistical modeling using stock market data",
10
10
  package_dir={"": "virgo_app"},
11
11
  packages=find_packages(where="virgo_app"),
@@ -44,7 +44,7 @@ def get_explainerclusters(model, data, targets):
44
44
  clustermodels.append(cluster_model)
45
45
  return clustermodels
46
46
 
47
- def mean_shap(data, explainers, pipe_transform):
47
+ def mean_shap(data, explainers, pipe_transform, dict_shap_values):
48
48
  t_data = pipe_transform.transform(data)
49
49
  input_features = t_data.columns
50
50
  shap_results = get_shapvalues(explainers,t_data)
@@ -55,16 +55,18 @@ def mean_shap(data, explainers, pipe_transform):
55
55
  df_shap = pd.DataFrame(shap_results_mean, columns=input_features, index=data.index)
56
56
  df_shap['Close'] = data['Close']
57
57
  df_shap['Date'] = data['Date']
58
+ df_shap = df_shap[['Date','Close']+list(dict_shap_values.keys())]
59
+ df_shap = df_shap.rename(columns =dict_shap_values)
58
60
  return df_shap
59
61
 
60
- def edge_shap_lines(data, dict_shap_values, plot = False, look_back = 750):
62
+ def edge_shap_lines(data, plot = False, look_back = 750):
61
63
  ### corect labels ####
64
+ shap_cols = [col for col in data.columns if col not in ['Date','Close']]
62
65
  df = data.sort_values('Date').iloc[-look_back:]
63
66
  fig = make_subplots(specs=[[{"secondary_y": True}]])
64
67
  fig.add_trace(go.Scatter(x=df.Date, y=df.Close,mode='lines+markers',marker = dict(color = 'grey'),line = dict(color = 'grey'),name='Close price'))
65
- top_features_shap = dict_shap_values.keys()
66
- for col in top_features_shap:
67
- fig.add_trace(go.Scatter(x=df.Date, y=df[col],mode='lines+markers',name=dict_shap_values.get(col).get('tag')),secondary_y=True)
68
+ for col in shap_cols:
69
+ fig.add_trace(go.Scatter(x=df.Date, y=df[col],mode='lines+markers',name=col),secondary_y=True)
68
70
  fig.update_layout(title_text="sirius - feature power",width=1200,height = 500)
69
71
  if plot:
70
72
  fig.show()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: virgo-modules
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: data processing and statistical modeling using stock market data
5
5
  Home-page: https://github.com/miguelmayhem92/virgo_module
6
6
  Author: Miguel Mayhuire
File without changes
File without changes
File without changes