Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created September 23, 2018 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/b3b47d57e0ed77956c5a1551113a58a7 to your computer and use it in GitHub Desktop.
Save NMZivkovic/b3b47d57e0ed77956c5a1551113a58a7 to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
data = pd.read_csv('Credit_Card_Applications.csv')
X = data.iloc[:, :-1].values
y = data.iloc[:, -1].values
sc = MinMaxScaler(feature_range = (0, 1))
X = sc.fit_transform(X)
from somtf import SOM
som = SOM(x = 10, y = 10, input_dim=15, learning_rate=0.5, num_iter = 100, radius = 1.0)
som.train(X);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment