Giter Site home page Giter Site logo

seriesclust's Introduction

seriesclust

A few simple tools to cluster series of data and investigate the cluster results with respect to cluster membership across other variables in the data.

Installation

You can install seriesclust from github with:

# install.packages("devtools")
devtools::install_github("hafen/seriesclust")

Example

library(seriesclust)
library(dplyr)

# scale the monthly median close price so that we are clustering on general shape
d <- nasd16 %>%
  group_by(symbol) %>%
  mutate(close_scl = as.numeric(scale(med_close))) %>%
  select(-company, -med_close)

set.seed(1234)
# k-means clustering with 2, 5, and 9 clusters
km <- get_kmeans(d, x = "month", y = "close_scl", k = c(2, 5, 9))
plot_scree(km)
plot_clust(km, 9)
plot_heat(km, 9, col = "sector")
plot_heat(km, 9, col = "industry", cutoff = 10)

seriesclust's People

Contributors

hafen avatar

Stargazers

lixinwu avatar Vishal Belsare avatar Trenton Pulsipher avatar  avatar Roberto Salas avatar

Watchers

 avatar  avatar

Forkers

vishalbelsare

seriesclust's Issues

Error : object ‘by_row’ is not exported by 'namespace:purrr'

Hi @hafen! got this error when I tried to install the package. Can you help me please?
Thank you!

> devtools::install_github("hafen/seriesclust")
Downloading GitHub repo hafen/seriesclust@master
from URL https://api.github.com/repos/hafen/seriesclust/zipball/master
Installing seriesclust
'/usr/local/Cellar/r/3.4.0_1/R.framework/Resources/bin/R' --no-site-file --no-environ  \
  --no-save --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/8m/57wvs2sd1_n73l5xkqr7rh280000gn/T/RtmpkwlhCh/devtoolse4e448ecd38e/hafen-seriesclust-161df0d'  \
  --library='/usr/local/lib/R/3.4/site-library' --install-tests 

* installing *source* package ‘seriesclust’ ...
** R
** data
*** moving datasets to lazyload DB
** tests
** preparing package for lazy loading
Error : object ‘by_row’ is not exported by 'namespace:purrr'
ERROR: lazy loading failed for package ‘seriesclust’
* removing ‘/usr/local/lib/R/3.4/site-library/seriesclust’
Error: Command failed (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.