This file contains hidden or 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 | |
import svmlight_loader | |
from sklearn.ensemble import GradientBoostingRegressor | |
from time import time | |
ROOT_DIR = '/home/pprett/corpora/yahoo-ltrc-2010/data' | |
X_train, y_train = svmlight_loader.load_svmlight_file(ROOT_DIR + '/set1.train.txt', | |
n_features=700, |
This file contains hidden or 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
""" | |
Benchmark script to bench R's gbm package via rpy2. | |
NOTE:: | |
make sure you run | |
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64/R/lib | |
""" |
This file contains hidden or 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
"""High difference in classifier accuracies with LinearSVC and SVC. | |
Get data.npz from [1]. | |
[1] https://docs.google.com/leaf?id=0B1BhwRZOwyxRZTcxZDA1OWMtZjZkMy00YjgxLWI3ZTMtZjJkNGIyODAyOTQy&hl=en_US | |
""" | |
print __doc__ | |
import numpy as np | |
from functools import partial |
This file contains hidden or 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
#!/usr/bin/python | |
import sys | |
import numpy as np | |
from pprint import pprint | |
from scikits.learn.cross_val import StratifiedKFold | |
from scikits.learn.grid_search import GridSearchCV | |
from scikits.learn import svm | |
from scikits.learn.metrics import zero_one_score, f1_score, classification_report |
This file contains hidden or 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
from __future__ import division | |
import gc | |
import numpy as np | |
from time import sleep | |
from ext.joblib import Parallel, delayed | |
from multiprocessing import Process, current_process | |
from scikits.learn import svm, linear_model | |
This file contains hidden or 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
#!/usr/bin/python | |
""" | |
Run python checkerboards.py | |
Example from: | |
M. Hein (2009). Binary Classification under Sample Selection Bias, In Dataset Shift in Machine Learning, chap. 3, pp. 41-64. The MIT Press. | |
""" | |
from __future__ import division | |
import matplotlib |
This file contains hidden or 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
#!/usr/bin/python | |
"""Creates the product category dataset from the Cross-Lingual | |
Sentiment dataset [1]. The output can be used directly with the | |
CLSCL reference implementation in NUT [2]. | |
Usage: | |
./mk_product_cat_dataset.py {en|de|fr|jp} {train|test|unlabeled} output_dir num_docs |
This file contains hidden or 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
""" | |
========== | |
Libsvm GUI | |
========== | |
A simple graphical frontend for Libsvm mainly intended for didactic | |
purposes. You can create data points by point and click and visualize | |
the decision region induced by different kernels and parameter settings. | |
To create positive examples click the left mouse button; to create |
NewerOlder