Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 time | |
import numpy as np | |
from sklearn.datasets.samples_generator import make_blobs | |
from sklearn.neighbors import NearestNeighbors | |
from sklearn.neighbors import LSHForest | |
from annoy import AnnoyIndex | |
from pyflann import FLANN | |
n_iter = 5100 | |
n_neighbors = 10 |
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
6 | 148 | 72 | 35 | 0 | 336 | 627 | 50 | 1 | |
---|---|---|---|---|---|---|---|---|---|
1 | 85 | 66 | 29 | 0 | 266 | 351 | 31 | 0 | |
8 | 183 | 64 | 0 | 0 | 233 | 672 | 32 | 1 | |
1 | 89 | 66 | 23 | 94 | 281 | 167 | 21 | 0 | |
0 | 137 | 40 | 35 | 168 | 431 | 2288 | 33 | 1 | |
5 | 116 | 74 | 0 | 0 | 256 | 201 | 30 | 0 | |
3 | 78 | 50 | 32 | 88 | 310 | 248 | 26 | 1 | |
10 | 115 | 0 | 0 | 0 | 353 | 134 | 29 | 0 | |
2 | 197 | 70 | 45 | 543 | 305 | 158 | 53 | 1 | |
8 | 125 | 96 | 0 | 0 | 0 | 232 | 54 | 1 |
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 time | |
import numpy as np | |
from sklearn.datasets.samples_generator import make_blobs | |
from sklearn.neighbors import LSHForest | |
from sklearn.neighbors import NearestNeighbors | |
from sklearn.preprocessing import normalize | |
from annoy import AnnoyIndex | |
from pyflann import FLANN | |
n_iter = 100 |
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
""" | |
Dependencies: Python 2.7 or higher, numpy, scikit-learn | |
""" | |
import pandas as pd | |
import numpy as np | |
from sklearn.linear_model import LogisticRegression | |
from sklearn import metrics | |
from sklearn.preprocessing import LabelEncoder, OneHotEncoder |
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 | |
from sklearn.metrics import euclidean_distances | |
#Re-implementation of bisect functions of bisect module to suit the application | |
def bisect_left(a, x): | |
lo = 0 | |
hi = len(a) | |
while lo < hi: | |
mid = (lo+hi)//2 | |
if a[mid] < x: |
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 org.wso2.carbon.governance.api.exception.GovernanceException; | |
import org.wso2.carbon.registry.core.Resource; | |
import java.util.Enumeration; | |
class SomeClass(){ | |
private final String REGISTRY_LC_NAME = "registry.LC.name"; | |
private final String REGISTRY_LIFECYCLE = "registry.lifecycle."; | |
private final String REGISTRY_CUSTOM_LIFECYCLE_CHECKLIST = "registry.custom_lifecycle.checklist.option."; | |
private final String REGISTRY_CUSTOM_LIFECYCLE_VOTE = "registry.custom_lifecycle.votes.option." ; |
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 scipy import sparse as sp | |
import pandas as pd | |
import numpy as np | |
from scipy.sparse.linalg import svds | |
import pickle | |
#loads data from movielens data matrix. | |
#After extracting the compressed file, you will get a ratings.dat file | |
#movilelens site(http://grouplens.org/datasets/movielens/) has all information you need to read | |
#here I have used 10M data set |
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 | |
#Re-implementation of bisect functions of bisect module to suit the application | |
def bisect_left(a, x): | |
lo = 0 | |
hi = len(a) | |
while lo < hi: | |
mid = (lo+hi)//2 | |
if a[mid] < x: | |
lo = mid + 1 |
NewerOlder