serapieum-of-alex / statista Goto Github PK
View Code? Open in Web Editor NEWExtreme value statistics
Home Page: https://github.com/Serapieum-of-alex/statista
License: GNU General Public License v3.0
Extreme value statistics
Home Page: https://github.com/Serapieum-of-alex/statista
License: GNU General Public License v3.0
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
after installing the package, not able to import it
Screenshots
___________________ ERROR collecting tests/test_plot_map.py ____________________ ImportError while importing test module '/home/runner/work/cleopatra/cleopatra/tests/test_plot_map.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/share/miniconda3/lib/python3.9/importlib/__init__.py:1[27](https://github.com/MAfarrag/cleopatra/runs/6661943937?check_suite_focus=true#step:6:28): in import_module return _bootstrap._gcd_import(name[level:], package, level) tests/test_plot_map.py:9: in <module> from cleopatra.map import Map cleopatra/__init__.py:33: in <module> import cleopatra.map cleopatra/map.py:20: in <module> from statista.tools import Tools as ST E ModuleNotFoundError: No module named 'statista'
Additional context
Add any other context about the problem here.
move this part to the constructor method for the PlottingPosition class and convert the weibul method normal method instead of static method
[statista] statista/distributions.py (Lines 73-74)
data = np.array(data)
data.sort()
Open in IDE · Open on GitHub
[statista] statista/distributions.py (Lines 32-33)
def __init__(self):
pass
Created from JetBrains using CodeStream
the probability_plot
function differs from the GEV and the Gumbel distributions (especially in the method, n_samples, and func parameters) and needs to be unified
[statista] statista/distributions.py (Lines 1382-1395)
def probability_plot(
self,
parameters: Dict[str, Union[float, Any]],
cdf: Union[np.ndarray, list],
alpha: Number = 0.1,
func: Callable = None,
method: str = "lmoments",
n_samples=100,
fig1_size=(10, 5),
fig2_size=(6, 6),
xlabel="Actual data",
ylabel="cdf",
fontsize=15,
):
Created from JetBrains using CodeStream
This plotting part is repeated in all distribution but is not yet passed upstream to the abstract class method because of the
[statista] statista/distributions.py (Lines 977-994)
if plot_figure:
Qx = np.linspace(
float(self.data_sorted[0]), 1.5 * float(self.data_sorted[-1]), 10000
)
pdf_fitted = self.pdf(parameters, actualdata=Qx)
fig, ax = Plot.pdf(
Qx,
pdf_fitted,
self.data_sorted,
figsize=figsize,
xlabel=xlabel,
ylabel=ylabel,
fontsize=fontsize,
)
return pdf, fig, ax
else:
return pdf
Created from JetBrains using CodeStream
replace the individual keyword arguments to one single dictionary positional argument.
parameters = {"loc", val, "scale": val}
[statista] statista/distributions.py (Lines 626-639)
def get_rp(self, loc, scale, data):
"""getRP.
getRP calculates the return period for a list/array of values or a single value.
Parameters
----------
data:[list/array/float]
value you want the coresponding return value for
loc: [float]
location parameter
scale: [float]
scale parameter
Created from JetBrains using CodeStream
move this part to the constructor method for the PlottingPosition class and convert the weibul method normal method instead of static method
[statista] statista/distributions.py (Lines 73-74)
data = np.array(data)
data.sort()
Open in IDE · Open on GitHub
[statista] statista/distributions.py (Lines 32-33)
def __init__(self):
pass
Created from JetBrains using CodeStream
create github action to check and enforce naming of pull requests
create a github action to check the name of a pull request and make sure it follows a certain pattern
the naming convention should follow
<module-name>/<class-name>/<method-name>/<task-tybe>
task-type: feature|bugfix|hotfix|release|docs
the probability_plot
function differs from the GEV and the Gumbel distributions (especially in the method, n_samples, and func parameters) and needs to be unified
[statista] statista/distributions.py (Lines 1382-1395)
def probability_plot(
self,
parameters: Dict[str, Union[float, Any]],
cdf: Union[np.ndarray, list],
alpha: Number = 0.1,
func: Callable = None,
method: str = "lmoments",
n_samples=100,
fig1_size=(10, 5),
fig2_size=(6, 6),
xlabel="Actual data",
ylabel="cdf",
fontsize=15,
):
Created from JetBrains using CodeStream
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.