jupytermind 0.3.0

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.
Files changed (193) hide show
  1. package/.github/skills/ai-chemistry-scientist/SKILL.md +97 -0
  2. package/.github/skills/ai-chemistry-scientist/manifest.json +156 -0
  3. package/.github/skills/ai-data-scientist/SKILL.md +330 -0
  4. package/.github/skills/ai-genomics-scientist/SKILL.md +98 -0
  5. package/.github/skills/ai-genomics-scientist/manifest.json +93 -0
  6. package/.github/skills/ai-materials-scientist/SKILL.md +51 -0
  7. package/.github/skills/ai-materials-scientist/manifest.json +58 -0
  8. package/.github/skills/ai-scientist/SKILL.md +69 -0
  9. package/.github/skills/ai-scientist/manifest.json +61 -0
  10. package/.github/skills/ai-structural-biology-scientist/SKILL.md +67 -0
  11. package/.github/skills/ai-structural-biology-scientist/manifest.json +72 -0
  12. package/.github/skills/japanese-prose/NOTICE.md +17 -0
  13. package/.github/skills/japanese-prose/SKILL.md +111 -0
  14. package/.github/skills/japanese-prose/references/review-workflow.md +50 -0
  15. package/.github/skills/japanese-prose/references/scoring.md +24 -0
  16. package/.github/skills/japanese-prose/references/writing-guidelines.md +60 -0
  17. package/.github/skills/japanese-prose/scripts/core.py +192 -0
  18. package/.github/skills/japanese-prose/scripts/fixtures/natural.md +5 -0
  19. package/.github/skills/japanese-prose/scripts/fixtures/unnatural.md +5 -0
  20. package/.github/skills/japanese-prose/scripts/lint.py +378 -0
  21. package/.github/skills/japanese-prose/scripts/outline.py +68 -0
  22. package/.github/skills/japanese-prose/scripts/terms.py +112 -0
  23. package/.github/skills/japanese-prose/scripts/test_engine.py +117 -0
  24. package/.github/skills/presentation-planner/SKILL.md +257 -0
  25. package/.github/skills/presentation-planner/assets/design-templates/data-report.yaml +97 -0
  26. package/.github/skills/presentation-planner/assets/design-templates/executive-proposal.yaml +92 -0
  27. package/.github/skills/presentation-planner/assets/design-templates/technical-briefing.yaml +96 -0
  28. package/.github/skills/presentation-planner/assets/scenario-templates/data-report.md +47 -0
  29. package/.github/skills/presentation-planner/assets/scenario-templates/executive-decision.md +43 -0
  30. package/.github/skills/presentation-planner/assets/scenario-templates/technical-briefing.md +45 -0
  31. package/.github/skills/presentation-planner/references/customizing-design-templates.md +160 -0
  32. package/.github/skills/presentation-planner/references/design-spec-schema.md +72 -0
  33. package/.github/skills/presentation-planner/references/handoff-contract.md +49 -0
  34. package/.github/skills/presentation-planner/references/responsibility-boundary.md +32 -0
  35. package/.github/skills/presentation-planner/references/scenario-templates.md +55 -0
  36. package/.github/skills/tech-writer/SKILL.md +434 -0
  37. package/.github/skills/tech-writer/assets/templates/blueprint.md +187 -0
  38. package/.github/skills/tech-writer/assets/templates/design-doc.md +29 -0
  39. package/.github/skills/tech-writer/assets/templates/migration-plan.md +173 -0
  40. package/.github/skills/tech-writer/assets/templates/operations-runbook.md +202 -0
  41. package/.github/skills/tech-writer/assets/templates/pr-description.md +23 -0
  42. package/.github/skills/tech-writer/assets/templates/qiita.md +44 -0
  43. package/.github/skills/tech-writer/assets/templates/readme.md +38 -0
  44. package/.github/skills/tech-writer/assets/templates/requirements-definition.md +170 -0
  45. package/.github/skills/tech-writer/assets/templates/rfi.md +113 -0
  46. package/.github/skills/tech-writer/assets/templates/rfp.md +180 -0
  47. package/.github/skills/tech-writer/assets/templates/security-design.md +167 -0
  48. package/.github/skills/tech-writer/assets/templates/system-design.md +220 -0
  49. package/.github/skills/tech-writer/assets/templates/technical-proposal.md +112 -0
  50. package/.github/skills/tech-writer/assets/templates/test-plan.md +153 -0
  51. package/.github/skills/tech-writer/assets/templates/user-manual.md +22 -0
  52. package/.github/skills/tech-writer/assets/templates/white-paper.md +192 -0
  53. package/.github/skills/tech-writer/references/doctypes/api-docs.md +33 -0
  54. package/.github/skills/tech-writer/references/doctypes/blueprint.md +81 -0
  55. package/.github/skills/tech-writer/references/doctypes/code-comments.md +39 -0
  56. package/.github/skills/tech-writer/references/doctypes/design-doc.md +42 -0
  57. package/.github/skills/tech-writer/references/doctypes/migration-plan.md +63 -0
  58. package/.github/skills/tech-writer/references/doctypes/operations-runbook.md +63 -0
  59. package/.github/skills/tech-writer/references/doctypes/pr-commit.md +82 -0
  60. package/.github/skills/tech-writer/references/doctypes/qiita.md +75 -0
  61. package/.github/skills/tech-writer/references/doctypes/readme.md +43 -0
  62. package/.github/skills/tech-writer/references/doctypes/release-notes.md +30 -0
  63. package/.github/skills/tech-writer/references/doctypes/requirements-definition.md +61 -0
  64. package/.github/skills/tech-writer/references/doctypes/rfi.md +43 -0
  65. package/.github/skills/tech-writer/references/doctypes/rfp.md +46 -0
  66. package/.github/skills/tech-writer/references/doctypes/security-design.md +71 -0
  67. package/.github/skills/tech-writer/references/doctypes/system-design.md +74 -0
  68. package/.github/skills/tech-writer/references/doctypes/technical-proposal.md +49 -0
  69. package/.github/skills/tech-writer/references/doctypes/test-plan.md +67 -0
  70. package/.github/skills/tech-writer/references/doctypes/user-manual.md +58 -0
  71. package/.github/skills/tech-writer/references/doctypes/white-paper.md +84 -0
  72. package/.github/skills/tech-writer/references/doctypes/zenn.md +66 -0
  73. package/.github/skills/tech-writer/references/japanese-prose-optimization.md +110 -0
  74. package/.github/skills/tech-writer/references/style-constitution.md +104 -0
  75. package/.github/skills/tech-writer/scripts/lint.py +412 -0
  76. package/LICENSE +21 -0
  77. package/README.md +92 -0
  78. package/bin/ai-data-scientist.js +123 -0
  79. package/package.json +41 -0
  80. package/pyproject.toml +45 -0
  81. package/src/ai_chemistry_scientist/__init__.py +0 -0
  82. package/src/ai_chemistry_scientist/admet_prediction.py +71 -0
  83. package/src/ai_chemistry_scientist/bioactivity_classification.py +73 -0
  84. package/src/ai_chemistry_scientist/data/sample_molecules.csv +21 -0
  85. package/src/ai_chemistry_scientist/dispatch.py +369 -0
  86. package/src/ai_chemistry_scientist/docking_score.py +97 -0
  87. package/src/ai_chemistry_scientist/drug_likeness_rules.py +84 -0
  88. package/src/ai_chemistry_scientist/evidence.py +41 -0
  89. package/src/ai_chemistry_scientist/molecular_descriptors.py +97 -0
  90. package/src/ai_chemistry_scientist/molecular_formula_mass.py +40 -0
  91. package/src/ai_chemistry_scientist/molecular_similarity.py +78 -0
  92. package/src/ai_chemistry_scientist/qsar_modeling.py +105 -0
  93. package/src/ai_chemistry_scientist/salt_standardization.py +81 -0
  94. package/src/ai_chemistry_scientist/structural_alerts.py +76 -0
  95. package/src/ai_chemistry_scientist/structure_format_conversion.py +84 -0
  96. package/src/ai_chemistry_scientist/validation.py +70 -0
  97. package/src/ai_data_scientist/__init__.py +0 -0
  98. package/src/ai_data_scientist/analysis_assumptions.py +121 -0
  99. package/src/ai_data_scientist/anomaly_detection.py +39 -0
  100. package/src/ai_data_scientist/automl.py +109 -0
  101. package/src/ai_data_scientist/cleaning.py +56 -0
  102. package/src/ai_data_scientist/cli.py +90 -0
  103. package/src/ai_data_scientist/clustering.py +54 -0
  104. package/src/ai_data_scientist/dashboard.py +33 -0
  105. package/src/ai_data_scientist/data_definition.py +100 -0
  106. package/src/ai_data_scientist/data_quality.py +164 -0
  107. package/src/ai_data_scientist/dataset_validation.py +135 -0
  108. package/src/ai_data_scientist/dependency_pins.py +60 -0
  109. package/src/ai_data_scientist/eda.py +82 -0
  110. package/src/ai_data_scientist/experiment_evaluation.py +635 -0
  111. package/src/ai_data_scientist/explainability.py +340 -0
  112. package/src/ai_data_scientist/feature_engineering.py +163 -0
  113. package/src/ai_data_scientist/gate_config.py +32 -0
  114. package/src/ai_data_scientist/ingestion.py +127 -0
  115. package/src/ai_data_scientist/insight_engine.py +180 -0
  116. package/src/ai_data_scientist/japanese_nlp.py +43 -0
  117. package/src/ai_data_scientist/jupyter_launcher.py +137 -0
  118. package/src/ai_data_scientist/jupyter_mcp_client.py +94 -0
  119. package/src/ai_data_scientist/language_router.py +28 -0
  120. package/src/ai_data_scientist/lifecycle.py +221 -0
  121. package/src/ai_data_scientist/mcp_gateway.py +113 -0
  122. package/src/ai_data_scientist/mcp_runtime.py +194 -0
  123. package/src/ai_data_scientist/mcp_transport.py +53 -0
  124. package/src/ai_data_scientist/ml_modeling.py +451 -0
  125. package/src/ai_data_scientist/model_tuning.py +104 -0
  126. package/src/ai_data_scientist/notebook_audit.py +574 -0
  127. package/src/ai_data_scientist/project_manager.py +243 -0
  128. package/src/ai_data_scientist/report_export.py +73 -0
  129. package/src/ai_data_scientist/sensitivity.py +445 -0
  130. package/src/ai_data_scientist/signal_analysis.py +201 -0
  131. package/src/ai_data_scientist/skill_packaging.py +40 -0
  132. package/src/ai_data_scientist/stats_analysis.py +88 -0
  133. package/src/ai_data_scientist/text_nlp.py +44 -0
  134. package/src/ai_data_scientist/timeseries.py +68 -0
  135. package/src/ai_data_scientist/visualization.py +708 -0
  136. package/src/ai_genomics_scientist/__init__.py +1 -0
  137. package/src/ai_genomics_scientist/differential_expression.py +147 -0
  138. package/src/ai_genomics_scientist/dispatch.py +267 -0
  139. package/src/ai_genomics_scientist/evidence.py +45 -0
  140. package/src/ai_genomics_scientist/gene_set_enrichment.py +76 -0
  141. package/src/ai_genomics_scientist/sequence_alignment.py +97 -0
  142. package/src/ai_genomics_scientist/sequence_features.py +111 -0
  143. package/src/ai_genomics_scientist/splice_site_scoring.py +66 -0
  144. package/src/ai_genomics_scientist/validation.py +83 -0
  145. package/src/ai_genomics_scientist/variant_effect.py +147 -0
  146. package/src/ai_genomics_scientist/variant_pathogenicity.py +125 -0
  147. package/src/ai_materials_scientist/__init__.py +0 -0
  148. package/src/ai_materials_scientist/calphad.py +117 -0
  149. package/src/ai_materials_scientist/classical_monte_carlo.py +165 -0
  150. package/src/ai_materials_scientist/crystal_plasticity.py +184 -0
  151. package/src/ai_materials_scientist/dispatch.py +100 -0
  152. package/src/ai_materials_scientist/evidence.py +84 -0
  153. package/src/ai_materials_scientist/fem.py +279 -0
  154. package/src/ai_materials_scientist/kinetic_monte_carlo.py +145 -0
  155. package/src/ai_materials_scientist/molecular_dynamics.py +240 -0
  156. package/src/ai_materials_scientist/phase_field.py +167 -0
  157. package/src/ai_materials_scientist/validation.py +70 -0
  158. package/src/ai_scientist/__init__.py +1 -0
  159. package/src/ai_scientist/completion_gate.py +15 -0
  160. package/src/ai_scientist/data_analysis.py +46 -0
  161. package/src/ai_scientist/evidence_registry.py +99 -0
  162. package/src/ai_scientist/experimental_design.py +20 -0
  163. package/src/ai_scientist/language.py +14 -0
  164. package/src/ai_scientist/latex_renderer.py +41 -0
  165. package/src/ai_scientist/literature_review.py +37 -0
  166. package/src/ai_scientist/manifest.py +87 -0
  167. package/src/ai_scientist/manuscript.py +94 -0
  168. package/src/ai_scientist/mcp_config.py +76 -0
  169. package/src/ai_scientist/mcp_external.py +42 -0
  170. package/src/ai_scientist/mcp_failures.py +23 -0
  171. package/src/ai_scientist/mcp_gateway.py +38 -0
  172. package/src/ai_scientist/mcp_managed.py +180 -0
  173. package/src/ai_scientist/npm_packaging.py +49 -0
  174. package/src/ai_scientist/orchestrator.py +133 -0
  175. package/src/ai_scientist/peer_review.py +60 -0
  176. package/src/ai_scientist/phase_gate.py +74 -0
  177. package/src/ai_scientist/phase_state.py +230 -0
  178. package/src/ai_scientist/presentation.py +56 -0
  179. package/src/ai_scientist/project_config.py +31 -0
  180. package/src/ai_scientist/project_handle.py +74 -0
  181. package/src/ai_scientist/reproducibility.py +20 -0
  182. package/src/ai_scientist/research_planning.py +20 -0
  183. package/src/ai_scientist/skill_invocation.py +21 -0
  184. package/src/ai_scientist/tdd_gate.py +99 -0
  185. package/src/ai_structural_biology_scientist/__init__.py +0 -0
  186. package/src/ai_structural_biology_scientist/contact_map.py +87 -0
  187. package/src/ai_structural_biology_scientist/dispatch.py +269 -0
  188. package/src/ai_structural_biology_scientist/evidence.py +43 -0
  189. package/src/ai_structural_biology_scientist/hydrophobicity.py +101 -0
  190. package/src/ai_structural_biology_scientist/protein_docking_score.py +104 -0
  191. package/src/ai_structural_biology_scientist/secondary_structure.py +95 -0
  192. package/src/ai_structural_biology_scientist/structural_similarity.py +74 -0
  193. package/src/ai_structural_biology_scientist/validation.py +100 -0
