# Biasing a query

**URL:** <https://discourse.flucoma.org/t/biasing-a-query/506>\
**Category:** Pre-Release Toolbox2 New Ideas\
**Created:** [June 2, 2020, 12:17am UTC](https://discourse.flucoma.org/t/biasing-a-query/506 "2020-06-02T00:17:40Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [June 29, 2020, 11:01am UTC](https://discourse.flucoma.org/t/biasing-a-query/506/9 "2020-06-29T11:01:36Z")

</div>

> [@tremblap](#):
>
> its not backward, it is like all our other range interface: start and num  
> 0 300: start at 0 and gimme 300  
> 2 1: start at 2 and gimme 1

Right. It’s just visually confusing because there is no associated message that goes with them, and `addrange 0 5` returns the data I want, but for visually confusing reasons (as in, it _looks_ like it goes from 0 to 5, inclusively). [I’ve mentioned this already](https://discourse.flucoma.org/t/newschool-vs-oldschool-syntax-transform-dataset-dataset/495/4), but this `<dataset> <dataset> <number> <number>` syntax is a lot more confusing overall.

> [@tremblap](#):
>
> In your case, if you’re going to bias a query on a subset, then query in RT, you make the subset, you then make a kdtree of that subset, and query that kdtree. the query should be faster than on the real dataset since you have less values. what is even better is to query only what you care about, so you could dismiss the columns you don’t care about and make a smaller subset in that dimension too (nb of dims)

I tried to make a dataset that would have around the amount of numbers I’d be dealing with in a realworld context. I can easily get up to 10k samples/grains/bits and 300 descriptors/stats is about par for the course these days. Granted my realworld numbers may be slightly smaller, but I wanted to test it with numbers greater than 100 entries and 5 features.

I perhaps wouldn’t need all the columns for each query type, specifically if each column corresponds with a different time series and I’m choosing between the initial 256samples, or the initial 4410 samples etc…, but if I have a single value in that column that could potentially update on every query, I’d have to do this process _per query_.

edit:  
To further clarify. It wouldn’t _always_ need to update ‘per query’, but if I’m doing the thing you (@tremblap) suggested ages ago, where I have a slower envelope follower going, and us that output of that weighted against the current analysis frame to decide how “long” (or higher ‘[timeness](https://discourse.flucoma.org/t/dimensionality-reduction-mixing-the-rational-and-irrational/534/7)’) a sample to play back, that means I _would_ need to update things _per query_.

---

_[View the full topic](https://discourse.flucoma.org/t/biasing-a-query/506)._
