Last active
August 23, 2018 16:58
-
-
Save allisterb/82f9d6750f1edda047f92a6d3aa9c49b to your computer and use it in GitHub Desktop.
Lokad Logistic Regression kernel using Adrien
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int ClientsDim = 2276210, ProductsDim = 58989, HDim = 24, LDim = 1; | |
Vector clients = new Vector("clients", ClientsDim), products = new Vector("products", ProductsDim), labels = new Vector(HDim); | |
var (W0, W1) = Tensor.TwoD("W0", (HDim, ClientsDim), "i", out Index i, out Index j).Two(); | |
var (b0, b1) = new Scalar("b0", HDim).Two(); | |
var E1 = W0 * clients + b0; | |
var E2 = W1 * products + b1; | |
var z = new Scalar("z", SUM[E1 * E2]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment