<jupyter_start><jupyter_text><jupyter_code>!git clone https://github.com/kandikits/automl-starter.git
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns 
%matplotlib inline
df = pd.read_csv('https://raw.githubusercontent.com/jojo62000/Smarter_Decisions/master/Chapter%206/Data/Final_SolarData.csv')
df
df.head(4)<jupyter_output><empty_output><jupyter_text>comparison between inverter_output_power and inversion_input_power<jupyter_code>sns.pointplot(y="inverter_output_power", x="inverter_input_power", data=df,color='green');
from matplotlib import pyplot
pyplot.scatter(df['batterycurrent'],df['batteryvoltage'])
from sklearn.linear_model import LinearRegression
model = LinearRegression()
model.fit(df[['batterycurrent']],df['batteryvoltage'])
predicted_batteryvoltage = model.predict(df[['batterycurrent']])
pyplot.plot(df['batterycurrent'],predicted_batteryvoltage,color='g')
pyplot.show()
s=sns.pointplot(y="load_power2", x="load_power1", data=df);
sns.pointplot(y="load_energy2", x="load_energy1", data=df);
sns.pointplot(y="load_current2", x="load_current1", data=df);
from matplotlib import pyplot
pyplot.scatter(df['temperature'],df['batteryvoltage'])
from sklearn.linear_model import LinearRegression
model = LinearRegression()
model.fit(df[['temperature']],df['batteryvoltage'])
predicted_batteryvoltage = model.predict(df[['temperature']])
pyplot.plot(df['temperature'],predicted_batteryvoltage,color='r')
pyplot.show()
x=df.drop('solarpower',axis=1)
y=df['solarpower']
from sklearn.model_selection import train_test_split
x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=0.33,random_state=101)
from sklearn.linear_model import LinearRegression
lm = LinearRegression()
lm.fit(x_train,y_train)
df['location'] = df['location'].str.split().str.join(" ")
import pandas
from sklearn.neighbors import KNeighborsClassifier
knn = KNeighborsClassifier(n_neighbors=10)
df['location'] = df['location'].str.split().str.join(" ")
knn.fit(x_train,y_train)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1467124631992149, 'fraction_numerical': 0.011776251226692836, 'mean_word_length': 11.50920245398773, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '506082', 'license': 'MIT', 'n_tokens_mistral': 753, 'n_tokens_neox': 714, 'n_words': 99, 'path': 'vithackothon2.ipynb', 'repo_name': 'tejasv1846/automl-starter', 'size': '2038'}