Giter Site home page Giter Site logo

product-space-fem's People

Contributors

mattlukac avatar petrelharp avatar silastittes avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

petrelharp nspope

product-space-fem's Issues

gradient verification

We need a method that compares the adjoint gradient dJ/dm to the difference quotient of the loss functional. By Taylor's theorem the convergence should be
|J(m + h m_) - J(m) - h dJ/dm โ€ข m_ | -> 0 at O(h^2)
where m_ is an arbitrary function in the same space as m.

outline easy-mode workflow

Input data:

  • data frame of spatial locations of samples and labels
  • data frame of heterozygosities and diversities
  • data frame of coordinates of corners of range polygon, counter-clockwise

Input parameters:

  • epsilon
  • mesh resolution
  • regularization strengths (four of these?)
  • filenames of the three input data files
  • output directory basename

Steps:

  1. (make the range polygon)
  2. run the method
  3. (do crossvalidation?)
  4. tweak plots (?)

Output:

  1. optimization diagnostics: history of parameter values and loss values, messages
  2. optimal ellipse and vector fields:
    • images (png or pdf)
    • optimized equation (including mesh, function space, optimal values, etc) (if pickle-able??)
  3. crossvalidation error (?)
    • plot
    • values in csv

Advanced parameters:

  • scipy-minimize tolerances and other options

To do crossvalidation:

  • command to make one crossvalidation subdirectory
  • script/notebook to make bash script to run lots of crossvalidation things
  • script/notebook to collate results from many subdirectories

How to get the range polygon?

  • raster file -> gdal-contour -> polygon
  • ellipse/rectangle etc with meshr -> ??
  • should standardize coordinates, at least internally?
  • "convex hull" can get counter-clockwise points

plotting ProductFunction

We need a plot() method in the ProductFunction class with a slice as an argument. For lower dimensions slice can be None and plot the full (e.g. 2D) function. Alternatively we can plot a slice of the function by providing a point p in one of the marginal spaces, which would plot F(x) = f(p, x).

Ellipse field plot

Right now any Function with a value dimension under 3 has a .plot() method.
E.g. the covariance matrix in the spatial coalescence equation does not have a `.plot()' method.

As a special case, the unconstrained parameterization of the covariance matrix should have a plot showing ellipses at each point. Point-wise, the ellipses are shaped by the eigenvectors of the covariance matrix.

ensure the `pf.SpatialData` class gets data in the right order

Right now the SpatialData class takes data and points, assuming that the data are in upper-triangular order (or, maybe lower-triangular?). This should be more robust; possibly we can just move over and merge the SpatialDivergenceData class I've defined in inference/?

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.