Commit bb3b1ef2 by Rebecca Merrett

Upload New File

parent 3ce911fd
from sklearn import linear_model
from pandas import DataFrame
import pandas as pd
import pandas
import matplotlib.pyplot as plt
input_data = pandas.read_table("height.csv", header=0, sep=",", names=("weight", "height"))
plt.scatter(input_data["weight"], input_data["height"])
#plt.show()
predictor = pd.DataFrame(input_data, columns=["weight"])
outcome = pd.DataFrame(input_data, columns=["height"])
lm = linear_model.LinearRegression()
lm_model = lm.fit(predictor, outcome)
predicted_heights = lm.predict(predictor)
r_squared = lm.score(predictor,outcome)
print(predicted_heights)
#print("Predicted:")
#print(predicted_heights[0:6])
#print("Actual:")
#print(outcome[0:6])
#print(r_squared)
  • That’s an insightful tutorial on version control and collaborative workflows in coding. For those working with 3D printing projects, tools like Orca Slicer bring similar precision and efficiency by optimizing prints with AI calibration and multi-platform support. It’s a perfect example of how open-source innovation enhances both coding and printing workflows seamlessly.

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment