README.md

Travis-CI Build Status AppVeyor build status

FoodC5

R package to derive probability that any two food items are the same

Overview

FoodC5 is an R package providing an interface to a pre-trained C5.0 classification model. This C5.0 tree enables to predict whether any two food items are the same. It requires the following input parameters:

The fuzzy score can be computed with with the Foodmapping R package. The difference in energy content can be expressed as 100 * abs( itemA_energy_content - itemB_energy_content ) / itemA_energy_content.

Installation

To install, run the following commands in R:

install.packages("devtools")
devtools::install_github("armandvalsesia/FoodC5", build_vignettes = TRUE)

Quick Start

require("FoodC5")

# load example dataset
data(food_score)

# Compute probability based on a comparison using the English-translated food names
preds <- c5_one_language(food_score,  'ENG_SCORE', 'EDIFF')


# Compute probability based on a comparison using the original food names
# this model is trained for the following languages: English, Dutch, Danish, and a modest subset for Greek, Spanish and Bulgarian.  
preds <- c5_one_language(food_score,  'ENG_SCORE', 'EDIFF', c5_object = read_c50_ori())

License and authors

This software uses the GPL v3 license, see LICENSE. Authors and copyright are provided in DESCRIPTION.

Big thanks to Hélène Ruffieux and Radu Popescu for help with CI.



armandvalsesia/FoodC5 documentation built on May 6, 2019, 12:23 p.m.