isadoranun / fats Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I attach the numpy array with the data to reproduce the error
ftest.npy.zip (unzip first)
lc = np.load("ftest.npy")
import FATS
a = FATS.FeatureSpace(featureList=['SlottedA_length'] , SlottedA_length = 1)
a=a.calculateFeature(lc)
print a.result(method='dict')
a = FATS.FeatureSpace(featureList=['SlottedA_length'])
a=a.calculateFeature(lc)
print a.result(method='dict'), "<<< fail an empty list"
{'SlottedA_length': 7}
{'SlottedA_length': array([], shape=(1, 0), dtype=float64)} <<< fail
I found a big bug on the master code of FATS. with some light curves the StructureFunction_index_21 never ends. I attached a test case with the examples of a lightcurve from a VVV that make the feature fail. And also a screenshoot of my process monitor when i run the script
I suspect the error is a bad use of the numpy.trim_zero
function. This functions only remove the leading and trailing zeros but with this light curve are some zeros in between
Test Case: https://gist.github.com/leliel12/a3ee1c0de5a7f2cf72100c99c220f05c
Hello,
I found bugs in some classes for feature extractions. The issue is with slice indices which should be integers (but the are floats). For example this error:
/usr/local/lib/python2.7/dist-packages/FATS/FeatureFunctionLib.pyc in fit(self, data)
27 sorted_mag = np.sort(magnitude)
28
---> 29 return (np.median(sorted_mag[-math.ceil(0.05 * N):]) -
30 np.median(sorted_mag[0:math.ceil(0.05 * N)])) / 2.0
31 # return sorted_mag[10]TypeError: slice indices must be integers or None or have an index method
Method math.ceil returns floats. So it would be sufficient to wrap it by int().
Another example in the file lomb.py line 150:
wk1 = wk1[1:nout+1]
wk2 = wk2[1:nout+1]
since variable "nout" is float it should look like this:
wk1 = wk1[1:int(nout)+1]
wk2 = wk2[1:int(nout)+1]
This version works for me.
I would like to use this library in my package, so I would be grateful to have these little bugs fixed.
Thank you.
I have a light curve data in csv , using which I am trying to extract the features using FATS. Following the documentation, I have tried to preprocess the data using preprocessed_data.preprocess() function. However, I get the following error. I am not sure if this due to backward compatibility issues or something related to my data. can you please help.
Issue:
Thanks,
Kiran Varma
FATS/test_library.py:286: a=a.calculateFeature(white_noise)
looks like the StetsonJ fit()
function requires data[7]
contain aligned error but the white_noise
function doesn't generate it
Hello Isadora,
I have come across your FATs paper (in a very different field!) while developing metrics for a Fisher's Information time-series on ecological data. I'm looking at the Variability index n^e (pictured) and the python code provided.
I have a question about one line in the code that is the final calculation:
https://github.com/isadoranun/FATS/blob/master/FATS/FeatureFunctionLib.py#L734
In the code the denominator has a term N ** 2
which I don't see in the pictured equation. I'm recoding the equation in R and am wondering where the N ** 2
term comes from?
If you are wondering how someone in ecology ended up in the astrophysics literature, I'm trying to condense information that looks like this (shortened model data sample):
into a suite of single metrics as there will be a thousand model runs to compare.
Thanks very much!
Quinn
I cannot import FATS on python3.4 produces syntax error
import FATS
Traceback (most recent call last):
File "", line 1, in
File "/home/linn/.local/lib/python3.4/site-packages/FATS/init.py", line 2, in
from .Feature import FeatureSpace
File "/home/linn/.local/lib/python3.4/site-packages/FATS/Feature.py", line 93
print "Warning: the feature", name, "could not be calculated because", obj().Data, "are needed."
^
SyntaxError: invalid syntax
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.