chongxi / spiketag

Next generation of spike sorting package for BMI
BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

cross validation segmentation with various neural states #50

Open chongxi opened 5 years ago

chongxi commented 5 years ago

cross-validation is important to test the performance of the various decoder construction. API from spiketag output spike count vector and the pc.ts pc.pos is required to segment the input into:

train_X, train_y valid_X, valid_y test_X, test_y

In such a simple way: (could be more complex with low_speed and/or low_mua states)

dec.partition(training_range=[0.0, .5],valid_range=[0.5, 0.6],testing_range=[0.6, 1.0])
(X_train, y_train), (X_valid, y_valid), (X_test, y_test) = dec.get_partitioned_data()

https://github.com/chongxi/spiketag/commit/1d24a165dc6f26d38f438f885b03ad16746d046a

Several factors need to be considered before and when dividing data:

chongxi commented 5 years ago

More details:

training_range = [0.4, 0.9]
valid_range    = [0.9, 1.0]
testing_range  = [0.0, 0.5]

image

image

Then the new Fr = pc.fields contains the representations from start to end (secs)

chongxi commented 4 years ago

check frame 79350, 81749 and 82493 in dusty data (an immediate prediction) 557.270 seconds 562397*1ms step (5ms code)