# MLJ: selecting rows and columns for training in evaluate! for kernel regression

**URL:** <https://discourse.julialang.org/t/mlj-selecting-rows-and-columns-for-training-in-evaluate-for-kernel-regression/52832>\
**Category:** General Usage\
**Tags:** mlj\
**Created:** [January 4, 2021, 4:51pm UTC](https://discourse.julialang.org/t/mlj-selecting-rows-and-columns-for-training-in-evaluate-for-kernel-regression/52832 "2021-01-04T16:51:56Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Pere](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pere/32/214250_2.png) [@Pere](https://discourse.julialang.org/u/Pere)\
**Post date:** [January 4, 2021, 11:17pm UTC](https://discourse.julialang.org/t/mlj-selecting-rows-and-columns-for-training-in-evaluate-for-kernel-regression/52832/3 "2021-01-04T23:17:53Z")

</div>

Thanks, this could work if I knew the indices of the chosen rows that are passed to fit!

The smaller matrix is built from choosing a subset of rows and columns and sampling their intersection. That is, if K is 10x10 and train\_idx=[1,4,6], then the smaller matrix is the 3x3 K[train\_idx,train\_idx].

Hence, since I need the indices I wonder whether I should define a new sampler, or whatever function passes the data to train!, to obtain the smaller square matrix to be used in training

---

_[View the full topic](https://discourse.julialang.org/t/mlj-selecting-rows-and-columns-for-training-in-evaluate-for-kernel-regression/52832)._
