Search scorers: private API

PortfolioOptimisers.CrossValSearchScorer — Type
const CrossValSearchScorer = Union{CrossValidationSearchScorer, Function}

Union type for search cross-validation scoring strategies. Accepts either a subtype of CrossValidationSearchScorer or a plain function that gives what a search scorer gives.

A function takes the score matrix and gives one of two forms. A vector holds one value per column, bigger is better, as candidate_scores does, so X -> vec(mean(X; dims = 1)) does the job of HighestMeanScore. An integer is the index of one winner, as the index form of a subtype is. The search calls the function once and reads the form from the type of the return.

One index cannot order more than one candidate, and it has no value to combine. So a search refuses an index with n_best > 1, and a vector of scorers refuses a member that gives an index. Both refusals happen when the search runs, because only the return shows the form. A function has the scale 1, see scorer_scale. Write a weight into the function itself.

Related

source
PortfolioOptimisers.finite_candidate_order — Function
finite_candidate_order(r_sca, s_sca::Union{Option{<:Sca_VecToScaM}, EachValue}, scorer,
                       test_scores::MatNum, n_best::Integer)
finite_candidate_order(r_sca, ::EachValue, scorers::AbstractVector, test_scores::MatNum,
                       n_best::Integer)
finite_candidate_order(::EachValue, s_sca, scorer, test_scores::AbstractVector{<:MatNum},
                       n_best::Integer)
finite_candidate_order(r_sca::PerCandidate,
                       s_sca::Union{Option{<:Sca_VecToScaM}, EachValue}, scorer,
                       test_scores::AbstractVector{<:MatNum}, n_best::Integer)
finite_candidate_order(r_sca::PerCandidate, ::EachValue, scorers::AbstractVector,
                       test_scores::AbstractVector{<:MatNum}, n_best::Integer)

Order the candidates of a search, best first, keep the first n_best, and never let a failed candidate in. Under EachValue, give one such ranking for each value per candidate. Under PerCandidate, combine the values of the measures of each candidate first.

A candidate that did not finish every fold carries a non-finite entry in its column of the score matrix, and argmax over [0.80, NaN, 0.50] returns the position of the NaN. So the scorer receives the columns whose every entry is finite, and the order that it gives, in positions of the matrix that it received, maps back to the grid through the list of those columns.

The scorer therefore never sees a failed candidate, and it can compute anything on the matrix that it receives: a mean, a spread, a rank. A -Inf substitution would be safe only for a scorer that reads order alone, because a column that holds -Inf gives NaN for a spread and the NaN wins again.

The raw matrix stays on the result, so its columns agree with the grid and a reader sees which fold failed.

Mathematical definition

\[\begin{align} \mathcal{C} &= \left\{ i : S_{fi} \text{ is finite for every } f \right\}\,, \\ \pi &= \operatorname{sortperm}_{\downarrow}\, v\left(\mathbf{S}_{:,\,\mathcal{C}}\right)\,, \\ r_k &= c_{\pi_k}\,, \quad k = 1, \ldots, \min\left(n_{b}, |\mathcal{C}|\right)\,. \end{align}\]

Where:

  • $\mathcal{C}$: Finite candidates, the candidates whose every score is finite. A failed fold scores NaN, so a candidate that failed one is not in $\mathcal{C}$.
  • $\mathbf{S}_{:,\,\mathcal{C}}$: Finite columns, the columns of $\mathbf{S}$ at the finite candidates, in grid order.
  • $v$: Value per candidate of the scorer, or of the vector of scorers reduced through s_sca, candidate_values, one entry per column of the matrix that it receives, bigger is better.
  • $\pi$: Candidate order, the positions of the finite candidates that sort $v$ in descending order with a stable sort.
  • $c_j$: Finite candidate $j$, the $j$-th smallest entry of $\mathcal{C}$.
  • $r_k$: Kept candidate of rank $k$, the position in the grid of entry $k$ of rank_idx.
  • $n_{b}$: Kept-candidate count n_best, the most candidates that the search keeps.

The sort is stable, so a tie keeps the order of the grid, as argmax does.

One ranking for each value

