Giter VIP home page Giter VIP logo

tdparse's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tdparse's Issues

Running tdparse+ and tdparse models

Hi,

When we execute the script as mentioned in the README, the tdparse+ (m) model gets used. Is there any way we can reproduce the results for the tdparse+ and tdparse models?

Thanks a lot!

Lower performance compared with the paper

Hi, I ran the code to reproduce the results on the data of Dong et al.. I found that the results in the paper are different from the result I tried (worse). I downloaded the data from their official link and moved them to the data directory. I also used TweeboParser to get lidong.train.conll and lidong.test.conll files.

Then, I ran the run.sh script to do CV. The command used is:

./run.sh lidong tdparse liblinear scale,tune,pred ../data/lidong/parses/lidong.train.conll ../data/lidong/parses/lidong.test.conll

The results is:

extracting features for training
(6248, 3600)
0
Parse source:  ../data/lidong/parses/lidong.train.conll
extracting features for testing
(692, 3600)
0
Parse source:  ../data/lidong/parses/lidong.test.conll
********************************************************************************
********************************************************************************
---Feature scaling
Scaling features
---Parameter tuning
When C=1e-05, acc is 0.531360, 2-class-f1 is 0.097125 and 3-class-f1 is 0.293077
When C=3e-05, acc is 0.601280, 2-class-f1 is 0.346280 and 3-class-f1 is 0.470578
When C=5e-05, acc is 0.634240, 2-class-f1 is 0.448400 and 3-class-f1 is 0.543794
When C=7e-05, acc is 0.651680, 2-class-f1 is 0.497264 and 3-class-f1 is 0.579096
When C=9e-05, acc is 0.657280, 2-class-f1 is 0.518538 and 3-class-f1 is 0.593594
When C=0.0001, acc is 0.661280, 2-class-f1 is 0.529563 and 3-class-f1 is 0.601490
When C=0.0003, acc is 0.683520, 2-class-f1 is 0.585372 and 3-class-f1 is 0.642016
When C=0.0005, acc is 0.686720, 2-class-f1 is 0.594281 and 3-class-f1 is 0.648487
When C=0.0007, acc is 0.688000, 2-class-f1 is 0.600096 and 3-class-f1 is 0.652133
When C=0.0009, acc is 0.688480, 2-class-f1 is 0.602174 and 3-class-f1 is 0.653542
When C=0.001, acc is 0.686560, 2-class-f1 is 0.601640 and 3-class-f1 is 0.652392
When C=0.003, acc is 0.682240, 2-class-f1 is 0.602399 and 3-class-f1 is 0.651145
When C=0.005, acc is 0.679680, 2-class-f1 is 0.604536 and 3-class-f1 is 0.650880
When C=0.007, acc is 0.674720, 2-class-f1 is 0.601054 and 3-class-f1 is 0.646703
When C=0.009, acc is 0.671200, 2-class-f1 is 0.598069 and 3-class-f1 is 0.643595
When C=0.01, acc is 0.669440, 2-class-f1 is 0.596605 and 3-class-f1 is 0.641960
When C=0.03, acc is 0.651520, 2-class-f1 is 0.580306 and 3-class-f1 is 0.625306
When C=0.05, acc is 0.641600, 2-class-f1 is 0.573112 and 3-class-f1 is 0.616739
When C=0.07, acc is 0.635840, 2-class-f1 is 0.569867 and 3-class-f1 is 0.612235
When C=0.09, acc is 0.629280, 2-class-f1 is 0.563507 and 3-class-f1 is 0.605964
When C=0.1, acc is 0.626400, 2-class-f1 is 0.560738 and 3-class-f1 is 0.603180
When C=0.3, acc is 0.608960, 2-class-f1 is 0.544979 and 3-class-f1 is 0.587095
When C=0.5, acc is 0.601440, 2-class-f1 is 0.535666 and 3-class-f1 is 0.579105
When C=0.7, acc is 0.600480, 2-class-f1 is 0.533680 and 3-class-f1 is 0.577613
When C=0.9, acc is 0.591840, 2-class-f1 is 0.531436 and 3-class-f1 is 0.572010
When C=1.0, acc is 0.595040, 2-class-f1 is 0.532123 and 3-class-f1 is 0.573961
When C=3.0, acc is 0.588960, 2-class-f1 is 0.528539 and 3-class-f1 is 0.569136
When C=5.0, acc is 0.589440, 2-class-f1 is 0.529499 and 3-class-f1 is 0.569597
When C=7.0, acc is 0.588480, 2-class-f1 is 0.527653 and 3-class-f1 is 0.568528
When C=9.0, acc is 0.589280, 2-class-f1 is 0.528592 and 3-class-f1 is 0.569407

