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
import json, sys, collections | |
import base64 | |
from Datum import Datum | |
class FeatureData : | |
def __init__(self, words, prevLabel, position, | |
wordsDict): | |
self.w = words; | |
self.pL = prevLabel |
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
from pprint import pprint | |
import numpy as np | |
from scipy import sparse | |
from scikits.learn.grid_search import GridSearchCV | |
from scikits.learn.cross_val import StratifiedKFold | |
from scikits.learn.metrics import f1_score, classification_report | |
from scikits.learn import svm | |
from scikits.learn.linear_model import LogisticRegression | |
from scikits.learn.linear_model.sparse import LogisticRegression as SparseLogisticRegression |