Choose number of KNNs

Share:

Description

Choose number of KNNs

Usage

1
2
3
r(p, m = floor(sqrt(p)), eta = 0.99, nu = 20, rmax = p, nsim = 1000,
    lambda = 0.01, method = c("binomial", "poisson", "nu", 
    "geo.independent", "geo.sim", "geo.dependent", "lambda"))

Arguments

p

Total number of available features.

m

Number of features to be drawn by each KNN.

eta

Coverage Probability.

nu

mean mutiplicity of a feature

rmax

number of series terms for independent geometric approximation

nsim

number of simulations for geometric simulation.

lambda

mean number of silient features.

method

one of binomial, poisson, nu, geo.independent, geo.sim, geo.dependent, lambda

Details

Method binomial and poisson are approximation method for a given eta value.

Method nu computes r for a given nu.

Method geo.independent, geo.sim and geo.dependent compute r using geomerical random variables z until eachh is at least drawn once. The difference is that geo.independent ignores dependency,geo.sim is a simulation method and geo.independent is an exact method using gmp package.

Method lambda computes r for a given lambda.

Value

An integer.

Author(s)

Shengqiao Li<lishengqiao@yahoo.com>

Examples

1
  r(100, 10);