Skip to content

Commit 4b45549

Browse files
committed
Update docs
1 parent 68d9d40 commit 4b45549

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

docs/source/guides/classification.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ For models that support ``partial_fit``, you can update them during streaming:
125125
.. code-block:: python
126126
127127
from ezmsg.learn.process.sklearn import SklearnModelProcessor, SklearnModelSettings
128-
from ezmsg.sigproc.sampler import SampleMessage
128+
from ezmsg.baseproc import SampleTriggerMessage
129+
from ezmsg.util.messages.util import replace
129130
130131
# Create processor with online learning support
131132
processor = SklearnModelProcessor(
@@ -137,9 +138,9 @@ For models that support ``partial_fit``, you can update them during streaming:
137138
)
138139
139140
# Training with labeled samples
140-
sample_msg = SampleMessage(
141-
sample=feature_array, # AxisArray with features
142-
trigger=label_value, # The class label
141+
sample_msg = replace(
142+
feature_array, # AxisArray with features
143+
attrs={"trigger": SampleTriggerMessage(value=label_value)}
143144
)
144145
processor.partial_fit(sample_msg)
145146

0 commit comments

Comments
 (0)