GithubHelp home page GithubHelp logo

dupin's People

Contributors

b-butler avatar dependabot[bot] avatar domfijan avatar janbridley avatar joaander avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

npkamath

dupin's Issues

supervised.Window.compute bug when converting and checking input array type

Description

supervised.Window.compute bug when converting and checking input array type (https://github.com/glotzerlab/dupin/blob/main/dupin/preprocessing/supervised.py?plain=1#L215). When lines 215 and 216 are deleted the code works as expected. The type checking might be off in terms of wrong pandas type or string quotations should be removed?

Minimal Script

import dupin as du
import sklearn as sk
import numpy as np

data = [4,5,8,1,4,2,6,8,23,5432,76,23,4,2,6,7,3,4,6,3,4,67,3,4,6,3,4,6,6,3,5,7,45,2,5]
decision_tree = sk.tree.DecisionTreeClassifier(max_depth=1)

window = du.preprocessing.supervised.Window(
    classifier=decision_tree, window_size=10, test_size=0.5,
    n_classifiers=50, combine_errors="mean"
)

data = np.asarray(data).reshape(-1,1)
errors = window.compute(data)

  • Operating System: Linux Ubuntu 22
  • Python version: 3.10.8

Errors

File ~/CODE/GLOTZERLAB/dupin/dupin/preprocessing/supervised.py:215, in Window.compute(self, X)
    [213](file:///home/domi/CODE/GLOTZERLAB/dupin/dupin/preprocessing/supervised.py?line=212)     self.classifiers_ = []
    [214](file:///home/domi/CODE/GLOTZERLAB/dupin/dupin/preprocessing/supervised.py?line=213) y = np.repeat([0, 1], np.ceil(self.window_size / 2))[: self.window_size]
--> [215](file:///home/domi/CODE/GLOTZERLAB/dupin/dupin/preprocessing/supervised.py?line=214) if isinstance(X, "pandas.core.frame.DataFrame"):
    [216](file:///home/domi/CODE/GLOTZERLAB/dupin/dupin/preprocessing/supervised.py?line=215)     X = X.to_numpy()
    [217](file:///home/domi/CODE/GLOTZERLAB/dupin/dupin/preprocessing/supervised.py?line=216) shuffle_splits = sk.model_selection.StratifiedShuffleSplit(
    [218](file:///home/domi/CODE/GLOTZERLAB/dupin/dupin/preprocessing/supervised.py?line=217)     n_splits=self.n_classifiers, test_size=self.test_size
    [219](file:///home/domi/CODE/GLOTZERLAB/dupin/dupin/preprocessing/supervised.py?line=218) )

TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union

Further Documentation Improvements

Description

Quick-start guide

Overail complexity of using this is quite high. We should have a simple example that is super easy to use and understand. one that possibly can be put on front page
SOLUTION:

  • 1 simple potential energy minimal pipeline.

Examples

  • Detection of active system transitions. - maybe flexicle jumping the wall - this might correlate highly with experimentalists?

How-tos

we will make several how to's that teach how to use custom functions with examples:

  • MDAnalysis
  • HOOMD online application
  • maybe some custom example with some simple custom function
  • teeing generators with a function
  • use a custom generator with a freud function that we already used in the tutorial - maybe voronoi

CostLinearBiasedFit doesn't work with single signal type

Description

CostLinearBiasedFit doesn't work with single signal type.

Minimal Script

import numpy as np
import dupin as du
import ruptures as rpt
dl=np.asarray([1,1,1,1,1,1,0,0,0,0])
#dl = du.preprocessing.signal.moving_average(dl,3)
lin_regress_cost = du.detect.offline.CostLinearBiasedFit()
dynp = rpt.Dynp(custom_cost=lin_regress_cost)
sweep_detector = du.detect.offline.SweepDetector(dynp, max_change_points=6)
change_points = sweep_detector.fit(dl)
  • macOS Catalina 10.15.7
  • Python version 3.10.0
  • HOOMD-blue version N/A
  • hoomdpy-addons version N/A

Errors

Screen Shot 2022-02-08 at 3 45 38 PM

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.