devjas1 commited on
Commit
68f2a01
·
1 Parent(s): 50c7ef1

FEAT(transparent_ai): refine hypothesis generation by removing unused spectral data parameter

Browse files
Files changed (1) hide show
  1. modules/transparent_ai.py +3 -3
modules/transparent_ai.py CHANGED
@@ -120,7 +120,7 @@ class FeatureImportanceAnalyzer:
120
  # Initialize SHAP explainer for the model
121
  if SHAP_AVAILABLE:
122
  if SHAP_AVAILABLE:
123
- self.shap_explainer = shap.DeepExplainer(
124
  model, torch.zeros(1, 500)
125
  )
126
  else:
@@ -241,7 +241,7 @@ class HypothesisGenerator:
241
  ]
242
 
243
  def generate_hypotheses(
244
- self, explanation: PredictionExplanation, spectral_data: Dict[str, Any]
245
  ) -> List[Hypothesis]:
246
  """Generate testable hypotheses based on model predictions and explanations"""
247
  hypotheses = []
@@ -420,7 +420,7 @@ class TransparentAIEngine:
420
  self, explanation: PredictionExplanation
421
  ) -> List[Hypothesis]:
422
  """Generate scientific hypotheses based on prediction explanation"""
423
- return self.hypothesis_generator.generate_hypotheses(explanation, {})
424
 
425
  def _generate_reasoning_chain(
426
  self,
 
120
  # Initialize SHAP explainer for the model
121
  if SHAP_AVAILABLE:
122
  if SHAP_AVAILABLE:
123
+ self.shap_explainer = shap.DeepExplainer( # type: ignore
124
  model, torch.zeros(1, 500)
125
  )
126
  else:
 
241
  ]
242
 
243
  def generate_hypotheses(
244
+ self, explanation: PredictionExplanation
245
  ) -> List[Hypothesis]:
246
  """Generate testable hypotheses based on model predictions and explanations"""
247
  hypotheses = []
 
420
  self, explanation: PredictionExplanation
421
  ) -> List[Hypothesis]:
422
  """Generate scientific hypotheses based on prediction explanation"""
423
+ return self.hypothesis_generator.generate_hypotheses(explanation)
424
 
425
  def _generate_reasoning_chain(
426
  self,