A ranking is the pair (rank_idx, rank_scores). The types of r_sca, s_sca, scorer and test_scores select the shape, never the count at run time. r_sca is read only when test_scores holds one matrix per measure, so for one matrix it is inert.

  • One matrix, one value. A reduction or one scorer gives one ranking, by the steps below. This is the path of a search of one value, and EachValue with one scorer takes it too.
  • A vector of K matrices, r_sca = PerCandidate(sca). A candidate enters only when its column is finite in every matrix. The scorer reduces each matrix over these columns, and sca combines the K values of each candidate, through candidate_values. The rest is the path of one matrix, so the return is one ranking, or L rankings under s_sca = EachValue().
  • One matrix, s_sca = EachValue() with L scorers. Each scorer orders the finite candidates alone, through scorer_ranking. Its values are multiplied by its scorer_scale, so a negative scale reverses the order of that scorer alone. A scorer that gives the index of one winner keeps one candidate, whatever n_best is, and its entry of rank_scores is nothing. The return is a vector of L entries in each part.
  • A vector of K matrices, r_sca = EachValue(). Each matrix is ranked by the rules above, apart from the others, so a candidate can enter the ranking of one measure and stay out of the ranking of another. A matrix with no finite column gives an empty ranking, through empty_ranking. Its columns are empty, and its values are empty, or nothing where a full ranking of the same scorer holds nothing. The return is a vector of K entries in each part, or a K × L matrix, row k for measure k, under s_sca = EachValue() with L scorers, through measure_rankings.

Algorithm

  1. Mark the columns of test_scores whose every entry is finite, giving cols, through finite_score_columns. Under PerCandidate, a column must be finite in every matrix.
  2. Throw an IsNonFiniteError when no column is finite.
  3. Take the view X of test_scores at cols, or the view of each matrix under PerCandidate, and call candidate_values with r_sca, s_sca and scorer on it, giving vals.
  4. If vals is a vector: check it through assert_candidate_scores. Then take the first min(n_best, length(cols)) positions of the descending order of vals through a partial sort, which breaks a tie by the position, and so gives the order of a stable sort. Return the columns of cols at those positions and their values.
  5. If vals is an integer, the index of one winner: refuse n_best > 1, and return its column of cols and nothing.
  6. Refuse a vals of any other type with an ArgumentError.

Steps 1 to 3 are written twice, once for one matrix and once for the K matrices of PerCandidate, and each copy has a method for one scorer and a method for L scorers under s_sca = EachValue(). So each form of the data is a method of this function, and no helper holds a part of the job. The copies agree: each marks the columns through finite_score_columns, takes the views at them, and reads the values through candidate_values. The tests of a search of one value hold the copies for one matrix, and the tests of PerCandidate hold the copies for the K matrices.

Arguments

  • r_sca: Reduction of the oriented scores of a vector of risk measures in r to one score in each fold or path, a Sca_VecToScaM, or nothing for the sum that SumScalariser gives. EachValue keeps one score matrix per measure, and gives one ranking per measure. PerCandidate keeps one score matrix per measure, and combines the measures once per candidate, after the search scorer. Inert when r holds one measure.
  • s_sca: The reduction of a vector of search scorers, or EachValue. Inert for one scorer.
  • scorer, scorers: One search scorer (CrossValSearchScorer), or a vector of them.
  • test_scores: The folds × candidates, or paths × candidates, score matrix, or one such matrix per measure under a rule of AbstractSearchReduction.
  • n_best: The count of the candidates that each ranking keeps.

Validation

  • At least one candidate must have finished every fold. Otherwise an IsNonFiniteError.
  • A scorer that gives an index keeps one candidate. Otherwise an ArgumentError names the type of the scorer and the form to give.
  • The checks of assert_candidate_scores and candidate_values.
  • A scorer gives a vector or an integer. Otherwise an ArgumentError.
  • A vector of matrices under EachValue: these checks on each matrix that has a finite column, and at least one matrix has a finite column. Otherwise an IsNonFiniteError that names the count of the measures.
  • A vector of matrices under PerCandidate: at least one column is finite in every matrix. Otherwise an IsNonFiniteError. A scorer that gives an index is refused with an ArgumentError.

Returns

  • rank_idx::AbstractVector{<:Integer}: The positions in the parameter grid of the kept candidates, best first. Under EachValue, one such vector for each value.
  • rank_scores::Option{<:VecNum}: The value of candidate_values of each kept candidate, in the order of rank_idx, or nothing when the scorer gives an index. Under EachValue, one such entry for each value.

Related

source
PortfolioOptimisers.assert_candidate_scores — Function
assert_candidate_scores(scorer, vals::VecNum, n::Integer)

Refuse the values of a search scorer that cannot order the candidates.

A value per candidate must line up with the columns of the matrix that the scorer received, and NaN has no place in an order. A short vector would pick a wrong candidate with no error, and a NaN would give an order that depends on the sort. finite_candidate_order calls this check on the values of one scorer, and candidate_values on the values of each member of a vector, before the reduction.

Arguments

  • scorer: The search scorer that gave vals.
  • vals: Its values.
  • n: The count of the columns that the scorer received.

Validation

  • length(vals) == n. Otherwise a DimensionMismatch.
  • No value is NaN. Otherwise an IsNonFiniteError. An infinite value has a place in the order, so it is kept.

Returns

  • nothing.

Related

source
PortfolioOptimisers.candidate_values — Function
candidate_values(r_sca, s_sca::Union{Option{<:Sca_VecToScaM}, EachValue},
                 scorer::CrossValSearchScorer, X::MatNum)
candidate_values(r_sca::PerCandidate{<:Option{<:Scalariser}},
                 s_sca::Union{Option{<:Sca_VecToScaM}, EachValue},
                 scorer::CrossValSearchScorer, Xs::AbstractVector{<:MatNum})
candidate_values(r_sca::PerCandidate{<:Union{VectorToScalarMeasure, Function}},
                 s_sca::Union{Option{<:Sca_VecToScaM}, EachValue},
                 scorer::CrossValSearchScorer, Xs::AbstractVector{<:MatNum})
candidate_values(r_sca, s_sca::Option{<:Sca_VecToScaM}, scorers::AbstractVector, X)

Give what the search scorer, or the vector of them, gives for the candidates of a search: one value per column of X, bigger is better, or the index of one winner.

One scorer gives its candidate_scores. When these are nothing, it is called once on X, and the return gives the form: a vector of values from a function, or the index of one winner. r_sca, s_sca and scorer_scale are inert, so a search of one scorer makes the one call of the scorer that it made before.

Under PerCandidate, Xs holds the view of each of the K score matrices at the same columns. The scorer gives its values on each view, as one scorer does, and r_sca.sca combines the K values of each candidate to one, by its type:

These are the two reductions of the scorers below, written once for the measures and once for the scorers, as the rule one owner, one name states. The two copies agree: each reduces by the type of its reduction in the same two ways. The tests of PerCandidate hold the copy for the measures, and the tests of a vector of scorers hold the copy for the scorers. The scale of each measure is in its matrix, so it is the weight of the measure. The scale of a scorer is read after this combination, so a vector of scorers weights the combined values.

A vector of scorers gives one value per candidate. Each member gives its values as one scorer does, and the values of each member are multiplied by its scale. Then s_sca reduces the L values of each candidate to one, by its type:

Every value is bigger-is-better before the reduction, so MaxScalariser and MaxValue give the best scorer of each candidate, and MinScalariser and MinValue the worst. StdValue gives the highest value to the largest spread.

Mathematical definition

\[\begin{align} v_j &= S\left(s_1 v_{1j}, \, \ldots, \, s_L v_{Lj}\right)\,. \end{align}\]

Where:

  • $v_j$: Value of candidate $j$ that the search orders by.
  • $v_{lj}$: Value of candidate $j$ from scorer $l$ of the vector.
  • $s_l$: Scale of scorer $l$, from scorer_scale.
  • $S$: The reduction s_sca.
  • $L$: Count of the scorers of the vector.

Algorithm

  1. One scorer: call candidate_scores. Return its values, or the return of scorer(X) when it gives nothing.
  2. One scorer under PerCandidate: give the return of the scorer on each view as in step 1, and check each one through measure_candidate_values. Combine the K vectors through the type of r_sca.sca, and check that no combined value is NaN.
  3. A vector: give the return of each member as in step 1, or step 2 under PerCandidate. Check each one through assert_candidate_scores, and multiply it by the scale of its member.
  4. Reduce the scaled vectors through the type of s_sca, with reduce_scorer_values, and check that no reduced value is NaN.

