Created
August 13, 2018 11:29
-
-
Save FisherKK/9408b10fbb0d671c19d7471a7f94de54 to your computer and use it in GitHub Desktop.
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 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