Heuristics Including Take the Best and Unit-Weight Linear


[Up] [Top]

Documentation for package ‘heuristica’ version 1.0.3

Help Pages

accuracyFromConfusionMatrix3x3 Accuracy based on a predictPair confusion matrix.
city_population Population size of the 83 largest German cities.
city_population_original Original, uncorrected Population size of the 83 largest German cities.
collapseConfusionMatrix3x3To2x2 Collapses a 3x3 confusion matrix to a 2x2 confusion matrix.
conditionalCueValidityComplete Calculate conditional cue validity, which includes reversing and ranks.
confusionMatrixFor_Neg1_0_1 Confusion matrix for categories -1, 0, 1 (the output of predictPair).
correctGreater Creates function indicating whether row1[col] > row2[col].
cueAccuracy Calculate the accuracy of using a cue to predict a criterion.
cueValidity Calculate the cue validity.
cueValidityAppliedToColumns Calculate the cue validity for the cols_to_fit columns.
cueValidityComplete Calculate cue validity with reverse, cue directions, and cue ranks.
distributeGuessAsExpectedValue Distributes guesses of 3x3 confusion matrix to expected value of 1 and -1.
heuristics Wrap fitted heuristics to pass to rowPairApply to call predictPair.
heuristicsList Wrapper for fitted heuristics to generate predictions with rowPairApply.
heuristicsProb Wrap fitted heuristics to pass to rowPairApply to call predictProb.
highschool_dropout Chicago high school dropout rates.
logRegModel Logistic Regression model using cue differences as predictors
minModel Minimalist Model
oneRow Convenience function to get one row from a matrix or data frame.
pairMatrix Apply a function to all unique pairs of row indices up to num_row.
percentCorrect Percent correct of heuristics' predictPair on test_data.
percentCorrectList Percent correct of a list of heuristics' predictPair on test_data.
percentCorrectListNonSymmetric percentCorrectList for non-symmetric heuristics
percentCorrectListReturnMatrix Percent correct of heuristics' predictPair on test_data, returning a matrix.
predictPair Predict which of a pair of rows has a higher criterion.
predictPairProb Predict the probability that row1 has a higher criterion than row2.
predictPairSummary Returns the row indices, correct answer, and predictions for all row pairs.
probGreater Creates function for one column with correct probability row1 is greater.
regInterceptModel Linear regression wrapper for hueristica
regModel Linear regression (no intercept) wrapper for hueristica
reverseRowsAndReverseColumns Reverse rows and columns of data
rowIndexes Wrapper to output two columns, row 1 and row 2.
rowPairApply Apply functions to all row pairs.
rowPairApplyList Apply list of functions to all row pairs.
singleCueModel Single Cue Model
statsFromConfusionMatrix Accuracy, sensitivity, specificity, and precision of 2x2 confusion matrix.
ttbGreedyModel Greedy Take The Best
ttbModel Take The Best
unitWeightModel Unit-weight linear model
validityWeightModel Validity Weight Model, a linear model weighted by cue validities