product-space-fem's Issues
`InverseProblem.optimize( )` both modifies its input in place and returns it
This is confusing since it's not obvious that it's updated it in place; the easiest solution would be to just not return it at all.
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).
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/
?
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.
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.
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:
- (make the range polygon)
- run the method
- (do crossvalidation?)
- tweak plots (?)
Output:
- optimization diagnostics: history of parameter values and loss values, messages
- optimal ellipse and vector fields:
- images (png or pdf)
- optimized equation (including mesh, function space, optimal values, etc) (if pickle-able??)
- 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
get contours
using gdal-contour
conda environment works with flexible but not strict channel priority
I'd read that setting channel_priority
to strict
would make things faster/better; however, that doesn't work with our environment here. Maybe that's not a problem, but I'm recording the fact in case it helps clear up later errors.
I think that the thing that made it fail was channel priority; but I've still got to verify that.
For the record, here was the error:
err.txt
name!
scipy >= 1.8.1 causes a segfault
@silastittes has tracked it down to a change that happened between 1.8.0 and 1.8.1. This is puzzling, since not much changed there, except for their unuran submodule. Debugging this seems daunting, but it might be a legit scipy bug.
Here is the script that causes the segfault: https://github.com/kr-colab/product-space-FEM/blob/daf7a4580dba504b622ca240c76d3c9949449f14/debug.py
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.