dtwclust | R Package for Time Series Clustering Along | Time Series Database library
kandi X-RAY | dtwclust Summary
kandi X-RAY | dtwclust Summary
R Package for Time Series Clustering Along with Optimizations for DTW
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dtwclust
dtwclust Key Features
dtwclust Examples and Code Snippets
Community Discussions
Trending Discussions on dtwclust
QUESTION
The data attached is a simplified example, as in reality I have hundreds of people and hundreds of points in time.
I am looking for a way to determine similar time series.
I have some code here to determine clusters, but this isn't exactly what I want.
What I would like is if I selected one person it would return the names of the n most similar time series.
I.e if n = 1, and I enter Bob it would return Dave, however if I entered Sam it would return Bob (with these names going into a new column with df). If n = 2 the first column would contain the most similar time series, and the second would contain the next most similar. This is similar to K nearest neighbours but across time series, so that each individual person has a different set of "neighbours".
If this is unfeasible, or too difficult I would alternatively like would to specify the number of people in each group, rather than the number of groups.
In this example I specified 4 groups, this does not make 4 groups of 2.
Group B contains 4 people, whilst C and D have only 1 person.
...ANSWER
Answered 2020-Oct-08 at 17:15What you want to do is not to cluster the data, you want to order it according to one specific time-series, there lies the problem. To do what you want, first, you have to select a measure of "distance", that could be euclidean or correlation for example. In the next example, I provide a code with both measurements of distances (correlation and euclidean). It simple calculate the distance between the time-series, then sort it, and lastly pick up the N lower. Note that the selection of the measurement of distance will alter your results.
QUESTION
I have a time series data with 4 variables over about 5 years. I would like to cluster the data using hclust
method in R. I would like to cluster the observations. My code works. However, I would like to identify the specific cluster for each observation. That is, I would like to add the number of the cluster beside each observation. My code gave me an error. I understand the error. So is there any way can I achieve my point.
Here is my try:
...ANSWER
Answered 2020-Sep-03 at 10:42I suppose the problem is that your datNew
is not a data.frame
. Looking at:
QUESTION
I have a massive dendrogram with hundreds of names on it, that I'd like to be make interactive so that users can draw a box and "zoom in" on the names and part of the tree of interest. The original code for creating it is borrowed from here. Pictured here:
I turned it into a shiny app and borrowed some code from here in order to make it zoomable. And it KINDA works. It runs, the two graphs show up, and nothing gives me an error. But it doesn't work as intended. (I'll post code below). What I mean is that if I were to simply render my plot outside of shiny, all the names and everything are included. But when it renders in shiny, I can't draw my box over the names, only the lines of the dendrogram (hope that makes sense), and the "zoomed" graph is turned sideways (something to do with the coord_cartesian? What would I use instead) and looks very weird when it "zooms". Lastly I can't see both graphs at the same time and have to use a scroll bar to get to them, pictured:
Help! Code below (its from an r markdown document if that matters, sorry I couldn't include the actual data, has real names.
...ANSWER
Answered 2020-Aug-08 at 16:31The tool I'd suggest using is dendextend+ggplot+plotly.
Example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dtwclust
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page