File:Echantillonnage-preferentiel.svg
Size of this PNG preview of this SVG file: 720 × 540 pixels. Other resolutions: 320 × 240 pixels | 640 × 480 pixels | 1,024 × 768 pixels | 1,280 × 960 pixels | 2,560 × 1,920 pixels.
Original file (SVG file, nominally 720 × 540 pixels, file size: 36 KB)
File information
Structured data
Captions
DescriptionEchantillonnage-preferentiel.svg |
English: A triangular distribution on [0,1] |
Date | |
Source | Own work |
Author | David Kremer |
Permission (Reusing this file) |
This file is licensed under the Creative Commons Attribution 3.0 Unported license. Attribution: David Kremer
|
SVG development InfoField | This plot was created with Matplotlib. |
Source code InfoField | Python code>>> from scipy import special
>>> special.beta(
... )
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid number of arguments
>>> special.beta(5,3)
0.0095238095238095247
>>> 1/105.
0.009523809523809525
>>> special.betainc(5,3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid number of arguments
>>> special.betainc(5,3,0.5)
0.22656249999999992
>>> from pylab import *
>>> x = arange(0,1,1e-4)
>>> y = special.betainc(5,3,x)
>>> plot(x,y)
[<matplotlib.lines.Line2D object at 0x99e79ac>]
>>> title("Gamma distribution of parameters 5,3")
<matplotlib.text.Text object at 0x9869fac>
>>> xlabel ("x")
<matplotlib.text.Text object at 0x9856ccc>
>>> ylabel("$\int_{0}^{x}x^{4}(1-x)^2 dx$")
<matplotlib.text.Text object at 0x985db0c>
>>> show()
>>> y2 = [][:6666] ]
>>> y2.join( [][6666:] ] )
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'list' object has no attribute 'join'
>>> y2.append( [][6666:] ] )
>>> plot(x,y2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/matplotlib/pyplot.py", line 2287, in plot
ret = ax.plot(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/matplotlib/axes.py", line 3771, in plot
for line in self._get_lines(*args, **kwargs):
File "/usr/lib/python2.7/site-packages/matplotlib/axes.py", line 317, in _grab_next_args
for seg in self._plot_args(remaining, kwargs):
File "/usr/lib/python2.7/site-packages/matplotlib/axes.py", line 287, in _plot_args
y = np.atleast_1d(tup[-1])
File "/usr/lib/python2.7/site-packages/numpy/core/shape_base.py", line 47, in atleast_1d
res.append(array(ary,copy=False,subok=True,ndmin=1))
ValueError: setting an array element with a sequence.
>>> len(y2)
6667
>>> help(y2)
>>> y2.remove(-1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: list.remove(x): x not in list
>>> del y2[-1]
>>> len(y2)
6666
>>> y2.extend( [][6666:] ] )
>>> len(y2)
10000
>>> len(x)
10000
>>> plot(x,y2)
[<matplotlib.lines.Line2D object at 0x9eca24c>]
>>> title('$x$')
<matplotlib.text.Text object at 0x9cc5aac>
>>> title('Echantillonnage preferentiel')
<matplotlib.text.Text object at 0x9cc5aac>
>>> xlabel("$x$")
<matplotlib.text.Text object at 0x944578c>
>>> ylabel("$f^{*}(x)$")
<matplotlib.text.Text object at 0x9cbcacc>
>>> show()
>>> y3 = [ r**4 * (1-r)**2 for r in x ]
>>> plot(x,y3);title("Integrand $x^4(1-x)^2$");xlabel("x");ylabel("$y=x^4(1-x)^2$")
[<matplotlib.lines.Line2D object at 0x986972c>]
<matplotlib.text.Text object at 0x99dd50c>
<matplotlib.text.Text object at 0x9ec8d4c>
<matplotlib.text.Text object at 0x9cc528c>
>>> show()
|
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 08:42, 6 November 2010 | 720 × 540 (36 KB) | Okiokiyuki (talk | contribs) | {{Information |Description={{en|1=A triangular distribution on [0,1]}} |Source=>>> from scipy import special >>> special.beta( ... ) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid number of arguments >>> speci |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on fr.wikipedia.org