This file has been truncated, but you can view the full file.
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="generator" content="pandoc" /> |
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
#include <iostream> | |
#include "../fastFM/fastfm.h" | |
using namespace std; | |
using namespace fastfm; | |
int main(int argc, char** argv) { | |
cout << endl << "[ii] Little test" << endl; |
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
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
{ | |
"embeddedFonts" : [ ], | |
"pageSetup" : { | |
"size": "A4", | |
"width": null, | |
"height": null, | |
"margin-top": "2cm", | |
"margin-bottom": "2cm", | |
"margin-left": "2cm", | |
"margin-right": "2cm", |
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
""" | |
Benchmarks of enet_coordinate_descent vs. enet_coordinate_descent | |
using the true solution as warm-start | |
First, we fix a training set and increase the number of | |
samples. Then we plot the computation time as function of | |
the number of samples. | |
In the second benchmark, we increase the number of dimensions of the | |
training set. Then we plot the computation time as function of |
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
""" | |
Benchmarks of enet_coordinate_descent vs. enet_coordinate_descent | |
using the true solution as warm-start | |
First, we fix a training set and increase the number of | |
samples. Then we plot the computation time as function of | |
the number of samples. | |
In the second benchmark, we increase the number of dimensions of the | |
training set. Then we plot the computation time as function of |
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
""" | |
Benchmarks of refactored against current enet implementation | |
First, we fix a training set and increase the number of | |
samples. Then we plot the computation time as function of | |
the number of samples. | |
In the second benchmark, we increase the number of dimensions of the | |
training set. Then we plot the computation time as function of | |
the number of dimensions. |
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
# -*- coding: utf-8 -*- | |
""" | |
Generalized linear models via coordinate descent | |
Author: Fabian Pedregosa <fabian@fseoane.net> | |
""" | |
import numpy as np | |
from scipy import linalg |
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
import numpy as np | |
from scipy import linalg | |
MAX_ITER = 100 | |
# cdef double l1_reg = alpha * rho * n_samples | |
# cdef double l2_reg = alpha * (1.0 - rho) * n_samples | |
def enet_coordinate_descent(X, y, alpha, rho, warm_start=None, max_iter=MAX_ITER): | |
n_samples = X.shape[0] |
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
load('InternetAd.RData') | |
file = file.path(getwd(), 'InternetAd.mtx') | |
library(Matrix) | |
writeMM(InternetAd$x, file=file) | |
file = file.path(getwd(), 'InternetAd.target') | |
write(InternetAd$y, file=file, ncolumns=1) |
NewerOlder