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
X=readcsv("e4.csv"); | |
y2=readcsv("comparaisonY2.csv"); | |
y3=readcsv("comparaisonY3.csv"); | |
Result=rand(156849,1); | |
Result3=rand(156849,1); | |
tic(); | |
for i= 1:156849 | |
ensemblefity2=expm1( ( y2[:,1]*X[i,1] + y2[:,2]*X[i,2] + y2[:,3]*X[i,3] + y2[:,4]*X[i,4] )/100) | |
T=[y2 ensemblefity2 ] | |
Result[i,:]=sqrt( (1/size(T,1)) * sum(( log( T[:,6] +1 ) - log( T[:,5]+1 ) ).^2)) |
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
i=0 | |
#mymat <- matrix(data=NA,nrow=1000000,ncol=6) | |
Score1 <- matrix(data=NA,nrow=156849,ncol=1) | |
Score2 <- matrix(data=NA,nrow=156849,ncol=1) | |
tic=proc.time()[3] | |
for (i in seq(1,nrow(e4),1)) | |
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
x=[]; | |
t_start = cputime; | |
for (i= 1 : 156849) | |
ensemblefity2=expm1( ( y2(:,1)*e4(i,1) + y2(:,2)*e4(i,2) + y2(:,3)*e4(i,3) + y2(:,4)*e4(i,4) )/100); | |
ensemblefity3=expm1( ( y3(:,1)*e4(i,1) + y3(:,2)*e4(i,2) + y3(:,3)*e4(i,3) + y3(:,4)*e4(i,4) )/100); | |
T=[y2 ensemblefity2 ]; |
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
X=readcsv("e4.csv"); | |
y2=readcsv("comparaisonY2.csv"); | |
y3=readcsv("comparaisonY3.csv"); | |
Result=rand(156849,1); | |
Result3=rand(156849,1); | |
tic(); | |
for i= 1:156849 | |
ensemblefity2=expm1( ( y2[:,1]*X[i,1] + y2[:,2]*X[i,2] + y2[:,3]*X[i,3] + y2[:,4]*X[i,4] )/100) |
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
i=0 | |
#mymat <- matrix(data=NA,nrow=1000000,ncol=6) | |
Score1 <- matrix(data=NA,nrow=156849,ncol=1) | |
Score2 <- matrix(data=NA,nrow=156849,ncol=1) | |
tic=proc.time()[3] | |
for (i in seq(1,nrow(e4),1)) | |
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> | |
#define ARMA_NO_DEBUG | |
#include <armadillo> | |
#include <ctime> | |
#include <thread> | |
using namespace std; | |
using namespace arma; |
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
#A noter sur python, on compte à partir de 0 et non de 1 | |
import pandas as pd | |
import numpy as np | |
import csv | |
f = open('/home/alfard/Documents/Kaggle/Facebook2/Train.csv',"rb") | |
fw= open('/home/alfard/Documents/Kaggle/Facebook2/TrainClean.csv',"w") |
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
sample_train <- read.csv("/home/alfard/trainnrandom.csv",na.strings="NA") | |
sample_train$X <- NULL | |
sample_train$s1 <- ifelse (sample_train$click_bool==1 & sample_train$booking_bool==0,1,0) | |
sample_train$s2 <- ifelse (sample_train$click_bool==1 & sample_train$booking_bool==1,5,0) | |
sample_train$reli <- sample_train$s1+sample_train$s2 | |
#sasfreq(reli,sample_train) | |
#sample_train$reli <- factor(sample_train$reli) |
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
dZ<-c("srch_id","reli") | |
d<-ST2[dZ] | |
d$reli<-as.numeric(d$reli) | |
dW<-c("srch_id","reli") | |
dr<-sample_train[dW] | |
################################################################### | |
d$V3<-NULL |
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
############################################################################### | |
####### MISE AU FORMAT LETOR ################################################## | |
ST4<-NULL | |
ST2<-NULL | |
#ec2-79-125-53-143.eu-west-1.compute.amazonaws.com | |
library(dummies) | |
library(gtools) |
OlderNewer