-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing up possible mistakes and improving readability.
- Loading branch information
Showing
26 changed files
with
118 additions
and
120 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import numpy as np | ||
|
||
from opfython.core.node import Node | ||
|
||
# Defining an index | ||
idx = 0 | ||
|
||
# Defining a label | ||
label = 0 | ||
label = 1 | ||
|
||
# Defining an array of features | ||
features = np.asarray([2, 2.5, 1.5, 4]) | ||
|
||
# Creating a Node | ||
n = Node(idx, label, features) | ||
n = Node(idx, label, features) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import numpy as np | ||
|
||
import opfython.math.general as g | ||
|
||
# Defining a general purpose array | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
from opfython.models.supervised import SupervisedOPF | ||
|
||
# Creates a SupervisedOPF instance | ||
opf = SupervisedOPF(distance='log_squared_euclidean', | ||
pre_computed_distance=None) | ||
opf = SupervisedOPF(distance='log_squared_euclidean', pre_computed_distance=None) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
from opfython.models.unsupervised import UnsupervisedOPF | ||
|
||
# Creates an UnsupervisedOPF instance | ||
opf = UnsupervisedOPF( | ||
min_k=1, max_k=10, distance='log_squared_euclidean', pre_computed_distance=None) | ||
opf = UnsupervisedOPF(min_k=1, max_k=10, distance='log_squared_euclidean', pre_computed_distance=None) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import opfython.stream.loader as l | ||
|
||
# Loading a .csv file | ||
csv = l.load_csv('data/sample.csv') | ||
csv = l.load_csv('data/boat.csv') | ||
|
||
# Loading a .txt file | ||
txt = l.load_txt('data/sample.txt') | ||
txt = l.load_txt('data/boat.txt') | ||
|
||
# Loading a .json file | ||
json = l.load_json('data/sample.json') | ||
json = l.load_json('data/boat.json') |
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import numpy as np | ||
|
||
import opfython.utils.constants as c | ||
|
||
|
||
|
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
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
Oops, something went wrong.