Arguments

  • r_sca: Reduction of the oriented scores of a vector of risk measures in r to one score in each fold or path, a Sca_VecToScaM, or nothing for the sum that SumScalariser gives. EachValue keeps one score matrix per measure, and gives one ranking per measure. PerCandidate keeps one score matrix per measure, and combines the measures once per candidate, after the search scorer. Inert when r holds one measure.
  • s_sca: The reduction of a vector of scorers.
  • scorer: One search scorer.
  • scorers: A vector of search scorers.
  • X: The rows × candidates score matrix that the scorers receive, or the view of each matrix under PerCandidate. Every entry is finite.
  • Xs: The view of each of the K score matrices at the same columns.

Validation

  • Each member of a vector gives a vector of values. A member that gives an index, or any other form, is refused with an ArgumentError, because an index has no value to combine.
  • Under PerCandidate, the scorer gives a vector of values on each view. A scorer that gives an index, or any other form, is refused with an ArgumentError.
  • The checks of assert_candidate_scores on the values of each member, and of each measure under PerCandidate.
  • No reduced value is NaN. Otherwise an IsNonFiniteError that names s_sca, or r_sca for the combination of the measures.

Returns

  • vals: One scorer gives its values, VecNum, or its return of another type, such as the index of one winner. A vector, and one scorer under PerCandidate, give VecNum, one value per candidate.

Related

source
PortfolioOptimisers.member_candidate_values — Function
member_candidate_values(scorer, n::Integer, vals)

Check the values of one member of a vector of search scorers, and multiply them by its scale.

reduce_scorer_values calls it once for each member, with the return of the member, before s_sca reduces the vector.

Arguments

  • scorer: The member.
  • n: The count of the candidates.
  • vals: The return of the member, from candidate_values.

Validation

  • vals is a vector. A member that gives an index, or any other form, is refused with an ArgumentError, because an index has no value to combine.
  • The checks of assert_candidate_scores.

Returns

  • vals::VecNum: The values of the member, multiplied by scorer_scale.

Related

source
PortfolioOptimisers.reduce_scorer_values — Function
reduce_scorer_values(r_sca, s_sca::Option{<:Scalariser}, scorers::AbstractVector, X)
reduce_scorer_values(r_sca, s_sca::Union{VectorToScalarMeasure, Function},
                     scorers::AbstractVector, X)

Reduce the scaled values of a vector of search scorers to one value per candidate.

Each member gives its values on X through candidate_values with r_sca, checked and scaled by member_candidate_values. Under PerCandidate, X holds one view per measure, and the values of a member are the combination of its values over the measures. Let v[l][j] be the scaled value of candidate j from member l. A Scalariser or nothing reduces through scalarise, elementwise over the vectors of the members, and nothing gives the sum. A VectorToScalarMeasure or a function reduces the vector [v[l][j] for l] of each candidate through vec_to_real_measure. These are the two reductions of oriented_score for a vector of risk measures.

Arguments

  • r_sca: Reduction of the oriented scores of a vector of risk measures in r to one score in each fold or path, a Sca_VecToScaM, or nothing for the sum that SumScalariser gives. EachValue keeps one score matrix per measure, and gives one ranking per measure. PerCandidate keeps one score matrix per measure, and combines the measures once per candidate, after the search scorer. Inert when r holds one measure.
  • s_sca: The reduction.
  • scorers: The vector of search scorers.
  • X: The score matrix that the members receive, or one view per measure under PerCandidate.

Returns

  • vals::VecNum: One value per candidate.

Related

source
PortfolioOptimisers.assert_reduced_values — Function
assert_reduced_values(slot::Symbol, sca, what::AbstractString, vals::VecNum)

Refuse the values of a reduction in a search that hold NaN, which no order can place.

candidate_values calls it after s_sca reduces a vector of search scorers, and after PerCandidate combines the values of the risk measures. Finite values can give NaN through a reduction: the sum of Inf and -Inf, or StdValue of one value.

Arguments

  • slot: The slot of the search that holds the reduction, :s_sca or :r_sca.
  • sca: The reduction.
  • what: The count and the name of the reduced items, for the message.
  • vals: The reduced values, one per candidate.

Validation

Returns

  • nothing.

Related

source

Under PerCandidate, the search scorer reduces the matrix of each risk measure, and the rule combines the values of each candidate.

PortfolioOptimisers.measure_candidate_values — Function
measure_candidate_values(scorer, n::Integer, vals)

