-
Hey! I think this might be a really simple problem but, I'm still figuring out the library. Currently I'm trying out importing datasets from csv files using krangl and then fitting a model to them. I decided to try out a multilabel dataset recently, and I'm a bit confused as to how I'd have multiple labels. My current implementation ends in a I'm using a OnHeapDataset, and the function to create one is /**
* Takes data from consumers [featuresConsumer] and [labelConsumer]
* to dataset [OnHeapDataset].
*/
@JvmStatic
public fun create(
featuresConsumer: () -> Array<FloatArray>,
labelConsumer: () -> FloatArray
): OnHeapDataset {
return try {
val features = featuresConsumer()
val labels = labelConsumer()
check(features.size == labels.size) { "The amount of labels is not equal to the amount of images." }
OnHeapDataset(features, labels)
} catch (e: IOException) {
throw AssertionError(e)
}
} My question is then as follows, how would I have multiple labels if all it takes in is a single FloatArray? P.S. I've probably completely misunderstood something, so be kind. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The problem exists and a possible solution is described in issue #254 But if the fix for the multiple regression is pretty simple, if not the same for the multilabel classification, where each label could be presented as a vector of probabilities. Could you provide more information about the task which you are going to solve? Is it multilabel regression or is it multilabel classification? |
Beta Was this translation helpful? Give feedback.
The problem exists and a possible solution is described in issue #254
So at this moment, no way is to implement multilabel dataset.
But if the fix for the multiple regression is pretty simple, if not the same for the multilabel classification, where each label could be presented as a vector of probabilities.
Could you provide more information about the task which you are going to solve? Is it multilabel regression or is it multilabel classification?