Skip to content

Commit

Permalink
Added possibility to choose the time series to supervise.
Browse files Browse the repository at this point in the history
  • Loading branch information
protti committed Jun 23, 2024
1 parent 6c594bb commit a06b14b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ if __name__ == '__main__':
dataCof = load_classification("Coffee")
X = np.squeeze(dataCof[0], axis=1)
y = dataCof[1].astype(int)

labels = {0: y[0], 1: y[1], 5: y[5], 6: y[0]} # semi-supervised mode
n_clusters = 2 # Number of clusters

featTS = FeatTS(n_clusters=2)
featTS.fit(X,y,train_semi_supervised=0.2)
featTS.fit(X,labels=labels)
print(adjusted_mutual_info_score(featTS.labels_,y))
```

Expand All @@ -47,10 +49,11 @@ if __name__ == '__main__':
dataCof = load_classification("Coffee")
X = np.squeeze(dataCof[0], axis=1)
y = dataCof[1].astype(int)
labels = {0: y[0], 1: y[1], 5: y[5], 6: y[0]} # semi-supervised mode
external_feat = pd.DataFrame({'LEN':y})

featTS = FeatTS(n_clusters=2)
featTS.fit(X,y,train_semi_supervised=0.2, external_feat=external_feat)
featTS.fit(X,labels=labels, external_feat=external_feat)
print(adjusted_mutual_info_score(featTS.labels_,y))
print(featTS.feats_selected_)
```

0 comments on commit a06b14b

Please sign in to comment.