Five-fold CV on ../data/lidong/output/train.scale, the best accuracy is 0.688480 at c=0.000900
---Model fitting and prediction
Macro-F1 score:  0.662785519652
Accuracy score:  0.695086705202
Macro-F1 score (2 classes): 0.614282718121
********************************************************************************

Five-fold CV on ../data/lidong/output/train.scale, the best 3classf1 is 0.653542 at c=0.000900
---Model fitting and prediction
Macro-F1 score:  0.662785519652
Accuracy score:  0.695086705202
Macro-F1 score (2 classes): 0.614282718121
********************************************************************************

Five-fold CV on ../data/lidong/output/train.scale, the best 2classf1 is 0.604536 at c=0.005000
---Model fitting and prediction
Macro-F1 score:  0.677383882802
Accuracy score:  0.702312138728
Macro-F1 score (2 classes): 0.636346094474
********************************************************************************

In the paper, the accuracy and 3 classes macro-F1 score are 72.5 and 70.3 respectively on the data of Dong et al.. However I got 70.2 and 67.7 as shown above.

Is there anything wrong or missing from my attempt?

Very thanks

How can I use the data of election as lidong?

Hi, I have downloaded the data of election you provided. How can I use is as lidong? Because the format is different. Can you tell me how to preprocess the data of election? Thanks!

looking for the files can't open file ../data/election/output/training

I get this and not sure how to fix it:

[jalal@goku src]$ ./run.sh election naiveseg sklearnSVM
extracting features for training
election training data
Traceback (most recent call last):
  File "naive-seg.py", line 430, in <module>
    main(args.d)
  File "naive-seg.py", line 413, in main
    x_train,y_train,id_train=features.elecfeat('../data/'+d+'/training/')
  File "naive-seg.py", line 401, in elecfeat
    x=x.reshape((len(y),len(x)/len(y)))
ZeroDivisionError: integer division or modulo by zero
/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
  "This module will be removed in 0.20.", DeprecationWarning)
********************************************************************************
********************************************************************************
---Feature scaling
Scaling features
can't open file ../data/election/output/training
can't open file ../data/election/output/testing
loading features for training
loading features for testing
cross-validation
Traceback (most recent call last):
  File "sklearnSVM.py", line 103, in <module>
    main(output_dir)
  File "sklearnSVM.py", line 81, in main
    clf = CV(x_train, y_train) # Comment this if parameter tuning is not desired
  File "sklearnSVM.py", line 51, in CV
    grid_search.fit(x_train, y_train)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/model_selection/_search.py", line 639, in fit
    cv.split(X, y, groups)))
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py", line 779, in __call__
    while self.dispatch_one_batch(iterator):
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py", line 625, in dispatch_one_batch
    self._dispatch(tasks)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py", line 588, in _dispatch
    job = self._backend.apply_async(batch, callback=cb)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/_parallel_backends.py", line 111, in apply_async
    result = ImmediateResult(func)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/_parallel_backends.py", line 332, in __init__
    self.results = batch()
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py", line 131, in __call__
    return [func(*args, **kwargs) for func, args, kwargs in self.items]
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/model_selection/_validation.py", line 458, in _fit_and_score
    estimator.fit(X_train, y_train, **fit_params)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/svm/classes.py", line 227, in fit
    dtype=np.float64, order="C")
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/utils/validation.py", line 573, in check_X_y
    ensure_min_features, warn_on_dtype, estimator)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/utils/validation.py", line 462, in check_array
    context))
ValueError: Found array with 0 sample(s) (shape=(0, 1)) while a minimum of 1 is required.

Error in running liblinear.py

Hi @bluemonk482

I tried to run your code using the instructions specified mentioned in your readme. I also have the gensim version as 1.0.1 as mentioned by you here. I face the following error and was unable to fix this:

Traceback (most recent call last):
  File "tdparse.py", line 531, in <module>
    main(args.d, args.conll1, args.conll2)
  File "tdparse.py", line 502, in main
    features=targettw()
  File "tdparse.py", line 114, in __init__
    self.w2v=gensim.models.Word2Vec.load(w2vf) 
  File "/home/ankita/.local/lib/python2.7/site-packages/gensim/models/word2vec.py", line 975, in load
    return super(Word2Vec, cls).load(*args, **kwargs)
  File "/home/ankita/.local/lib/python2.7/site-packages/gensim/models/base_any2vec.py", line 629, in load
    model = super(BaseWordEmbeddingsModel, cls).load(*args, **kwargs)
  File "/home/ankita/.local/lib/python2.7/site-packages/gensim/models/base_any2vec.py", line 278, in load
    return super(BaseAny2VecModel, cls).load(fname_or_handle, **kwargs)
  File "/home/ankita/.local/lib/python2.7/site-packages/gensim/utils.py", line 426, in load
    obj._load_specials(fname, mmap, compress, subname)
  File "/home/ankita/.local/lib/python2.7/site-packages/gensim/utils.py", line 469, in _load_specials
    setattr(self, attrib, val)
  File "/home/ankita/.local/lib/python2.7/site-packages/gensim/utils.py", line 1396, in new_func1
    stacklevel=2
DeprecationWarning: Call to deprecated `syn1` (Attribute will be removed in 4.0.0, use self.trainables.syn1 instead).
/home/ankita/.local/lib/python2.7/site-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
  "This module will be removed in 0.20.", DeprecationWarning)
********************************************************************************
********************************************************************************
---Feature scaling
Scaling features
---Parameter tuning
/home/ankita/.local/lib/python2.7/site-packages/numpy/lib/function_base.py:1128: RuntimeWarning: Mean of empty slice.
  avg = a.mean(axis)
/home/ankita/.local/lib/python2.7/site-packages/numpy/core/_methods.py:80: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
Traceback (most recent call last):
  File "liblinear.py", line 182, in <module>
    main(output_dir, args.ci, args.p)
  File "liblinear.py", line 138, in main
    tunec = TUNE(trfile,cv_trfile,cv_tfile,cv_pfile,cv_truey,id_train)
  File "liblinear.py", line 110, in TUNE
    tunec.append([ci] + CV(str(ci),trfile,cv_trfile,cv_tfile,cv_pfile,cv_truey,id_train))
  File "liblinear.py", line 83, in CV
    f1_two_list.append((metrics.f1_score(y_test, y_predicted, average=None)[0]+metrics.f1_score(y_test, y_predicted, average=None)[-1])/2)
IndexError: index 0 is out of bounds for axis 0 with size 0

Can you please guide me to solve this issue, Thanks!

IndexError: index 0 is out of bounds for axis 0 with size 0

What am I missing?

[jalal@goku src]$ mkdir -p ../data/lidong/output/cv
[jalal@goku src]$ ./run.sh lidong tdparse liblinear scale,tune,pred ../data/lidong/parses/lidong.train.conll ../data/lidong/parses/lidong.test.conll
Traceback (most recent call last):
  File "tdparse.py", line 531, in <module>
    main(args.d, args.conll1, args.conll2)
  File "tdparse.py", line 502, in main
    features=targettw()
  File "tdparse.py", line 114, in __init__
    self.w2v=gensim.models.Word2Vec.load(w2vf) 
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/gensim/models/word2vec.py", line 975, in load
    return super(Word2Vec, cls).load(*args, **kwargs)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/gensim/models/base_any2vec.py", line 629, in load
    model = super(BaseWordEmbeddingsModel, cls).load(*args, **kwargs)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/gensim/models/base_any2vec.py", line 278, in load
    return super(BaseAny2VecModel, cls).load(fname_or_handle, **kwargs)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/gensim/utils.py", line 426, in load
    obj._load_specials(fname, mmap, compress, subname)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/gensim/utils.py", line 469, in _load_specials
    setattr(self, attrib, val)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/gensim/utils.py", line 1396, in new_func1
    stacklevel=2
DeprecationWarning: Call to deprecated `syn1` (Attribute will be removed in 4.0.0, use self.trainables.syn1 instead).
/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
  "This module will be removed in 0.20.", DeprecationWarning)
********************************************************************************
********************************************************************************
---Feature scaling
Scaling features
can't open file ../data/lidong/output/training
can't open file ../data/lidong/output/testing
---Parameter tuning
/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/numpy/lib/function_base.py:1110: RuntimeWarning: Mean of empty slice.
  avg = a.mean(axis)
/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/numpy/core/_methods.py:80: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
Traceback (most recent call last):
  File "liblinear.py", line 182, in <module>
    main(output_dir, args.ci, args.p)
  File "liblinear.py", line 138, in main
    tunec = TUNE(trfile,cv_trfile,cv_tfile,cv_pfile,cv_truey,id_train)
  File "liblinear.py", line 110, in TUNE
    tunec.append([ci] + CV(str(ci),trfile,cv_trfile,cv_tfile,cv_pfile,cv_truey,id_train))
  File "liblinear.py", line 83, in CV
    f1_two_list.append((metrics.f1_score(y_test, y_predicted, average=None)[0]+metrics.f1_score(y_test, y_predicted, average=None)[-1])/2)
IndexError: index 0 is out of bounds for axis 0 with size 0
[jalal@goku src]$ 


File "/scratch2/debate_tweets/sentiment/tdparse/src/utilities.py", line 175, in traversaltree positions = [[item for sublist in traversal.bfs_successors(G, target_position).values() for item in sublist] for target_position in target_positions] AttributeError: 'generator' object has no attribute 'values'

I installed gensim1.0.1 and now I have this error

[jalal@goku src]$  ./run.sh lidong tdparse liblinear scale,tune,pred ../data/lidong/parses/lidong.train.conll ../data/lidong/parses/lidong.test.conll
extracting features for training
Traceback (most recent call last):
  File "tdparse.py", line 531, in <module>
    main(args.d, args.conll1, args.conll2)
  File "tdparse.py", line 505, in main
    x_train,y_train=features.lidongfeat('../data/'+d+'/training/', train_conllpath)
  File "tdparse.py", line 436, in lidongfeat
    subtw, target_position, emp = traversaltree(conll[a],target,emp,'cmu') #returns relevant words to the target
  File "/scratch2/debate_tweets/sentiment/tdparse/src/utilities.py", line 175, in traversaltree
    positions = [[item for sublist in traversal.bfs_successors(G, target_position).values() for item in sublist] for target_position in target_positions]
AttributeError: 'generator' object has no attribute 'values'
/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
  "This module will be removed in 0.20.", DeprecationWarning)
********************************************************************************
********************************************************************************
---Feature scaling
Scaling features
---Parameter tuning
/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/numpy/lib/function_base.py:1110: RuntimeWarning: Mean of empty slice.
  avg = a.mean(axis)
/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/numpy/core/_methods.py:80: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
Traceback (most recent call last):
  File "liblinear.py", line 182, in <module>
    main(output_dir, args.ci, args.p)
  File "liblinear.py", line 138, in main
    tunec = TUNE(trfile,cv_trfile,cv_tfile,cv_pfile,cv_truey,id_train)
  File "liblinear.py", line 110, in TUNE
    tunec.append([ci] + CV(str(ci),trfile,cv_trfile,cv_tfile,cv_pfile,cv_truey,id_train))
  File "liblinear.py", line 83, in CV
    f1_two_list.append((metrics.f1_score(y_test, y_predicted, average=None)[0]+metrics.f1_score(y_test, y_predicted, average=None)[-1])/2)
