Direkt zum Hauptbereich

Posts

Posts mit dem Label "simulations" werden angezeigt.

re:publica 2018: Algorithmische Gegenmacht

Inzwischen gibt es auch das Video zur Podiumsdiskussion: Am 3.05., 17:30, Stelle ich unser neues Projekt mit der Hans-Böckler-Stiftung auf der re:publica vor und diskutiere mit Matthias Spielkamp und Katharina Simbeck, moderiert von Melanie Stein. Hier geht es zum Programm . Unter anderem zeige ich, wie man den Analysealgorithmus von IBM Watson austricksen kann. Hier der Link zum Projekt:  https://www.boeckler.de/11145.htm?projekt=S-2017-375-2%20B Und hier die Struktur meines Inputreferats: Zunächst sollte man sich dieses Video von IBM Watson ansehen: Und hier gibt es die Daten:  https://www.ibm.com/communities/analytics/watson-analytics-blog/hr-employee-attrition/ IBM Watson kommt zu dem Schluss, dass Überstunden (OverTime) der wichtigste Faktor sind, um vorherzusagen, ob jemand das Unternehmen verlässt. Ich habe versucht, den Decision Tree nachzubauen: Dann simuliere ich mit Jackknifing, was passiert, wenn nur ein Teil der Daten zur Verfügung steht: ...

#LinearRegression in Matrix Notation for #R

Handcrafted algorithms It is a very good exercise to write your algorithms from scratch to see what is really happening. In this post I used matrix notation in R to run linear regression. Simulated data First, we need some data. I wrote a simple function to simulate our X from Y. makeX <-   function(Y, n){   X <-   matrix ( 1 ,  ncol= 1 ,  nrow =   dim (Y)[ 1 ])   for (i in  1 :n){     X1 <-   Y +   rnorm ( 100 ,  sd =   0.25 ) +   sample ( seq (- 1 , 1 , 001 ),  100 ,  replace =  T)     X <-   cbind (X, X1)   }    return (X) } One dependent variable We start with a very simple model. Y <-   matrix ( rnorm ( 100 ),  ncol= 1 ) X <-   makeX (Y, 1 ) The cool thing is that we can find the parameters P (i.e. intercept and slope) with one single matrix equation: P = (X t X) -1 X ...

#machineLearning vs. #gametheory

New paper in #SPSR „The Gas Game: Simulating Decision-Making in the EU’s External Natural Gas Policy”                                          Martina Grabau and I just published an article in Swiss Political Science Review (SPSR). Grabau, M. and Hegelich, S. (2016), The Gas Game: Simulating Decision-Making in the European Union's External Natural Gas Policy. Swiss Political Science Review. doi: 10.1111/spsr.12202 We used the "Predictioneer's Game" to simulate the EU's gas policy. Unfortunately, the codes of this simulation are not public. Therefore, we created our own model: We used fuzzing, machine learning and simple heuristics to create a model that performance as good as the predictioneer's game but we publish the codes of course: # Code to create initial test set that is suitable formated for PG # # # dfNew <- data.frame() # for(i in 1:200){ # df$Play...