Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6fda2bd
TWRPv2 added , removed some classes, DBFriendly Projection fixed.
deysn Jun 19, 2018
6fb8e77
Adding the options for TWRP from the main RPHASH class to run from the
deysn Jul 3, 2018
cc49620
changed MAP to MultiMap, added cmd line parameters.
deysn Aug 23, 2018
dd34570
Experimenting with shifting Spherical LSH through sphericalrandom class
deysn Jun 27, 2019
3a1cbce
TWRPv3 creates 3 trees with diff. random bisection pts and merges them
deysn Aug 15, 2019
4b74eec
TWRPv3 :
deysn Aug 22, 2019
8646ed5
added the selection of the best tree having best wcss.
deysn Sep 5, 2019
c7f9294
algorithms to choose best tree
deysn Oct 17, 2019
af43d9b
changed the wcss to calculate squared distance.
deysn Nov 7, 2019
a57e208
testing for automatic cluster detection and choosing the best tree
deysn Mar 12, 2020
97c2ca8
updating the code with latest runtime parameters.
deysn Mar 19, 2021
c8dc896
updating
deysn Mar 19, 2021
310138c
testing merge
deysn Mar 19, 2021
d45b341
added back the for computation the partial wcss error.
deysn Mar 19, 2021
60e53c6
added python scripts to measure ari and wcss for large data
deysn Jun 3, 2021
ec21452
Adding the knee finding algorithm in java
deysn Jul 21, 2021
9118d1f
Adding knee finding algorithm in java
deysn Jul 21, 2021
5054130
Adding knee finding algorithm of python in java usisng jython
deysn Jul 21, 2021
b3d1100
Jython integration. Using python knee finding function in Java.
deysn Dec 11, 2021
b028aeb
Merge remote-tracking branch 'origin/Streaming_RPHash_TWRP' into Stre…
deysn Dec 11, 2021
1af3d59
updating the knee finder
Dec 11, 2021
386fb2e
updating whatever is on the local machine.
deysn Dec 21, 2021
9d88578
implemented aging using micro clusters
deysn Apr 11, 2022
5e969ad
updated data plotting from java using XChart
deysn Apr 14, 2022
87e9b28
creating the main classes for
deysn Apr 16, 2022
e73aa02
updated knee finding on jave that matches results with python library
deysn Apr 27, 2022
0576de8
added another sub method for knee finding in java
deysn May 12, 2022
ddb5d66
minor update
deysn May 12, 2022
9194bfc
updating
deysn Aug 1, 2022
72b9117
Static Streaming version working
deysn Jan 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="lib" path="lib/commons-lang3-3.4/commons-lang3-3.4.jar"/>
<classpathentry kind="lib" path="lib/commons-math3-3.6.1/commons-math3-3.6.1.jar"/>
<classpathentry kind="lib" path="/home/lee/workspace/RPHash/lib/knn-0.1-jar-with-dependencies.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/commons-lang3-3.4/commons-lang3-3.4.jar"/>
<classpathentry kind="lib" path="lib/commons-math3-3.6.1/commons-math3-3.6.1.jar"/>
<classpathentry kind="lib" path="lib/knn-0.1-jar-with-dependencies.jar"/>
<classpathentry kind="lib" path="C:/Users/sayan/Downloads/softwares/jython-2.7.2.jar"/>
<classpathentry kind="lib" path="C:/Users/sayan/Downloads/jars/xchart-3.8.1/xchart-3.8.1.jar"/>
<classpathentry kind="lib" path="C:/Users/sayan/Downloads/jars/jython-standalone-2.7.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
5 changes: 5 additions & 0 deletions .pydevproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
</pydev_project>
2 changes: 2 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding//src/main/java/edu/uc/rphash/tests/plotting.java=UTF-8
64 changes: 64 additions & 0 deletions scripts/ari_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import pandas as pd
import numpy as np
#from scipy.spatial import distance
from math import dist
import os
import csv
import openpyxl
from sklearn.metrics.cluster import adjusted_rand_score

# https://github.com/cran/dendextend/blob/master/R/find_k.R
# https://cran.r-project.org/web/packages/fpc/fpc.pdf

# scipy.spatial.distance.euclidean(A, B)
# dist([1, 0, 0], [0, 1, 0])

labels_true_gt=np.genfromtxt("C:/Users/dey.sn/Downloads/temp/haraal/haraal_labels_gt.csv", delimiter=',')
print(labels_true_gt.shape[0])
print(labels_true_gt)
#column = nArr2D[:, 1]
#output_labels = np.genfromtxt('C:/Users/dey.sn/Downloads/work/output/har_k6/Labels_har_k6_kmpp,cutoff,90,k6.csv', delimiter=',')
'''
output_labels_col1=output_labels[:,0]
print(output_labels.shape[1])
print(output_labels_col1)
for cols in range(output_labels.shape[1]):
print(adjusted_rand_score(labels_true_gt,output_labels[:,cols]))

'''
# This is the path where you want to search
path = r'C:/Users/dey.sn/Downloads/work/output/haraal_k6/'
# this is the extension you want to detect
extension = '.csv'
substring="Labels"
count=0
wb=openpyxl.Workbook()
sheet=wb.active
sheet.title= 'haraal_ari'
for root, dirs_list, files_list in os.walk(path):
for file_name in files_list:
if os.path.splitext(file_name)[-1] == extension:
file_name_path = os.path.join(root, file_name)
print(file_name)
print(file_name_path) # This is the full path of the filter file
try:
index=file_name.index(substring)
# print(index)
if(index==0):
count+=1
output_labels = np.genfromtxt(file_name_path, delimiter=',')
b = sheet.cell(row=count, column=2)
b.value = file_name
for cols in range(output_labels.shape[1]):
ari=adjusted_rand_score(labels_true_gt,output_labels[:,cols])
print(ari)
c = sheet.cell(row=count, column=(cols+12))
c.value = ari
except ValueError:
print(
"Not found!")
else:
print(
"Found!")
print(count)
wb.save("C:/Users/dey.sn/Downloads/work/output/haraal_k6/results_python_ari_all_runs.xlsx")
Loading