This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useEffect, useRef, useState} from 'react'; | |
import { Switch, Flex, Text } from '@chakra-ui/react'; | |
import UplotReact from 'uplot-react'; | |
import { toast } from 'react-toastify'; | |
import 'uplot/dist/uPlot.min.css'; | |
const colors = [ | |
'#007BFF', | |
'#FFA62B', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import UplotReact from 'uplot-react'; | |
import 'uplot/dist/uPlot.min.css'; | |
export default function SelectBrushTimeSeries(props) { | |
let data = [props.data[0], props.data[3]]; | |
let initXmin = props.data[0][0]; | |
let initXmax = props.data[0][Math.max(10, Math.floor(props.data[0].length / 10))]; | |
let series = [{}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Union, Iterable | |
import numpy as np | |
# Linear Discriminant Analysis. | |
# Can be used for linear classification or supervised dimension reduction. | |
# Assumes same class covariances. | |
# Just binary implementation. | |
# Saves ordered transformation matrix. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python 3.6.5. | |
# Numpy 1.16.0. | |
# Matplotlib 3.0.2. | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def sortnode(val): | |
return val[2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
class DBSCAN(object): | |
def __init__(self, radius=1.0, minpoints=50, tree=None): | |
# Pass variables | |
if tree is not None: | |
self._tree = tree |