谢邀,本人正在崩溃和兴奋间反复横跳(崩溃居多),anyway, 我心态超好的!besides, 仅供个人学习查阅,不具任何参考价值!!!
(小边不想努力了,来个大佬带飞我吧!
Python anywhere: https://www.pythonanywhere.com/
R: https://rstudio.cloud/
orange: https://orangedatamining.com/download/#windows
https://www.ieee.org/conferences/
anaconda prompt
> jupyter notebook
file -> option -> add ins -> scroll down -> manage excel add ins -> analysis toolpak
朋友们啊我是真的晕哎
嗯嗯和excel做regression出来的一样~
predict X
Error1: absolute error
E r r o r 1 = ∣ X − X ^ ∣ Error1 = |X-\widehat{X}| Error1=∣X−X ∣
Error2: square error
E r r o r 2 = ( X − X ^ ) 2 Error2 = (X-\widehat{X})^2 Error2=(X−X )2
代码如下:
X = df.loc[:,["SGD"]]
Y = df.loc[:,['DBS']]
from sklearn import linear_model
model = linear_model.LinearRegression()
model.fit(X,Y)
pred = model.predict(X)
from sklearn.metrics import mean_squared_error
rmse = mean_squared_error(Y,pred)**0.5
print(rmse)
被强大的工具震撼到了
https://cran.r-project.org/bin/windows/base/
python.anywhere
console -> bash
mkvirtualenv MyFirstVENV
pip install flask
enter MyFirstVENV
in Virtualend in Web
change the flask_app to our code
templates/index.html
<html>
<h1>My First ML cloud - DBS share price predictionh1>
<form action="/" method="post">
<p>Please enter the exchange rate USD to SGD (eg 1.4)p>
<p><input type="number" step="0.01" name="rates">p>
<p><input type="submit" value="Enter">p>
form>
<p>The predicted DBS share price {{result}}p>
html>
flask_app.py
from flask import Flask, request, render_template
app = Flask(__name__)
@app.route("/", methods=["GET","POST"])
def index():
if request.method == "POST":
rates = float(request.form.get("rates"))
return(render_template("index.html",result=-50.6*rates + 90.2))
else:
return(render_template("index.html",result="WAITING....."))
if __name__ == "__main__":
app.run()
create new directory call templates, upload index in templates directory
go to web, reload
欢迎来看:http://beatles.pythonanywhere.com/