Skip to main content

hello there w want to extract some features from the dataset randomly

ex:

we have 300 features coming in we want to get only 160 from them randomly

we trayed to use the sample, but it did work since its working base on the N rate

Any suggestion

Thanks

 

You can change the sampling type to the first N features, set N to 160 and select Yes for Randomize sampling. Note that this will select 160 features out of the 300 at random but they will be in the original order.

 

If you want a random order, you can use a random number generator, sort by the random number then use the sampler to get the first 160


Thanks

Great


is there a way we could assign the sampling value to an attribute value , its taking only parameter , since this value will depend on count of the coming features

Thanks


is there a way we could assign the sampling value to an attribute value , its taking only parameter , since this value will depend on count of the coming features

Thanks

I don't think it's possible in the sampler. An alternative would be after sorting to use a counter, followed by a tester and only pass features where count < sample size


Reply