• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mmschlk / shapiq / 18697371034

21 Oct 2025 08:54PM UTC coverage: 92.858% (+0.06%) from 92.799%
18697371034

Pull #431

github

web-flow
Merge 435a34452 into ac5614648
Pull Request #431: Product kernel explainer

186 of 210 new or added lines in 13 files covered. (88.57%)

22 existing lines in 5 files now uncovered.

5214 of 5615 relevant lines covered (92.86%)

0.93 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.86
/src/shapiq/explainer/product_kernel/base.py
1
"""The base class for product kernel model conversion."""
2

3
from __future__ import annotations
1✔
4

5
from dataclasses import dataclass
1✔
6
from typing import TYPE_CHECKING
1✔
7

8
if TYPE_CHECKING:
1✔
NEW
9
    import numpy as np
×
10

11

12
@dataclass
1✔
13
class ProductKernelModel:
1✔
14
    """A dataclass for storing the information of a product kernel model.
15

16
    Attributes:
17
         alpha: The alpha parameter of the product kernel model.
18
         X_train: The training data used to fit the product kernel model.
19
         n: The number of samples in the training data.
20
         d: The number of features in the training data.
21
         gamma: The gamma parameter of the product kernel model.
22
        intercept: The intercept term of the product kernel model. For Gaussian Processes this should be zero, but support vectors have often non-zero intercepts.
23
    """
24

25
    X_train: np.ndarray
1✔
26
    alpha: np.ndarray
1✔
27
    n: int
1✔
28
    d: int
1✔
29
    gamma: float | None = None
1✔
30
    kernel_type: str = "rbf"
1✔
31
    intercept: float = 0.0
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc