All Projects → bsharchilev → RobustPCA

bsharchilev / RobustPCA

Licence: other
No description or website provided.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to RobustPCA

MachineLearning
Implementations of machine learning algorithm by Python 3
Stars: ✭ 16 (+6.67%)
Mutual labels:  scikit-learn, machine-learning-algorithms, pca-analysis
Machinejs
[UNMAINTAINED] Automated machine learning- just give it a data file! Check out the production-ready version of this project at ClimbsRocks/auto_ml
Stars: ✭ 412 (+2646.67%)
Mutual labels:  scikit-learn, machine-learning-algorithms
scikit-learn-intelex
Intel(R) Extension for Scikit-learn is a seamless way to speed up your Scikit-learn application
Stars: ✭ 887 (+5813.33%)
Mutual labels:  scikit-learn, machine-learning-algorithms
Model Describer
model-describer : Making machine learning interpretable to humans
Stars: ✭ 22 (+46.67%)
Mutual labels:  scikit-learn, machine-learning-algorithms
pycobra
python library implementing ensemble methods for regression, classification and visualisation tools including Voronoi tesselations.
Stars: ✭ 111 (+640%)
Mutual labels:  scikit-learn, machine-learning-algorithms
ML-For-Beginners
12 weeks, 26 lessons, 52 quizzes, classic Machine Learning for all
Stars: ✭ 40,023 (+266720%)
Mutual labels:  scikit-learn, machine-learning-algorithms
100 Days Of Ml Code
100 Days of ML Coding
Stars: ✭ 33,641 (+224173.33%)
Mutual labels:  scikit-learn, machine-learning-algorithms
Daal4py
sources for daal4py - a convenient Python API to oneDAL
Stars: ✭ 113 (+653.33%)
Mutual labels:  scikit-learn, machine-learning-algorithms
Modal
A modular active learning framework for Python
Stars: ✭ 1,148 (+7553.33%)
Mutual labels:  scikit-learn, machine-learning-algorithms
Ds and ml projects
Data Science & Machine Learning projects and tutorials in python from beginner to advanced level.
Stars: ✭ 56 (+273.33%)
Mutual labels:  scikit-learn, machine-learning-algorithms
Bet On Sibyl
Machine Learning Model for Sport Predictions (Football, Basketball, Baseball, Hockey, Soccer & Tennis)
Stars: ✭ 190 (+1166.67%)
Mutual labels:  scikit-learn, machine-learning-algorithms
Python Machine Learning Book
The "Python Machine Learning (1st edition)" book code repository and info resource
Stars: ✭ 11,428 (+76086.67%)
Mutual labels:  scikit-learn, machine-learning-algorithms
Igel
a delightful machine learning tool that allows you to train, test, and use models without writing code
Stars: ✭ 2,956 (+19606.67%)
Mutual labels:  scikit-learn, machine-learning-algorithms
Trajectory-Analysis-and-Classification-in-Python-Pandas-and-Scikit-Learn
Formed trajectories of sets of points.Experimented on finding similarities between trajectories based on DTW (Dynamic Time Warping) and LCSS (Longest Common SubSequence) algorithms.Modeled trajectories as strings based on a Grid representation.Benchmarked KNN, Random Forest, Logistic Regression classification algorithms to classify efficiently t…
Stars: ✭ 41 (+173.33%)
Mutual labels:  scikit-learn
sklearn-matlab
Machine learning in Matlab using scikit-learn syntax
Stars: ✭ 27 (+80%)
Mutual labels:  scikit-learn
hub
Public reusable components for Polyaxon
Stars: ✭ 8 (-46.67%)
Mutual labels:  scikit-learn
face rating
Face/Beauty Rating with both the traditional ML approaches and Convolutional Neural Network Approach
Stars: ✭ 68 (+353.33%)
Mutual labels:  scikit-learn
Plant-Disease-Identification-using-CNN
Plant Disease Identification Using Convulutional Neural Network
Stars: ✭ 89 (+493.33%)
Mutual labels:  machine-learning-algorithms
osdg-tool
OSDG is an open-source tool that maps and connects activities to the UN Sustainable Development Goals (SDGs) by identifying SDG-relevant content in any text. The tool is available online at www.osdg.ai. API access available for research purposes.
Stars: ✭ 22 (+46.67%)
Mutual labels:  machine-learning-algorithms
PaperWeeklyAI
📚「@MaiweiAI」Studying papers in the fields of computer vision, NLP, and machine learning algorithms every week.
Stars: ✭ 50 (+233.33%)
Mutual labels:  machine-learning-algorithms

