# For example, to run LCC on the dataset "data" using 200 atoms and an
# l1-regularization parameter of 0.1, saving the dictionary "dictionary" and
# the codes into "codes", use
if (FALSE) {
output <- local_coordinate_coding(training=data, atoms=200, lambda=0.1)
dict <- output$dictionary
codes <- output$codes
}
# The maximum number of iterations may be specified with the "max_iterations"
# parameter. Optionally, the input data matrix X can be normalized before
# coding with the "normalize" parameter.
#
# An LCC model may be saved using the "output_model" output parameter. Then,
# to encode new points from the dataset "points" with the previously saved
# model "lcc_model", saving the new codes to "new_codes", the following
# command can be used:
if (FALSE) {
output <- local_coordinate_coding(input_model=lcc_model, test=points)
new_codes <- output$codes
}
Run the code above in your browser using DataLab