045-KnoFM.train: Knowledge-extracting or adaptive-order Factorization Machine

Description Usage Arguments References See Also Examples

Description

KnoFM.train is a method training a knowledge-extracting Factorization Machine.

Usage

1
   KnoFM.train(data, target, multicore = T, silent = F)

Arguments

data

an object of class dgTMatrix, matrix or data.frame (or an object coercible to dgTMatrix): a matrix containing training data, each row representing a training example and each column representing a feature.

target

numeric: vector specifying the target value of each training example (length must match rows of object data).

multicore

logical: specifying whether multiple cores should be used.

silent

logical: specifying whether progess should be printed.

References

[1] J. Knoll , J. Stuebinger, and M. Grottke, Exploiting social media with higher-order Factorization Machines: Statistical arbitrage on high-frequency data of the S&P 500. FAU Discussion Papers in Economics, University of Erlangen-Nuernberg, 2017.

[2] J. Knoll, Recommending with Higer-Order Factorization Machines, Research and Development in Intelligent Systems XXXIII, 2016.

See Also

FactoRizationMachines

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
27
28
29
## Not run: 

### Example to illustrate the usage of the method
### Data set very small and not sparse, results not representative
### Please study major example in general help 'FactoRizationMachines'

# Load data set
library(FactoRizationMachines)
library(MASS)
data("Boston")

# Subset data to training and test data
set.seed(123)
subset=sample.int(nrow(Boston),nrow(trees)*.8)
data.train=Boston[subset,-ncol(Boston)]
target.train=Boston[subset,ncol(Boston)]
data.test=Boston[-subset,-ncol(Boston)]
target.test=Boston[-subset,ncol(Boston)]

# Predict with an adaptive-order Factorization Machine
# using one CPU core  and printing progress
model=KnoFM.train(data.train,target.train,FALSE,FALSE)

# RMSE resulting from test data prediction
sqrt(mean((predict(model,data.test)-target.test)^2))



## End(Not run)

FactoRizationMachines documentation built on Nov. 17, 2017, 4:21 a.m.