README

Installation

Dependencies:

  • Numpy
  • Scipy
  • Scikit-Learn
  • Pandas

Before the installation, make sure that Numpy and Scipy are installed.

Clone the repository:

git clone https://github.com/bsharchilev/RobustPCA

cd to the repository directory:

cd RobustPCA

Run the setup.py script and make sure to specify a file where a list of installed files will be recorded:

python setup.py install --record files.txt

Uninstallation

Assuming that the path to the file specified in the last installation step is files.txt:

cat files.txt | xargs rm -rf

Documentation

API documentation for the package is available at http://bsharchilev.github.io/RobustPCA.

Examples

import rpca
from rpca import data

# Load "Sleep in Mammals" database
X = rpca.data.load_sleep()

# Transform it using Robust PCA
huber_loss = rpca.loss.HuberLoss(delta=1)
rpca_transformer = rpca.MRobustPCA(2, huber_loss)
X_rpca = rpca_transformer.fit_transform(X)
[RPCA] Iteraton 1: error 433.088587, relative error inf
[RPCA] Iteraton 2: error 407.667139, relative error 0.062358
[RPCA] Iteraton 3: error 398.040898, relative error 0.024184
[RPCA] Iteraton 4: error 385.338315, relative error 0.032965
[RPCA] Iteraton 5: error 338.966250, relative error 0.136804
[RPCA] Iteraton 6: error 278.488347, relative error 0.217165
[RPCA] Iteraton 7: error 270.495974, relative error 0.029547
[RPCA] Iteraton 8: error 267.039948, relative error 0.012942
[RPCA] Iteraton 9: error 264.705590, relative error 0.008819
[RPCA] Iteraton 10: error 263.316343, relative error 0.005276
[RPCA] Iteraton 11: error 262.834320, relative error 0.001834
[RPCA] Iteraton 12: error 262.704512, relative error 0.000494
[RPCA] Iteraton 13: error 262.671634, relative error 0.000125
[RPCA] Iteraton 14: error 262.663055, relative error 0.000033
[RPCA] Iteraton 15: error 262.660775, relative error 0.000009
[RPCA] Iteraton 16: error 262.660161, relative error 0.000002
[RPCA] Iteraton 17: error 262.659995, relative error 0.000001
import matplotlib.pyplot as plt
%matplotlib inline

# Plot progress during iterations
plt.figure(figsize=(8, 5))
plt.plot(range(1, rpca_transformer.n_iterations_ + 1), rpca_transformer.errors_, '-o')
plt.xlabel('Iteration')
plt.ylabel('Loss')
plt.show()

png

# Compare our method with regular PCA
from sklearn.decomposition import PCA
pca_transformer = PCA(2)
X_pca = pca_transformer.fit_transform(X)

# Calculate error norms for both methods
import numpy as np
def error_norms(components):
    n_samples, n_features = X.shape
    non_projected_matrix = np.identity(n_features) - components.T.dot(components)
    return np.sqrt(np.diag(X.dot(non_projected_matrix.dot(X.T))))

errors_pca, errors_rpca = error_norms(pca_transformer.components_), error_norms(rpca_transformer.components_)

plt.figure(figsize=(8, 5))
plt.plot(sorted(errors_pca, key=lambda x:-x)[:20], '-o', label='PCA', color='r')
plt.plot(sorted(errors_rpca, key=lambda x:-x)[:20], '-o', label='Robust PCA', color='b')
plt.title('Sorted error norms')
plt.legend()
plt.show()

png

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].