heuristica: Heuristics Including Take the Best and Unit-Weight Linear

Implements various heuristics like Take The Best and unit-weight linear, which do two-alternative choice: which of two objects will have a higher criterion? Also offers functions to assess performance, e.g. percent correct across all row pairs in a data set and finding row pairs where models disagree. New models can be added by implementing a fit and predict function-- see vignette.

Author
Jean Whitmore [aut, cre], Daniel Barkoczi [aut]
Date of publication
2016-07-17 20:08:25
Maintainer
Jean Whitmore <jeanimal@gmail.com>
License
MIT + file LICENSE
Version
1.0.1
URLs

View on CRAN

Man 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...
collapseConfusionMatrix3x3To2x2
Collapses a 3x3 confusion matrix to a 2x2 confusion matrix.
conditionalCueValidityComplete
Calculate conditional cue validity, which includes reversing...
confusionMatrixFor_Neg1_0_1
Confusion matrix for categories -1, 0, 1 (the output of...
correctGreater
Creates function indicating whether row1[col] > row2[col].
createFunction
Generic function to create functions for rowPairApply.
createFunction.heuristics
Create function for heuristics prediction with rowPairApply.
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...
distributeGuessAsExpectedValue
Distributes guesses of 3x3 confusion matrix to expected value...
heuristics
Wrap fitted heuristics to pass to rowPairApply to call...
heuristicsList
Wrapper for fitted heuristics to generate predictions with...
heuristicsProb
Wrap fitted heuristics to pass to rowPairApply to call...
highschool_dropout
Chicago high school dropout rates.
lmWrapper
Create an lm model just specifying columns, generating a...
logRegModel
Logistic Regression model using cue differences as predictors
minModel
Minimalist Model
oneRow
Convenience function to get one row from a matrix or data...
pairMatrix
Apply a function to all unique pairs of row indices up to...
percentCorrect
Percent correct of heuristics' predictPair on test_data.
percentCorrectList
Percent correct of a list of heuristics' predictPair on...
percentCorrectListNonSymmetric
percentCorrectList for non-symmetric heuristics
percentCorrectListReturnMatrix
Percent correct of heuristics' predictPair on test_data,...
predictPair
Predict which of a pair of rows has a higher criterion.
predictPairInternal
Generic function to predict which of a pair of rows has a...
predictPairProb
Predict the probablity that row1 has a higher criterion than...
predictPairSummary
Returns the row indices, correct answer, and predictions for...
predictProbInternal
Generic function to predict the probability row 1 has a...
probGreater
Creates function for one column with correct probability row1...
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.
rowPairApply2Rows
Apply all functions to the two rows passed in.
rowPairApplyList
Apply list of functions to all row pairs.
singleCueModel
Single Cue Model
statsFromConfusionMatrix
Accuracy, sensitivity, specificity, and precision of 2x2...
ttbGreedyModel
Greedy Take The Best
ttbModel
Take The Best
unitWeightModel
Unit-weight linear model
validityWeightModel
Validity Weight Model, a linear model weighted by cue...
zzDocumentationStubFormulaModelParams
Documentation stub. Just to share documentation.
zzDocumentationStubModelParams
Documentation stub. Just a way to share parameter...
zzDocumentationStubReverseCues
Documentation stub.

Files in this package

heuristica
heuristica/inst
heuristica/inst/doc
heuristica/inst/doc/reproducing-results.Rmd
heuristica/inst/doc/confusion-matrix.R
heuristica/inst/doc/README.Rmd
heuristica/inst/doc/cross-validation.Rmd
heuristica/inst/doc/reproducing-results.html
heuristica/inst/doc/confusion-matrix.Rmd
heuristica/inst/doc/how-to-make-heuristic.html
heuristica/inst/doc/README.R
heuristica/inst/doc/confusion-matrix.html
heuristica/inst/doc/reproducing-results.R
heuristica/inst/doc/how-to-make-heuristic.Rmd
heuristica/inst/doc/cross-validation.html
heuristica/inst/doc/how-to-make-heuristic.R
heuristica/inst/doc/cross-validation.R
heuristica/inst/doc/README.html
heuristica/tests
heuristica/tests/testthat.R
heuristica/tests/testthat
heuristica/tests/testthat/test-heuristics_benchmark.R
heuristica/tests/testthat/test-aggregators.R
heuristica/tests/testthat/test-row_pair_data.R
heuristica/tests/testthat/test-performance.R
heuristica/tests/testthat/test-heuristics_batch.R
heuristica/tests/testthat/test-row_pair_apply.R
heuristica/tests/testthat/test-heuristics.R
heuristica/tests/testthat/test-cue_validity.R
heuristica/NAMESPACE
heuristica/NEWS.md
heuristica/data
heuristica/data/city_population.rda
heuristica/data/city_population_original.rda
heuristica/data/highschool_dropout.rda
heuristica/R
heuristica/R/aggregators.R
heuristica/R/data.R
heuristica/R/row_pair_apply.R
heuristica/R/row_pair_data.R
heuristica/R/util.R
heuristica/R/heuristics.R
heuristica/R/performance.R
heuristica/R/cue_validity.R
heuristica/vignettes
heuristica/vignettes/reproducing-results.Rmd
heuristica/vignettes/README.Rmd
heuristica/vignettes/cross-validation.Rmd
heuristica/vignettes/confusion-matrix.Rmd
heuristica/vignettes/how-to-make-heuristic.Rmd
heuristica/README.md
heuristica/MD5
heuristica/build
heuristica/build/vignette.rds
heuristica/DESCRIPTION
heuristica/man
heuristica/man/cueValidity.Rd
heuristica/man/singleCueModel.Rd
heuristica/man/regModel.Rd
heuristica/man/cueAccuracy.Rd
heuristica/man/cueValidityComplete.Rd
heuristica/man/cueValidityAppliedToColumns.Rd
heuristica/man/ttbGreedyModel.Rd
heuristica/man/unitWeightModel.Rd
heuristica/man/percentCorrectListNonSymmetric.Rd
heuristica/man/confusionMatrixFor_Neg1_0_1.Rd
heuristica/man/city_population_original.Rd
heuristica/man/regInterceptModel.Rd
heuristica/man/heuristicsProb.Rd
heuristica/man/predictPair.Rd
heuristica/man/percentCorrectListReturnMatrix.Rd
heuristica/man/collapseConfusionMatrix3x3To2x2.Rd
heuristica/man/zzDocumentationStubModelParams.Rd
heuristica/man/heuristics.Rd
heuristica/man/conditionalCueValidityComplete.Rd
heuristica/man/validityWeightModel.Rd
heuristica/man/oneRow.Rd
heuristica/man/accuracyFromConfusionMatrix3x3.Rd
heuristica/man/percentCorrectList.Rd
heuristica/man/city_population.Rd
heuristica/man/distributeGuessAsExpectedValue.Rd
heuristica/man/ttbModel.Rd
heuristica/man/percentCorrect.Rd
heuristica/man/logRegModel.Rd
heuristica/man/correctGreater.Rd
heuristica/man/zzDocumentationStubFormulaModelParams.Rd
heuristica/man/minModel.Rd
heuristica/man/createFunction.heuristics.Rd
heuristica/man/statsFromConfusionMatrix.Rd
heuristica/man/createFunction.Rd
heuristica/man/rowPairApplyList.Rd
heuristica/man/rowPairApply.Rd
heuristica/man/predictPairProb.Rd
heuristica/man/predictProbInternal.Rd
heuristica/man/lmWrapper.Rd
heuristica/man/rowPairApply2Rows.Rd
heuristica/man/highschool_dropout.Rd
heuristica/man/predictPairSummary.Rd
heuristica/man/predictPairInternal.Rd
heuristica/man/heuristicsList.Rd
heuristica/man/zzDocumentationStubReverseCues.Rd
heuristica/man/rowIndexes.Rd
heuristica/man/probGreater.Rd
heuristica/man/reverseRowsAndReverseColumns.Rd
heuristica/man/pairMatrix.Rd
heuristica/LICENSE