Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java API implementing test time series string conversion by individual time series(rows) from CSV #18

Closed
balajikalluri opened this issue Mar 21, 2016 · 2 comments

Comments

@balajikalluri
Copy link

@seninp

Have you got any equivalent implementation (java API) for the function that read test time series (CSV) dataset row-by-row and then converts them into SAX wordbag with each bag corresponding to individual time series?

I'm looking for the equivalence to the following R-code...

for (i in c(1:length(data_test[,1]))) {
print(paste(i))
series = data_test[i,]

bag = series_to_wordbag(series, w, p, a, "exact", 0.01)

Appreciate your quick help !

Thanks,
KMB

@balajikalluri
Copy link
Author

@seninp

I'm looking for the equivalence of this R-implementation in Java.

`# classify the test data

labels_predicted = rep(-1, length(CBF[["labels_test"]]))

labels_test = CBF[["labels_test"]]

data_test = CBF[["data_test"]]

for (i in c(1:length(data_test[,1])))
{
print(paste(i))
series = data_test[i,]
bag = series_to_wordbag(series, w, p, a, "exact", 0.01)
cosines = cosine_sim(list("bag"=bag, "tfidf" = tfidf))
if (!any(is.na(cosines$cosines))) {
labels_predicted[i] = which(cosines$cosines == max(cosines$cosines))
}
}
`
Taken from your SAX-VSM R-page https://github.com/jMotif/jmotif-R

@seninp
Copy link
Member

seninp commented Mar 21, 2016

This functionality is not a part of this library and will not be. SAX lib is concerned with the discretization transform and the hot-sax algorithm. Sax-vsm lib implements the thing you want.

@seninp seninp closed this as completed Mar 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants