Skip to content

Pangpuriye-House-SS4/braintorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Braintorch

  • release: 1.0

Usage

from braintorch.dataset import SignalDataset, RawSignalDataset

dataset = SignalDataset("dataset/train/train")

for signal, label in dataset:
    print(signal, label)
    break

For baseline correction, use the following code:

from braintorch.utils import baseline_snip

baseline = baseline_snip(signal)
signal = signal - baseline
print(signal.shape)

For ICA, use the following code:

from braintorch.utils import kurtosis_ica_method
clean_signal = kurtosis_ica_method(raw_signal)

Example

from braintorch.dataset import SignalDataset, SignalTestDataset
from braintorch.utils import baseline_snip, kurtosis_ica_method
from braintorch.vis import visualtize_signals

dataset = SignalDataset(
    "train/train",
    baseline_snip,
    tans_segment_theory=2,
    acceptable_loss_sample=87,
    apply_ica=True,
)
for segments, label in dataset:
    visualtize_signals(
        segments, 
        distance= 20, 
        figsize=(12, 26)
    )
    break

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages