Comments (3)
Resolved by #117
from eland.
Still an issue with histograms and categorical columns:
feature='international plan'
df[df.churn==0][feature].hist(density=True, alpha=0.5)
df[df.churn==1][feature].hist(density=True, alpha=0.5)
plt.show()
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-13-7bbc4512e82d> in <module>
1 feature='international plan'
2
----> 3 df[df.churn==0][feature].hist(density=True, alpha=0.5)
4 df[df.churn==1][feature].hist(density=True, alpha=0.5)
5 plt.show()
~/PycharmProjects/eland/eland/plotting/_core.py in ed_hist_series(self, by, ax, grid, xlabelsize, xrot, ylabelsize, yrot, figsize, bins, **kwds)
57 figsize=figsize,
58 bins=bins,
---> 59 **kwds
60 )
61
~/PycharmProjects/eland/eland/plotting/_matplotlib/hist.py in hist_series(self, by, ax, grid, xlabelsize, xrot, ylabelsize, yrot, figsize, bins, **kwds)
56 self_weights = self_weights.squeeze()
57
---> 58 ax.hist(self_bins[:-1], bins=self_bins, weights=self_weights, **kwds)
59 ax.grid(grid)
60 axes = np.array([ax])
~/anaconda3/envs/eland/lib/python3.7/site-packages/matplotlib/__init__.py in inner(ax, data, *args, **kwargs)
1599 def inner(ax, *args, data=None, **kwargs):
1600 if data is None:
-> 1601 return func(ax, *map(sanitize_sequence, args), **kwargs)
1602
1603 bound = new_sig.bind(ax, *args, **kwargs)
~/anaconda3/envs/eland/lib/python3.7/site-packages/matplotlib/axes/_axes.py in hist(self, x, bins, range, density, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, normed, **kwargs)
6765 # this will automatically overwrite bins,
6766 # so that each histogram uses the same bins
-> 6767 m, bins = np.histogram(x[i], bins, weights=w[i], **hist_kwargs)
6768 m = m.astype(float) # causes problems later if it's an int
6769 if mlast is None:
<__array_function__ internals> in histogram(*args, **kwargs)
~/anaconda3/envs/eland/lib/python3.7/site-packages/numpy/lib/histograms.py in histogram(a, bins, range, normed, weights, density)
793 a, weights = _ravel_and_check_weights(a, weights)
794
--> 795 bin_edges, uniform_bins = _get_bin_edges(a, bins, range, weights)
796
797 # Histogram is an integer or a float array depending on the weights.
~/anaconda3/envs/eland/lib/python3.7/site-packages/numpy/lib/histograms.py in _get_bin_edges(a, bins, range, weights)
436
437 else:
--> 438 raise ValueError('`bins` must be 1d, when an array')
439
440 if n_equal_bins is not None:
ValueError: `bins` must be 1d, when an array
from eland.
@sethmlarson / @stevedodson Can you please summarize on what exactly the issue is? 😃
from eland.
Related Issues (20)
- Add model JinaBertForMaskedLM to the supported list. HOT 1
- Investigate model test failures in CI
- `RandomForestClassifier` model cannot be uploaded HOT 7
- A possible issue with eland.Dataframe.value_counts(), the statistical information is missing some values
- Is there a way to return _scores when using es_query or es_match?
- [NLP] Unable to install eland[pytorch] using pip due to unable to find matching pytorch HOT 2
- Cannot append fields of type "dense vectorfield type
- Cannot append fields of type "dense_vector" to an existing index HOT 1
- why openai/clip-vit-base-patch32 model not support ! HOT 2
- support adding cert path to eland_import_hub_model script HOT 4
- Feedback 🗣️
- Failed to import huggingface model: cardiffnlp/twitter-roberta-base-sentiment HOT 1
- Upgrade PyTorch to version 2.1.2 and
- Support Python 3.11 HOT 1
- Conda downgrades Elasticsearch when installing eland HOT 1
- Learning to rank tests failing
- More error information is needed when using pandas_to_eland()
- Support for TaylorAI/gte-tiny
- DataFrame(serverless_client) fails with `TypeError: 'Elasticsearch' object is not iterable`
- Support for importing model HOT 4
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 eland.