ipft (version 0.2.2)

ipfProb: This function implements a probabilistic algorithm

Description

This function implements a probabilistic algorithm

Usage

ipfProb(train, test, groups, k = 3, FUN = sum, delta = 1, ...)

Arguments

train
a data frame containing the RSSI vectors of the training set
test
a data frame containing the RSSI vectors of the test set
groups
a numeric vector of length = nrow(train) containing the group index for the training vectors
k
the k parameter for the algorithm (number of similar neighbors)
FUN
function to compute the similarity measurement. Default is 'sum'
delta
parameter delta
...
additional parameters for provided function FUN

Value

An S4 class object of type ipfModel, with the following slots: neighbors -> a matrix with k columns and nrow(test) rows, with the k most similar training observation for each test observation weights -> a matrix with k columns and nrow(test) rows, with the weights distances -> a matrix with k columns and nrow(test) rows, with the distances k -> k parameter groups -> the group index for each training observation

Examples

Run this code

    groups <- ipfGroup(ipftrain, LONGITUDE, LATITUDE)
    model <- ipfProb(ipftrain[, 1:168], ipftest[, 1:168], groups)

    groups <- ipfGroup(ipftrain, LONGITUDE, LATITUDE)
    model <- ipfProb(ipftrain[, 1:168], ipftest[, 1:168], groups, k = 9, delta = 10)

Run the code above in your browser using DataLab