@@ -0,0 +1,88 @@
1
+ """Statistical analysis.
2
+
3
+ Implements DES-AIDS-008 (REQ-AIDS-006): correlation/statistical tests
4
+ reported alongside a natural-language interpretation in the requested
5
+ response language.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import math
11
+ from dataclasses import dataclass
12
+
13
+ import pandas as pd
14
+ from scipy import stats as scipy_stats
15
+
16
+
17
+ @dataclass(frozen=True)
18
+ class StatResult:
19
+ statistic: float
20
+ p_value: float
21
+ interpretation: str
22
+
23
+
24
+ def p_display(p_value: float) -> str:
25
+ """Format ``p_value`` for display, bounding near-zero values (DES-AIDS-053).
26
+
27
+ Change: CHANGE-004 (REQ-AIDS-065).
28
+ """
29
+ if p_value < 1e-4:
30
+ return "p < 1e-4"
31
+ return f"p={p_value:.4g}"
32
+
33
+
34
+ # @id CODE-AIDS-087
35
+ # @implements REQ-AIDS-067
36
+ # @design DES-AIDS-055
37
+ def _interpret(
38
+ r: float,
39
+ p_value: float,
40
+ language: str,
41
+ significance_threshold: float = 0.05,
42
+ ) -> str:
43
+ if math.isnan(r) or math.isnan(p_value):
44
+ if language == "ja":
45
+ return "相関係数を算出できません(統計量がNaNです)。欠損値を確認してください。"
46
+ return (
47
+ "The correlation could not be computed (the statistic is NaN); "
48
+ "check the input columns for missing values."
49
+ )
50
+ p_text = p_display(p_value)
51
+ if p_value >= significance_threshold:
52
+ if language == "ja":
53
+ return f"相関係数は {r:.4f} ({p_text}) で、統計的に明確な相関は見られません。"
54
+ return (
55
+ f"The correlation coefficient is {r:.4f} ({p_text}), and no "
56
+ "statistically clear correlation is observed."
57
+ )
58
+ strength = "strong" if abs(r) >= 0.7 else "moderate" if abs(r) >= 0.3 else "weak"
59
+ direction = "positive" if r >= 0 else "negative"
60
+ if language == "ja":
61
+ strength_ja = {"strong": "強い", "moderate": "中程度の", "weak": "弱い"}[strength]
62
+ direction_ja = "正" if r >= 0 else "負"
63
+ return f"相関係数は {r:.4f} ({p_text}) で、{strength_ja}{direction_ja}の相関が見られます。"
64
+ return (
65
+ f"The correlation coefficient is {r:.4f} ({p_text}), indicating a "
66
+ f"{strength} {direction} correlation."
67
+ )
68
+
69
+
70
+ # @id CODE-AIDS-006
71
+ # @implements REQ-AIDS-006 REQ-AIDS-063 REQ-AIDS-065
72
+ # @design DES-AIDS-008 DES-AIDS-051 DES-AIDS-053
73
+ def correlation(
74
+ df: pd.DataFrame,
75
+ col_a: str,
76
+ col_b: str,
77
+ language: str = "en",
78
+ significance_threshold: float = 0.05,
79
+ ) -> StatResult:
80
+ """Compute the Pearson correlation between two columns of ``df``."""
81
+ if not 0.0 <= significance_threshold <= 1.0:
82
+ raise ValueError("significance_threshold must be within [0.0, 1.0].")
83
+ r, p_value = scipy_stats.pearsonr(df[col_a], df[col_b])
84
+ return StatResult(
85
+ statistic=float(r),
86
+ p_value=float(p_value),
87
+ interpretation=_interpret(float(r), float(p_value), language, significance_threshold),
88
+ )
@@ -0,0 +1,44 @@
1
+ """Non-Japanese text analysis (e.g. sentiment).
2
+
3
+ Implements DES-AIDS-022 (REQ-AIDS-026): runs a configured non-Japanese NLP
4
+ pipeline on text to perform the requested operation and reports the
5
+ result.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from dataclasses import dataclass
11
+
12
+ from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
13
+
14
+ _SUPPORTED_OPERATIONS = ("sentiment",)
15
+ _analyzer = SentimentIntensityAnalyzer()
16
+
17
+
18
+ def _label(compound: float) -> str:
19
+ if compound >= 0.05:
20
+ return "positive"
21
+ if compound <= -0.05:
22
+ return "negative"
23
+ return "neutral"
24
+
25
+
26
+ @dataclass(frozen=True)
27
+ class NLPResult:
28
+ scores: dict
29
+ labels: list
30
+
31
+
32
+ # @id CODE-AIDS-026
33
+ # @implements REQ-AIDS-026
34
+ # @design DES-AIDS-022
35
+ def analyze_text(texts: list, operation: str = "sentiment", language: str = "en") -> NLPResult:
36
+ """Run ``operation`` (e.g. sentiment analysis) over ``texts``."""
37
+ if operation not in _SUPPORTED_OPERATIONS:
38
+ raise ValueError(f"Unsupported NLP operation: {operation!r}")
39
+
40
+ scored = [_analyzer.polarity_scores(text) for text in texts]
41
+ labels = [_label(score["compound"]) for score in scored]
42
+ scores = {"compound": [score["compound"] for score in scored]}
43
+
44
+ return NLPResult(scores=scores, labels=labels)
@@ -0,0 +1,68 @@
1
+ """Time series analysis and forecasting.
2
+
3
+ Implements DES-AIDS-016 (REQ-AIDS-018): decomposes or forecasts a requested
4
+ time series and reports trend, seasonality, or forecast values.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from dataclasses import dataclass
10
+
11
+ import pandas as pd
12
+ from statsmodels.tsa.holtwinters import ExponentialSmoothing
13
+ from statsmodels.tsa.seasonal import seasonal_decompose
14
+
15
+ _SUPPORTED_OPERATIONS = ("decompose", "forecast")
16
+
17
+
18
+ @dataclass(frozen=True)
19
+ class TimeSeriesResult:
20
+ trend: object
21
+ seasonality: object
22
+ forecast: object
23
+
24
+
25
+ # @id CODE-AIDS-018
26
+ # @implements REQ-AIDS-018
27
+ # @design DES-AIDS-016
28
+ def analyze_time_series(
29
+ series: pd.Series,
30
+ operation: str = "decompose",
31
+ params: dict | None = None,
32
+ ) -> TimeSeriesResult:
33
+ """Decompose or forecast ``series`` according to ``operation``."""
34
+ if operation not in _SUPPORTED_OPERATIONS:
35
+ raise ValueError(f"Unsupported time series operation: {operation!r}")
36
+ params = dict(params or {})
37
+
38
+ if operation == "decompose":
39
+ period = params.get("period")
40
+ decomposition = seasonal_decompose(
41
+ series, model=params.get("model", "additive"), period=period
42
+ )
43
+ return TimeSeriesResult(
44
+ trend=decomposition.trend,
45
+ seasonality=decomposition.seasonal,
46
+ forecast=None,
47
+ )
48
+
49
+ # forecast
50
+ seasonal = params.get("seasonal")
51
+ seasonal_periods = params.get("seasonal_periods")
52
+ if seasonal is not None and seasonal_periods:
53
+ min_required = 2 * seasonal_periods
54
+ if len(series) < min_required:
55
+ raise ValueError(
56
+ f"Forecasting with seasonal_periods={seasonal_periods} requires "
57
+ f"at least {min_required} observations (2 x seasonal_periods); "
58
+ f"got {len(series)}."
59
+ )
60
+ model = ExponentialSmoothing(
61
+ series,
62
+ trend=params.get("trend", "add"),
63
+ seasonal=seasonal,
64
+ seasonal_periods=seasonal_periods,
65
+ ).fit()
66
+ steps = params.get("steps", 1)
67
+ forecast = model.forecast(steps)
68
+ return TimeSeriesResult(trend=None, seasonality=None, forecast=forecast)