Check the values that a search scorer gives for the score matrix of one risk measure under PerCandidate.

candidate_values calls it once for each measure, before r_sca.sca combines the measures. The scale of the scorer is not read here: it weights the combined values, in the stage of the scorers.

Arguments

  • scorer: The search scorer.
  • n: The count of the candidates.
  • vals: The return of the scorer on the matrix of the measure, from candidate_values.

Validation

  • vals is a vector. A scorer that gives an index, or any other form, is refused with an ArgumentError, because an index has no value to combine.
  • The checks of assert_candidate_scores.

Returns

  • vals::VecNum: The values of the scorer for the measure.

Related

source

Under EachValue, the search gives one ranking for each value per candidate.

PortfolioOptimisers.finite_score_columns — Function
finite_score_columns(test_scores::MatNum)
finite_score_columns(test_scores::AbstractVector{<:MatNum})

Give the columns of a score matrix of a search whose every entry is finite: the candidates that finished every fold.

The second form is the rule of a failed candidate under PerCandidate: a column enters only when it is finite in every matrix, because a value of fewer than K measures does not compare with a value of K.

Arguments

  • test_scores: The folds × candidates, or paths × candidates, score matrix, or one such matrix per measure.

Validation

  • At least one column is finite, in every matrix for the second form. Otherwise an IsNonFiniteError.

Returns

  • cols::Vector{Int}: The finite columns, in the order of the grid.

Related

source
PortfolioOptimisers.scorer_ranking — Function
scorer_ranking(scorer, cols::AbstractVector{<:Integer}, n_best::Integer, vals::VecNum)
scorer_ranking(scorer, cols::AbstractVector{<:Integer}, n_best::Integer, idx::Integer)

Rank the finite candidates by one member of a vector of search scorers under s_sca = EachValue().

The values of the member are checked through assert_candidate_scores, multiplied by its scorer_scale, and ordered through finite_candidate_order. An index keeps its one candidate with n_best = 1, because under EachValue a member that gives an index has no value to combine with another member.

Arguments

  • scorer: The member.
  • cols: The positions in the grid of the finite columns of the score matrix, which the member received.
  • n_best: The count of the candidates to keep.
  • vals, idx: The return of the member, from candidate_values.

Validation

Returns

  • (rank_idx, rank_scores): The ranking of the member.

Related

source
PortfolioOptimisers.empty_ranking — Function
empty_ranking(rank_idx::AbstractVector{<:Integer}, rank_scores)
empty_ranking(rank_idx::AbstractVector{<:AbstractVector{<:Integer}},
              rank_scores::AbstractVector)

Give an empty ranking with the form of a full one, for a matrix with no finite column under r_sca = EachValue().

The columns are empty. The values are empty where the full ranking holds a vector, and nothing where it holds nothing, the entry of a scorer that gives an index. The second form does this for each of the L rankings of s_sca = EachValue().

Arguments

Returns

  • (rank_idx, rank_scores): The empty ranking.

Related

source
PortfolioOptimisers.measure_rankings — Function
measure_rankings(s_sca, scorer, rankings::AbstractVector)
measure_rankings(::EachValue, scorers::AbstractVector, rankings::AbstractVector)

Arrange the rankings of the K score matrices of r_sca = EachValue() into the fields of the Result.

One ranking for each matrix gives a vector of K entries in each part. Under s_sca = EachValue() with L scorers, each matrix gives L rankings, and the parts are K × L matrices, row k for measure k and column l for scorer l.

Arguments

  • s_sca: The reduction of a vector of search scorers, or EachValue.
  • scorer, scorers: One search scorer, or a vector of them.
  • rankings: The ranking of each score matrix, from finite_candidate_order.

Returns

  • rank_idx, rank_scores: One entry for each value.

Related

source
PortfolioOptimisers.ranked_candidates — Function
ranked_candidates(base, lens_grid::AbstractVector, val_grid::AbstractVector,
                  rank_idx::AbstractVector{<:Integer})
ranked_candidates(base, lens_grid::AbstractVector, val_grid::AbstractVector,
                  rank_idx::AbstractArray{<:AbstractVector{<:Integer}})

Build the kept candidates of a search from their columns, and give the winner of each ranking.

The first form builds one ranking. The second form builds one ranking for each value, the form of EachValue, and keeps the shape of rank_idx. An empty ranking gives nothing for its winner and its column, and an empty vector of candidates with the element type of a ranking that is not empty.

