Open
Conversation
…ract model() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
marcosfrenkel
requested changes
Feb 25, 2026
Contributor
marcosfrenkel
left a comment
There was a problem hiding this comment.
Could you add some implemented examples of how this would look like? You can have some generic functions (Gaussian, exponential, sine, etc.) and in the comments write how an example would look like.
How are the parameters handled? What should I do if I want to generate 2 different sets of data with different parameters?
labcore/data/synthesizer.py
Outdated
| pass | ||
|
|
||
| def generate(self, coordinates): | ||
| return self.model(coordinates) + self.noise() |
Contributor
There was a problem hiding this comment.
You are calling the self.noise() function here, but there is no way to pass a different std value when generating the data.
…ial, sine, and gaussian class implementations
… are now static methods. Parameters can be set at instantiation or overridden in generate().
… class model() signatures
marcosfrenkel
requested changes
Mar 4, 2026
|
|
||
| import numpy as np | ||
|
|
||
| import dataclasses |
Contributor
There was a problem hiding this comment.
Suggested change
| import dataclasses | |
| from dataclasses import dataclass |
| """ | ||
|
|
||
| @dataclasses.dataclass |
Contributor
There was a problem hiding this comment.
Suggested change
| @dataclasses.dataclass | |
| dataclass |
| return np.random.normal(scale = std, size = len(coordinates)) | ||
|
|
||
|
|
||
| @dataclasses.dataclass |
Contributor
There was a problem hiding this comment.
Suggested change
| @dataclasses.dataclass | |
| dataclass |
|
|
||
|
|
||
|
|
||
| @dataclasses.dataclass |
Contributor
There was a problem hiding this comment.
Suggested change
| @dataclasses.dataclass | |
| dataclass |
| return A * np.sin(2 * np.pi * coordinates * f + phi) + of | ||
|
|
||
|
|
||
| @dataclasses.dataclass |
Contributor
There was a problem hiding this comment.
Suggested change
| @dataclasses.dataclass | |
| dataclass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Basic frame for data synthesizer.