Data for session 2: Normal equation and batch gradient descent.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Gerardo Marx b3564c4d0d data for lab session 2 3 months ago
Readme.md data for lab session 2 3 months ago
dataLab.csv data for lab session 2 3 months ago
plot.png data for lab session 2 3 months ago

Readme.md

Readme

This data file (dataLab.csv)has been collected using the TCLab board. The data was generated by using:

import time 
import tclab 
import numpy as np

n=600
t =  np.linspace(0,n-1,n)
T1 = np.empty_like(t)
with tclab.TCLab() as lab:
    lab.Q1(68)
    for i in range(n):
        T1[i] = lab.T1
        print(T1[i])
        time.sleep(1)

Then, temperature measurements are stored with

import pandas as pd
DF = pd.DataFrame(T1)
DF.to_csv("dataLab.csv", index=False)

How to use the data

To use temperature measurements, you have to load data using:

import pandas as pd
df =  pd.read_csv('dataLab.csv')
y = df['0']

If you data is plotted, it should look like the next figure:

import matplotlib.pyplot as plt
plt.plot(y, '.r')

plot