Skip to content

Commit

Permalink
clean useless imports
Browse files Browse the repository at this point in the history
  • Loading branch information
vzantedeschi committed Mar 1, 2017
1 parent 5f045c9 commit 9362bb5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Main Features:

## Installation

1. Install [liblinear](https://github.com/cjlin1/liblinear) and [libsvm](https://github.com/arnaudsj/libsvm)
1. Install [liblinear](https://github.com/cjlin1/liblinear)

2. Add to your PYTHONPATH the paths to *liblinear/python/* and to *libsvm/python/*
2. Add to your PYTHONPATH the paths to *liblinear/python/*

3. Install required python modules:

Expand Down
11 changes: 1 addition & 10 deletions src/landmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,4 @@ def random_landmarks(x,n):
def pca_landmarks(x,n):
pca = PCA(n).fit(x)

return pca.components_

def get_unit_vectors(landmarks,clusterer=None):
if clusterer is not None:
land_clusters = clusterer.predict(landmarks)
centroids = clusterer.cluster_centers_
land_centroids = centroids[land_clusters]
else:
land_centroids = np.zeros(landmarks.shape)
return csr_matrix(normalize(landmarks-land_centroids).transpose())
return pca.components_
2 changes: 0 additions & 2 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

# ---------------------------------------------------------------------- IMPORTS
import argparse
import csv
import numpy as np
import os

from liblinearutil import *
from scipy.sparse import csr_matrix
from sklearn.preprocessing import normalize,scale

Expand Down

0 comments on commit 9362bb5

Please sign in to comment.