This repository contains tests of the AlignmentRepa repository using data from the Ames Housing dataset compiled by Dean De Cock. Full details of the dataset are in Kaggle Data Set - House Prices: Advanced Regression Techniques. The AlignmentRepa repository is a fast Haskell implementation of some of the practicable inducers described in the paper The Theory and Practice of Induction by Alignment at https://greenlake.co.uk/.
There is an analysis of this dataset here, with sections (a) predicting sale price without modelling and (b) induced modelling of sale price.
The AMES
executables require the AlignmentRepa
module which is in the AlignmentRepa repository. See the AlignmentRepa repository for installation instructions of the Haskell compiler and libraries.
Then download the zip files or use git to get the AMES repository and the underlying Alignment and AlignmentRepa repositories -
cd
git clone https://github.com/caiks/Alignment.git
git clone https://github.com/caiks/AlignmentRepa.git
git clone https://github.com/caiks/AMES.git
The practicable model induction is described here.
AMES_engine1
runs on a Ubuntu 16.04 Pentium CPU G2030 @ 3.00GHz using 1883 MB total memory and takes 6454 seconds,
cd ../Alignment
rm *.o *.hi
cd ../AlignmentRepa
rm *.o *.hi
gcc -fPIC -c AlignmentForeign.c -o AlignmentForeign.o -O3
cd ../AMES
rm *.o *.hi
ghc -i../Alignment -i../AlignmentRepa ../AlignmentRepa/AlignmentForeign.o AMES_engine1.hs -o AMES_engine1.exe -rtsopts -O2
./AMES_engine1.exe +RTS -s >AMES_engine1.log 2>&1 &
tail -f AMES_engine1.log
To experiment with the dataset in the interpreter,
cd ../Alignment
rm *.o *.hi
cd ../AlignmentRepa
rm *.o *.hi
gcc -fPIC -c AlignmentForeign.c -o AlignmentForeign.o -O3
cd ../AMES
ghci -i../Alignment -i../AlignmentRepa ../AlignmentRepa/AlignmentForeign.o
:set -fobject-code
:l AMESDev
Then exit the interpreter,
rm AMESDev.o
ghci -i../Alignment -i../AlignmentRepa ../AlignmentRepa/AlignmentForeign.o
:l AMESDev
(uub,aab,aatrb,aateb) <- amesBucketedIO 20
let vvb = uvars uub `minus` sgl (VarStr "Id")
let vvbl = sgl (VarStr "SalePriceB")
let vvbk = vvb `minus` vvbl
let hhb = aahr uub aab `hrhrred` vvbk
let (wmax,lmax,xmax,omax,bmax,mmax,umax,pmax,fmax,mult,seed) = (2919, 8, 2919, 10, (10*3), 3, 2919, 1, 3, 3, 5)
Just (uub',dfb') <- decomperIO uub vvbk hhb wmax lmax xmax omax bmax mmax umax pmax fmax mult seed
summation mult seed uub' dfb' hhb
(19003.657461612253,8264.069987311002)
BL.writeFile ("df1.json") $ decompFudsPersistentsEncode $ decompFudsPersistent dfb'