Giter Club home page Giter Club logo

specufex_processing's People

Contributors

benholtzman avatar ngroebner avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

specufex_processing's Issues

Processing design - user workflows

Use this issue to discuss and create different ways the processing package could be/is used. For example, you could explain how you would like to use this for your current experiments, or list a number of use cases that may be helpful for others.

test failing in 3_runSpecufex.py

Full error message is attached


Traceback (most recent call last):
  File "../3_runSpecUFEx.py", line 120, in <module>
    nmf.fit(X[sample], verbose=1)
  File "/Users/theresasawi/opt/anaconda3/envs/seismo2/lib/python3.7/site-packages/specufex/nmf.py", line 38, in fit
    self.h01 = 1/self.num_pat
TypeError: unsupported operand type(s) for /: 'int' and 'tuple'

test_fail_2.txt

fix the representative waveform

Change in --

def get_representative_waveforms(cluster_name,col_name,norm_waveforms,time_vals,n_clust,df_merged_sub,

for count in range(start_clust,n_clust+1):
    plt.figure(10)
    tmp = df_merged_sub.loc[df_merged_sub[cluster_name]==count,['Index_Exp',col_name]]
    #print(tmp.values,count)
    num_ev_ac = np.min([num_events,tmp.index.shape[0]])
    x_tmp2, y_tmp2 = np.meshgrid(tmp.Index_Exp.values,tmp.Index_Exp.values)
    dist_matrix_subset = dist_matrix[x_tmp2,y_tmp2]
    dist_matrix_subset_indx = np.argmin(np.mean(dist_matrix_subset,axis=1))
    #pdb.set_trace()
    print(f'Using {dist_matrix_subset_indx} as the most get_representative_waveforms')
    tmp2 = np.random.choice(tmp.Index_Exp.values,num_ev_ac,replace=False) # --- Don't need this - instead find the 40 min mean dist indices ... if pass that to tmp2, rest should be fine 

Random seed option

Add an option in the config file and in the preprocessing scripts to set a seed for the random number generator. To allow deterministic recalculations of the model parameters.

Interface for clustering

Create a base class for an interface between fingerprint outputs (in hdf5 file), clustering algorithms, and cluster assignment outputs. Should look something like:

class Cluster:

    def read(filename):

    def cluster(number of clusters):

    def write(filename):

Separate hmm from nmf in preprocessing workflow

Break the NMF and HMM steps into 2 separate files so that a new HMM configuration (eg, number of states) can be calculated without rerunning the NMF step. Also allows multiple versions of the NMF to be calculated but this is probably less important.

Add energy/entropy to the catalog

Replace the original catalog with an updated one (with energy/entropy appended) after running energy_ .py -> so, that energy is in the clustering catalogs
(Nate- you may have already done this)

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.