This PR fixes SyntheticStream interface implementation - adding inheritence from River dataset, allowing for using river.datasets.base.Dataset methods.
Few differences:
specifying n_features is now required in initailization
All required ClassSamplers have to be declared in constructor (To be honest, after a while I don't see any reason why I added option to add it anywhere else in the first place)
__repr__ content is modified to track csamplers declared in the datset. This was kinda problematic because river Dataset expects rather flat structure, adding csamplers makes it nested, but W&B allows for nested structrures, so it may come handy
In the current state SyntheticStream is a bit strange creation due to the fact it should be "flexible" but we kinda don't need it as flexible as it was designed for - as noted earlier @rswc so it is my overcomplicating mistake.
The best approach would be probably to refactor it as some kind of rivers' SyntheticDataset-based class with init functions to modify class weights.
But there currently no time to change it, and it does not really matter right now, so lets leave it as it is.
This PR fixes SyntheticStream interface implementation - adding inheritence from River dataset, allowing for using
river.datasets.base.Dataset
methods.Few differences:
n_features
is now required in initailizationClassSamplers
have to be declared in constructor (To be honest, after a while I don't see any reason why I added option to add it anywhere else in the first place)__repr__
content is modified to track csamplers declared in the datset. This was kinda problematic because riverDataset
expects rather flat structure, adding csamplers makes it nested, butW&B
allows for nested structrures, so it may come handyIn the current state
SyntheticStream
is a bit strange creation due to the fact it should be "flexible" but we kinda don't need it as flexible as it was designed for - as noted earlier @rswc so it is my overcomplicating mistake. The best approach would be probably to refactor it as some kind of rivers'SyntheticDataset
-based class with init functions to modify class weights. But there currently no time to change it, and it does not really matter right now, so lets leave it as it is.