Skip to content

Instantly share code, notes, and snippets.

alyato /
Created November 29, 2018 07:23 — forked from pratos/
Install xgboost for Python in Ubuntu

Clone the recursive repo for xgboost

git clone --recursive
cd xgboost
make -j4

cd in the folder: xgboost/python-package


  • CC Mode, 写C/C++代码, 管理缩进,高亮
  • Cperl Mode, 写Perl代码, 比Perl Mode更强.
  • Python Mode
  • eshell, M-x shell RET
  • Diff Mode / Ediff Mode, 看diff, 做merge操作.
  • VC, 与版本管理系统相接合,支持CVS, SVN, Git etc.
  • Hippie Expand, M-/
  • Dired Mode, 文件, 目录管理. copy, mv, rename. create
alyato /
Created August 5, 2016 13:42 — forked from pyben/
import numpy as np
from keras.datasets import imdb
from keras.preprocessing.sequence import pad_sequences
from keras.models import Sequential
from keras.layers import containers
from keras.layers.noise import GaussianNoise
from keras.layers.core import Dense, AutoEncoder
from keras.utils import np_utils
from sklearn.metrics import (precision_score, recall_score,

Training phase

20000 training instances The number of support vectors is around 15000, which means that most of the training data are near the separating hyper-plane. The training accuracy is around 80%

Test on full data

  • Accuracy = 52.3734% (662/1264) (classification)
  • Accuracy = 62.5791% (791/1264) (classification)
  • Accuracy = 61.0759% (772/1264) (classification)
  • Accuracy = 60.9968% (771/1264) (classification)