IndexError: index 0 is out of bounds for axis 0 with size 0
[jalal@goku src]$ conda list gensim
# packages in environment at /scratch/sjn-p2/anaconda/anaconda2:
#
# Name                    Version                   Build  Channel
gensim                    1.0.1                     <pip>

How can I run your code on a single sentence and get results?

ValueError: Found array with 0 sample(s) (shape=(0, 1)) while a minimum of 1 is required.

I get this error running your code:

[jalal@goku src]$ ./run.sh election naiveseg sklearnSVM
Traceback (most recent call last):
  File "naive-seg.py", line 430, in <module>
    main(args.d)
  File "naive-seg.py", line 407, in main
    features=targettw()
  File "naive-seg.py", line 49, in __init__
    self.w2v=gensim.models.Word2Vec.load(w2vf) 
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/gensim/models/word2vec.py", line 975, in load
    return super(Word2Vec, cls).load(*args, **kwargs)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/gensim/models/base_any2vec.py", line 629, in load
    model = super(BaseWordEmbeddingsModel, cls).load(*args, **kwargs)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/gensim/models/base_any2vec.py", line 278, in load
    return super(BaseAny2VecModel, cls).load(fname_or_handle, **kwargs)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/gensim/utils.py", line 426, in load
    obj._load_specials(fname, mmap, compress, subname)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/gensim/utils.py", line 469, in _load_specials
    setattr(self, attrib, val)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/gensim/utils.py", line 1396, in new_func1
    stacklevel=2
DeprecationWarning: Call to deprecated `syn1` (Attribute will be removed in 4.0.0, use self.trainables.syn1 instead).
/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
  "This module will be removed in 0.20.", DeprecationWarning)
********************************************************************************
********************************************************************************
---Feature scaling
Scaling features
can't open file ../data/election/output/training
can't open file ../data/election/output/testing
loading features for training
loading features for testing
cross-validation
Traceback (most recent call last):
  File "sklearnSVM.py", line 103, in <module>
    main(output_dir)
  File "sklearnSVM.py", line 81, in main
    clf = CV(x_train, y_train) # Comment this if parameter tuning is not desired
  File "sklearnSVM.py", line 51, in CV
    grid_search.fit(x_train, y_train)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/model_selection/_search.py", line 639, in fit
    cv.split(X, y, groups)))
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py", line 779, in __call__
    while self.dispatch_one_batch(iterator):
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py", line 625, in dispatch_one_batch
    self._dispatch(tasks)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py", line 588, in _dispatch
    job = self._backend.apply_async(batch, callback=cb)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/_parallel_backends.py", line 111, in apply_async
    result = ImmediateResult(func)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/_parallel_backends.py", line 332, in __init__
    self.results = batch()
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py", line 131, in __call__
    return [func(*args, **kwargs) for func, args, kwargs in self.items]
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/model_selection/_validation.py", line 458, in _fit_and_score
    estimator.fit(X_train, y_train, **fit_params)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/svm/classes.py", line 227, in fit
    dtype=np.float64, order="C")
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/utils/validation.py", line 573, in check_X_y
    ensure_min_features, warn_on_dtype, estimator)
  File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/sklearn/utils/validation.py", line 462, in check_array
    context))
ValueError: Found array with 0 sample(s) (shape=(0, 1)) while a minimum of 1 is required.
[jalal@goku src]$ 

I have

[jalal@goku src]$ which python
/scratch/sjn-p2/anaconda/anaconda2/bin/python
[jalal@goku src]$ python -V
Python 2.7.14 :: Anaconda custom (64-bit)
[jalal@goku src]$ ls ../data/election/
.gitignore          4479563.zip         annotations/        output/             train_id.txt        tweets.tar.gz       
4479563/            README              annotations.tar.gz  test_id.txt         tweets/  

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.