Comments (5)
This would need debugging. You're calling Python3.6 from ~/anaconda2? I suspect the Python installation could have issues.
from wordbatch.
I am running python 3.6 in a python virtual environment. All other kaggle scripts seem to run well in this environment. Please look at https://conda.io/docs/user-guide/tasks/manage-environments.html for how this environment was created.
from wordbatch.
I have same problem((
wb = wordbatch.WordBatch(normalize_text, extractor=(WordBag, {"hash_ngrams": 2, "hash_ngrams_weights": [1.5, 1.0], "hash_size": 2 ** 29, "norm": None, "tf": 'binary', "idf": None, }), procs=4) wb.dictionary_freeze= True wb.fit(merge['name'])
TypeError Traceback (most recent call last)
in ()
----> 1 wb.fit(merge['name'])/mnt/SSD/dzikr/env_python_3/env_p_3.6/lib/python3.6/site-packages/wordbatch/wordbatch.py in fit(self, texts, labels, return_texts, input_split, merge_output)
211 if self.verbose > 0: print("Normalize text")
212 if self.normalize_text != None:
--> 213 texts= self.normalize_texts(texts, input_split= input_split, merge_output= False)
214 input_split= True
215 if self.spellcor_count> 0 or self.stemmer!=None:/mnt/SSD/dzikr/env_python_3/env_p_3.6/lib/python3.6/site-packages/wordbatch/wordbatch.py in normalize_texts(self, texts, input_split, merge_output)
179 def normalize_texts(self, texts, input_split=False, merge_output=True):
180 texts2= self.parallelize_batches(self.procs, batch_normalize_texts, texts, [self.normalize_text],
--> 181 input_split=input_split, merge_output=merge_output)
182 #if self.use_sc==False: return [item for sublist in texts2 for item in sublist]
183 return texts2/mnt/SSD/dzikr/env_python_3/env_p_3.6/lib/python3.6/site-packages/wordbatch/wordbatch.py in parallelize_batches(self, procs, task, data, args, method, timeout, rdd_col, input_split, merge_output, minibatch_size)
301 attempt= 0
302 if not(input_split):
--> 303 paral_params= [[data_batch]+ args for data_batch in self.split_batches(data, minibatch_size)]
304 else:
305 paral_params= [[data_batch]+ args for data_batch in data]/mnt/SSD/dzikr/env_python_3/env_p_3.6/lib/python3.6/site-packages/wordbatch/wordbatch.py in split_batches(self, data, minibatch_size)
274 else: len_data= data.shape[0]
275 if minibatch_size> len_data: minibatch_size= len_data
--> 276 if data_type == pd.DataFrame:
277 data_split = [data.iloc[x * minibatch_size:(x + 1) * minibatch_size] for x in
278 range(int(ceil(len_data / minibatch_size)))]/mnt/SSD/dzikr/env_python_3/env_p_3.6/lib/python3.6/site-packages/pandas/core/ops.py in f(self, other)
1326 return self._compare_frame(other, func, str_rep)
1327 elif isinstance(other, ABCSeries):
-> 1328 return self._combine_series_infer(other, func, try_cast=False)
1329 else:
1330/mnt/SSD/dzikr/env_python_3/env_p_3.6/lib/python3.6/site-packages/pandas/core/frame.py in _combine_series_infer(self, other, func, level, fill_value, try_cast)
3946 def _combine_series_infer(self, other, func, level=None,
3947 fill_value=None, try_cast=True):
-> 3948 if len(other) == 0:
3949 return self * np.nan
3950TypeError: object of type 'type' has no len()
from wordbatch.
I'll need sample data to debug this case.
from wordbatch.
You can download sample of data from competition
Mercari Price Suggestion Challenge on Kaggle
from wordbatch.
Related Issues (20)
- WordVec extractor failing due to decode error HOT 1
- cannot install on windows 8.1 HOT 4
- "Illegal operation" when importing wordbatch.extractors HOT 2
- Licensing for commercial use without open source? HOT 1
- Tried to pickle the fitted wordbatch model, but bumped into this Error: AttributeError: 'function' object has no attribute 'im_self' HOT 3
- Import FTRL fails HOT 1
- Error on trying to import FM_FTRL HOT 1
- predict() takes a very long time HOT 1
- from wordbatch.data_utils import * HOT 3
- IndexError: too many indices for array HOT 1
- Illegal instruction (core dumped) HOT 1
- TypeError: only size-1 arrays can be converted to Python scalars (Windows, Python 3.5) HOT 1
- Multiprocessing Hanging in Python 3.6+ HOT 7
- are this times normal? HOT 2
- AttributeError: Can't get attribute 'normalize_text' on <module '__main__'> HOT 1
- About Wordbatch HOT 2
- pip install wordbatch on macos---error: command 'gcc-7' failed with exit status 1
- 'tuple' object has no attribute 'transform' HOT 3
- cross validation and grid search HOT 3
- will it work for Windows ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordbatch.