Coder Social home page Coder Social logo

luk-f / pycfof Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 70 KB

CFOF developed in Python. Based on Angiulli's works : https://arxiv.org/pdf/1901.04992v2.pdf

Home Page: https://pypi.org/project/Concentration-Free-Outlier-Factor/

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
anomaly-detection curse-of-dimensionality-solution high-dimensionality unsupervised-learning

pycfof's Introduction

๐Ÿ‘‹ Hello everyone

๐Ÿ’ฌ I'm Lucas and I'm a machine learning engineer

I like to use Python ๐Ÿ for personal and professional projects (but this is not my native language ๐Ÿ˜).

Here is a quick list of my most recent or significant projects: ๐Ÿ’ป

  • Just recently, I have create a small app to play with a buzzer ๐Ÿšจ on each personal device. I developed it to try Flask API ! You can find it here: luk-f/BuzzerApp
  • I'm currently work on a algorithm used to aggregate movement data (in 2D) and generalize spatial information: luk-f/AggOfMassiveMvtData,
  • And obviously, I should refer to my PhD work ๐ŸŽ“ that just finished last year, an unsupervised method of anomaly detection on multidimensional stream data (a CFOF approximation with iSAX tree): luk-f/pyCFOFiSAX
  • Also developed the CFOF method to compare it to my thesis work: luk-f/pyCFOF

pycfof's People

Contributors

luk-f avatar

Watchers

 avatar  avatar

pycfof's Issues

Error with rho value egal to 0.1 (float)

import numpy as np
from pyCFOF import ConcentrationFreeOutlierFactor as CFOF

dataset = np.random.normal(loc=0.0, scale=1.0, size=(10_000, 2))
cfof = CFOF(n_neighbors=len(dataset), rho=0.1)

>>> Rho type error: must be a float: 0.1.
>>> Default value applied. <class 'TypeError'>: 'float' object is not iterable

Scores not modified for few intermediate rho value

In this example, some objects obtain the minimal score (0.0001) for the second last rho value.

`dataset = np.concatenate((np.random.normal(loc=0.0, scale=1.0, size=(9_000, 2)),
np.random.normal(loc=6.0, scale=1.0, size=(1_000, 2))), axis=0)

rho_list = [0.001, 0.01, 0.02, 0.05, 0.09, 0.1, 0.5]
cfof = CFOF(n_neighbors=len(dataset), rho=rho_list)

for row in cfof.outlier_factor_:
score_prec = row[0]
for score in row[1:]:
if score < score_prec:
print(row)`

To wonder if...

Is it useful to do this ?

not_same_neighbor = (np.diff(np.concatenate((np.zeros_like(self._distances_fit_X_.T[0]).reshape(-1, 1),
                                                     self._distances_fit_X_), axis=1)) != 0).T
not_same_neighbor = np.concatenate(([np.zeros_like(not_same_neighbor[0]).T], not_same_neighbor))

IndexError: index 9999 is out of bounds for axis 0 with size 9999

Overflow with 2 clusters and rho value at 0.99 :

dataset = np.concatenate((np.random.normal(loc=0.0, scale=1.0, size=(9_000, 2)), 
                          np.random.normal(loc=6.0, scale=1.0, size=(1_000, 2))), axis=0)

rho_list = [0.01, 0.1, 0.5]
cfof = CFOF(n_neighbors=len(dataset), rho=rho_list)

_ = cfof.fit_predict(dataset)

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.