Giter VIP home page Giter VIP logo

westclass's People

Contributors

yumeng5 avatar

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  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  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  avatar

westclass's Issues

why pretrained model is not used for training in self-training stage?

Hi yumeng,
Thanks for your great work! But I have a question in the 'fit' function: https://github.com/yumeng5/WeSTClass/blob/master/model.py#L222

self.classfier is only used to get the 'y_pred_last' in the first iteration, for checking stop conditions, and you only use self.model for training. We know that self.classfier is the model pretrained in the pretraining stage, so why self.classfier is not used during self-training?

TypeError: argument of type 'Word2Vec' is not iterable

running command: python main.py --dataset yelp --sup_source docs --model cnn
i'm getting this error: ### Input preparation ###
Loading existing Word2Vec model ./yelp/embedding...
Traceback (most recent call last):
File "main.py", line 185, in
embedding_weights = train_word2vec(x, vocabulary_inv, args.dataset)
File "main.py", line 46, in train_word2vec
for key, word in vocabulary_inv.items()}
File "main.py", line 46, in
for key, word in vocabulary_inv.items()}
TypeError: argument of type 'Word2Vec' is not iterable

Issue arrises when words in the class list are not in the dataset

First off, thanks for open sourcing the code!

I am trying to topic model with my own dataset. I set it up to look like the yelp dataset and modify the code accordingly. However, an error

Traceback (most recent call last):
  File "main.py", line 200, in <module>
    word_sup_array = np.array([np.array([vocabulary[word] for word in word_class_list]) for word_class_list in word_sup_list])
  File "main.py", line 200, in <listcomp>
    word_sup_array = np.array([np.array([vocabulary[word] for word in word_class_list]) for word_class_list in word_sup_list])
  File "main.py", line 200, in <listcomp>
    word_sup_array = np.array([np.array([vocabulary[word] for word in word_class_list]) for word_class_list in word_sup_list])
KeyError: 'algebra_and_number_theory'

is thrown on the following line:

word_sup_array = np.array([np.array([vocabulary[word] for word in word_class_list]) for word_class_list in word_sup_list])

It looks like this is because one of my provided class names (algebra_and_number_theory) in ${dataset}/classes.txt is not contained within the vocabulary.

I am confused as to wether this is my fault or a bug in the code? I wouldn't expect class names to be in the vocabulary, so I am leaning toward the latter. In either case, any help would be much appreciated!

The package version

Could you please share the package version of sklearn, tensorflow and keras?

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.