Arguments

  • base: The estimator, or the Pipeline, that the search tunes.
  • lens_grid: The lenses of each grid point.
  • val_grid: The values of each grid point.
  • rank_idx: The columns of the kept candidates, best first, or one vector of them for each value.

Returns

  • opt: The winner, ranked[1], or the winner of each ranking.
  • idx: The column of the winner, rank_idx[1], or the column of the winner of each ranking.
  • ranked: The kept candidates, built from base through search_candidate, or one vector of them for each value.

Related

source
PortfolioOptimisers.allocate_search_predictions — Function
allocate_search_predictions(gscv, N::Integer)

Allocate the store of the predictions of the N candidates of a search, or give nothing.

The four methods of search_cross_validation on an optimiser and on a Pipeline, batch and combinatorial, call it before their score loop. With gscv.rank_prediction = true, the loop writes the prediction of candidate i at entry i, and ranked_predictions keeps the entries of the kept candidates. With false, the loop stores no prediction. The element type is AbstractPredictionResult, because only the fit gives the type of a prediction. ranked_predictions narrows the kept entries to the type of their values.

Arguments

Returns

  • predictions::Option{<:AbstractVector{<:AbstractPredictionResult}}: A store of N entries, uninitialised, or nothing.

Related

source
PortfolioOptimisers.ranked_predictions — Function
ranked_predictions(::Nothing, rank_idx::AbstractArray)
ranked_predictions(predictions::AbstractVector{<:AbstractPredictionResult},
                   rank_idx::AbstractVector{<:Integer})
ranked_predictions(predictions::AbstractVector{<:AbstractPredictionResult},
                   rank_idx::AbstractArray{<:AbstractVector{<:Integer}})

Keep the predictions of the kept candidates of a search, in the order of rank_idx.

The first form is a search with rank_prediction = false, and gives nothing. The second form keeps one ranking. The third form keeps one ranking for each value, the form of EachValue, and keeps the shape of rank_idx. Each entry is the object of predictions, with no copy, so two rankings that keep the same candidate hold the same object. A comprehension narrows each ranking to the type of its predictions. An empty ranking gives an empty vector with the element type of a ranking that is not empty, as ranked_candidates does.

Arguments

  • predictions: The prediction of each candidate, in grid order, or nothing.
  • rank_idx: The columns of the kept candidates, best first, or one vector of them for each value.

Returns

  • rank_predictions: The kept predictions, one vector of them for each value, or nothing.

Related

source
PortfolioOptimisers.store_search_prediction! — Function
store_search_prediction!(::Nothing, i::Integer, p::AbstractPredictionResult)
store_search_prediction!(store::AbstractVector{<:AbstractPredictionResult}, i::Integer,
                         p::AbstractPredictionResult)

Store the prediction of candidate i of a search at entry i of store.

The score loop of each method of search_cross_validation calls it after write_candidate_scores!. The first form is a search with rank_prediction = false, whose store is nothing, and stores nothing. The prediction is the object that the loop scored, with no copy.

Arguments

Returns

  • nothing.

Related

source
PortfolioOptimisers.assert_rank_predictions — Function
assert_rank_predictions(rank_idx::AbstractArray, ::Nothing)
assert_rank_predictions(rank_idx::AbstractVector{<:Integer},
                        rank_predictions::AbstractVector)
assert_rank_predictions(rank_idx::AbstractArray{<:AbstractVector{<:Integer}},
                        rank_predictions::AbstractArray)

Refuse the kept predictions of a SearchCrossValidationResult when they do not agree with its ranking.

The inner constructor of the Result calls it after assert_search_ranking. The first form is a Result with no predictions, and checks nothing. The second form checks one ranking, and the third form checks one ranking for each value, the form of EachValue.

Arguments

  • rank_idx: The columns of the kept candidates, or one vector of them for each value.
  • rank_predictions: The kept predictions, in the shape of rank_idx, or nothing.

Validation

  • The second form: length(rank_predictions) == length(rank_idx). Otherwise a DimensionMismatch.
  • The third form: size(rank_predictions) == size(rank_idx), and each entry holds one prediction for each entry of rank_idx. Otherwise a DimensionMismatch.

Returns

  • nothing.

Related

source