GithubHelp home page GithubHelp logo

kjhall01 / xcast Goto Github PK

View Code? Open in Web Editor NEW
64.0 5.0 5.0 430.06 MB

A High-Performance Data Science Toolkit for the Earth Sciences

License: MIT License

Python 6.15% Batchfile 0.01% Shell 0.01% Jupyter Notebook 93.85%
climate-data climate-science climate-forecasting artificial-intelligence machine-learning predictive-analytics python xarray multimodel-ensemble big-data

xcast's People

Contributors

kjhall01 avatar nachiketa84 avatar thomasmgeo 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

Watchers

 avatar  avatar  avatar  avatar  avatar

xcast's Issues

Feature Request: Downscaling methods

Hi, I just read through the Xcast paper. Wanted to check if xcast also has tools for spatiotemporal downscaling of gridded datasets; if not, request for the feature to be added to the module.

Gamma regression does not work with example in docs

X, Y, T = xc.load_sample_data() # load test data

gamma = xc.rGammaRegression()
gamma.fit(X, Y)
pred = gamma.predict(X)

ValueError: Some value(s) of y are out of the valid range of the loss 'HalfGammaLoss'.

import error

I installed xcast following instruction on GitHub page but got error when importing the package in Spyder.

import xcast as xc
Traceback (most recent call last):

Cell In[1], line 1
import xcast as xc

File /opt/anaconda3/lib/python3.11/site-packages/xcast-0.6.9-py3.9.egg/xcast/init.py:7
from .visualization import view_probabilistic, view_reliability, reliability_diagram, view_taylor, view_roc, view

File /opt/anaconda3/lib/python3.11/site-packages/xcast-0.6.9-py3.9.egg/xcast/visualization/init.py:4
from .roc import view_roc

File /opt/anaconda3/lib/python3.11/site-packages/xcast-0.6.9-py3.9.egg/xcast/visualization/roc.py:3
from scipy import interp

ImportError: cannot import name 'interp' from 'scipy' (/opt/anaconda3/lib/python3.11/site-packages/scipy/init.py)

How can I solve this?

ELR needs "threshold_type" kwarg

ELR here uses thresholds in the range [0, 1] when it should, probably, be [mindata, maxdata].

The threshold and the input should be scaled to the same range.

RankedTerciles Needs New Implementation

Since RankedTerciles uses xr.quantile, which uses dask.apply_gu_func, which does not accommodate multiple chunks across S/M, XCast needs a new implementation of percentile-based one-hot encoding.

Future Work

  1. Update documentation - In Progress
  2. Smart dimension-name guessing - ETA 1/1/2022
  3. keep attributes, XR.dataarray store in estimator objects ? - ETA 1/1/2022
  4. Remove strict chunking rules, switch to manual dask mapping over two dimensions only - ETA 1/1/2022
  5. Fix Conda-Install; needs to work on Python 3.9 & 3.10

example request: LogisticRegression `s2s-ai-challenge`

I love the idea of xcast. If I want to predict multiple lead_times in a single iteration, would I just stack lead_time and X or Y?

I think more concrete examples in the documentation would help users.
i.e. something like applying xcast to s2s-ai-challenge mock data like I did in https://gist.github.com/aaronspring/36e112e992e36fba935f73404dbbd3cd and related issue (likely your approach is much more performant because the vectorize=True essentially loops the xr.apply_ufunc call, but would be great to check)

Documentation Mixup

Hi @kjhall01 !

I am interested in using xcast for a few projects, but still trying to get my arms around the api and generally xarray I/O with xcast. Attached is a notebook (zipped) where I ran into some issues. Happy to set up a meeting too if that is best.

-Thomas
xcast_demo.ipynb.zip

rethink base Estimator

  • some methods .fit on continous observations data, and are capable of producing probabilistic forecasts.
  • predict_proba takes the number of outputs from the number of outputs on the training data
  • methods trained on continuous data expect only a single output for predict_proba - but that is an issue for tercile forecasts

bug in guess_coords (v0.6.9)

undefined variable "unassign_labels" should say "unassigned_labels". Bug will not affect many since it only covers the case where all coords except one can be assigned, and then the remaining dim is assigned to the remaining unassigned label.

apply NaN masking in xc.CCA

A Y-Mask is calculated in .fit, but not actually used to mask out erroneous missing data.

it should be. also apply an x-mask , and institute assertions for erroneous missing data

Cross Validation needs to maintain chunking scheme

every slice in the cross-validation process should return the same chunking scheme as the initial arguments, X & Y. Currently, It sometimes re-chunks across the S dimension (likely a by-product of xr.concat in the function definition).

Either have XCast accomodate multiple chunks along S/M (ideal) , or have cross validator maintain number of chunks along S/M.

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.