Skip to content

Commit

Permalink
fix: update hyperplane generator
Browse files Browse the repository at this point in the history
  • Loading branch information
YibinSun authored and hmgomes committed May 13, 2024
1 parent 0370553 commit 7279abc
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/capymoa/stream/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ def __init__(
magnitude_of_change: float = 0.0,
noise_percentage: int = 5,
sigma_percentage: int = 10,
CLI=None,
moa_stream=None,
):
"""Construct a HyperPlane Classification datastream generator.
Expand All @@ -222,16 +220,12 @@ def __init__(
self.magnitude_of_change = magnitude_of_change
self.noise_percentage = noise_percentage
self.sigma_percentage = sigma_percentage
self.CLI = CLI
if moa_stream is None:
self.moa_stream = MOA_HyperplaneGenerator()
else:
self.moa_stream = moa_stream
self.moa_stream = MOA_HyperplaneGenerator()

if CLI is None:
self.CLI = (f"-i {instance_random_seed} -c {self.number_of_classes} -a {self.number_of_attributes} \
-k {self.number_of_attributes} -t {self.magnitude_of_change} \
-n {self.noise_percentage} -s {self.sigma_percentage}")

self.CLI = (f"-i {instance_random_seed} -c {self.number_of_classes} -a {self.number_of_attributes} \
-k {self.number_of_attributes} -t {self.magnitude_of_change} \
-n {self.noise_percentage} -s {self.sigma_percentage}")

super().__init__(CLI=self.CLI, moa_stream=self.moa_stream)

Expand Down Expand Up @@ -278,7 +272,7 @@ def __str__(self):



class HyperPlaneRegression(HyperPlaneClassification):
class HyperPlaneRegression(Stream):
"""Generates HyperPlane Regression concepts functions.
>>> from capymoa.stream.generator import HyperPlaneRegression
Expand Down

0 comments on commit 7279abc

Please sign in to comment.