BestAccuracy: 'BestAccuracy' Asks for a dataframe, a vector of collumn...

Description Usage Arguments Examples

View source: R/Encontrar_candidatos_dataset_v1.R

Description

BestAccuracy Asks for a dataframe, a vector of collumn indices and the goal collumn and returns the maximum possible value of accuracy of filling missing values

Usage

1
BestAccuracy(df, VECTORS, goal)

Arguments

df

A dataframe that you intend to fill missing values, warning this dataframe shall contain no missing values so the user must drop the lines it happens

VECTORS

The collumns you wish to use to predict the missing values

goal

The collum with the missing values you wish to fill

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#The Best accuracy function tells its user the best accuracy possible.
#Code with two ## is working code but takes longer than 5 seconds
#Given a set and a goal to predict it supposes the following.
#All missing values are contained in the possible values with lowest uncertainty.
#Lets first Consider the iris dataset
#It has the following parameters
print(names(iris))
#As we can see the 5 collumn is species
#Lets use Sepal.Length to predict Species and see Best accuracy
print(BestAccuracy(iris,1,5))
#Now lets use both sepal parameters
print(BestAccuracy(iris,1:2,5))
#And when using a Petal parameter as well
##print(BestAccuracy(iris,1:3,5))
#We can see that iris even in the best case scenario species can be defined by these 3
#Now lets take a look at the mtcars dataset
##print(names(mtcars))
#Predicting gear using mpg
##print(BestAccuracy(mtcars,1,10))
#But if we try to predict mpg using gear
##print(BestAccuracy(mtcars,10,1))
#So using the best accuracy function we can know whats the best case accuracy
#If the user requires he can also predict more than 1 goal for example
##print(BestAccuracy(mtcars,c(1,3,5),c(10,11)))
#In this case we want to use mpg,disp,drat to predict a pair gear,carb
#To check the confidence of predicted values the user should use all three accuracy functions

cleanerR documentation built on May 2, 2019, 5:51 a.m.