Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[experiment] Verify diverging parameters do not impact SVM fit/predict quality. #2213

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions onedal/svm/svm.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def __init__(
):
super().__init__(
C=C,
nu=0.5,
nu=0.0,
epsilon=epsilon,
kernel=kernel,
degree=degree,
Expand Down Expand Up @@ -406,8 +406,8 @@ def __init__(
):
super().__init__(
C=C,
nu=0.5,
epsilon=0.0,
nu=0.0,
epsilon=0.0, # unused in BaseSVC
kernel=kernel,
degree=degree,
gamma=gamma,
Expand Down Expand Up @@ -518,9 +518,9 @@ def __init__(
**kwargs,
):
super().__init__(
C=1.0,
C=0.0,
nu=nu,
epsilon=0.0,
epsilon=0.0, # unused in libSVM
kernel=kernel,
degree=degree,
gamma=gamma,
Expand Down
5 changes: 4 additions & 1 deletion sklearnex/ensemble/tests/test_forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
@pytest.mark.parametrize("block, trees, rows, scale", hparam_values)
def test_sklearnex_import_rf_classifier(dataframe, queue, block, trees, rows, scale):
from sklearnex.ensemble import RandomForestClassifier

from sklearnex.utils.validation import validate_data

X, y = make_classification(
n_samples=1000,
n_features=4,
Expand All @@ -51,6 +52,8 @@ def test_sklearnex_import_rf_classifier(dataframe, queue, block, trees, rows, sc
X = _convert_to_dataframe(X, sycl_queue=queue, target_df=dataframe)
y = _convert_to_dataframe(y, sycl_queue=queue, target_df=dataframe)
rf = RandomForestClassifier(max_depth=2, random_state=0).fit(X, y)
# Test to see if this changes validation coverage
validate_data(rf, X, reset=False)
hparams = RandomForestClassifier.get_hyperparameters("infer")
if hparams and block is not None:
hparams.block_size = block
Expand Down
Loading
Loading