geffy / tffm

TensorFlow implementation of an arbitrary order Factorization Machine
MIT License
780 stars 176 forks source link

add functionality to train with weighted data points #34

Closed slhansen closed 6 years ago

slhansen commented 7 years ago

Enable training with weighted/scaled data points. The weight vector s is an optional parameter that holds the weight of each data point in X. s is either None or an np.array with shape (n_samples,). If s is used then the loss function is either loss_weighted_logistic or loss_weighted_mse.

In order to use the weights then use_weights=True has to be set when initializing the TFFMClassifier or TFFMRegressor.

@geffy