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
#include "utest.h" | |
#include <string> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <sys/time.h> | |
#include <vector> |
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
#define length(array) ((sizeof(array)) / (sizeof(array[0]))) | |
type yourArray[] = {your, values}; | |
length(yourArray); // returns length of yourArray | |
#include <stdlib.h> | |
#include <stdio.h> | |
#define length(array) ((sizeof(array)) / (sizeof(array[0]))) | |
int main() |
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
# %% [markdown] | |
# # Fuzzy C-Means Clustering | |
# %% | |
import re | |
import sys | |
import datetime | |
import os | |
import math | |
exceptions = (TypeError , SyntaxError, re.error, AttributeError , ValueError , NotImplementedError , Exception , RuntimeError , ImportError) |
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 pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn import datasets | |
from sklearn.linear_model import RidgeClassifier | |
from sklearn.model_selection import train_test_split | |
from sklearn.preprocessing import StandardScaler | |
# | |
# Load IRIS dataset | |
# |
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
''' | |
Subtractive Clustering Algorithm according to "Learning of fuzzy rules by mountain clustering" by Ronald R. Yager and Dimitar P. Filev. | |
''' | |
__author__ = 'Alex Povod' | |
__version__ = '0.1.1' | |
import numpy | |
import numpy.typing as npt | |
import scipy as sp |
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 | |
import matplotlib.pyplot as plt | |
from scipy.stats import norm | |
# define constants | |
mu = 998.8 | |
sigma = 73.10 | |
x1 = 900 | |
x2 = 1100 | |
# calculate the z-transform |
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
package ifcm | |
import ( | |
"fmt" | |
"math" | |
"sort" | |
) | |
//Interval | |
type Interval struct { |
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
std::vector<std::vector<float>> Read_Iris_Dataset(void) | |
{ | |
std::ifstream myfile("iris.data"); | |
std::string line; | |
std::vector<std::vector<float>> Iris_Dataset; | |
std::vector<float> temp_sepal_len; | |
std::vector<float> temp_sepal_wid; | |
std::vector<float> temp_petal_len; | |
std::vector<float> temp_petal_wid; | |
std::vector<float> temp_iris_class; |
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
# Several ways to calculate squared Euclidean Distance (Frobenius norm) matrices in Python | |
# Import modules first: | |
## import numpy module | |
import numpy as np | |
## import numpy linear algebra module | |
import numpy.linalg as la | |
## import scipy spatial module | |
import scipy.spatial as spt |
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
# General Library Pre-Build QApplication | |
# Notify file | |
Author = "Alex Povod" | |
Version = "0.0.1" | |
Domain = "https://github.com/ialexpovod/GLP" | |
# Python Traceback | |
# https://www.geeksforgeeks.org/python-traceback/ | |
import datetime |