Skip to content

Instantly share code, notes, and snippets.

@FisherKK
Created August 13, 2018 11:29
Show Gist options
  • Save FisherKK/9408b10fbb0d671c19d7471a7f94de54 to your computer and use it in GitHub Desktop.
Save FisherKK/9408b10fbb0d671c19d7471a7f94de54 to your computer and use it in GitHub Desktop.
# Import libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from copy import deepcopy
# Load data from .csv
df_data = pd.read_csv("cracow_apartments.csv", sep=",")
# Used features and target value
features = ["size"]
target = ["price"]
# Slice Dataframe to separade feature vectors and target value
X, y = df_data[features].as_matrix(), df_data[target].as_matrix()
# Init model parameters with zeros
n = len(features)
model_parameters = init(n)
# Train model
train(X, y, model_parameters)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment