| 朋友說,chatGPT還是非常牛的,他明確知道自己不是電飯煲,我當(dāng)然要測試一下:
 第一回合:
 
 第二回合: 
 第三回合:
 
 第四回合: 
 真是智能呀!
 好消息 不能用國外手機(jī)號,不能用google的同學(xué)們,微軟將全面接入chatGPT,微軟2019年就投入了10億美元以確保它的功能能接入微軟產(chǎn)品。今天bing將chatGPTT整合的功能短暫的上線:可以直接輸入內(nèi)容 
 讓我們期待吧!?。?/p> 其實,我的內(nèi)心,還是希望百度也推出一個這樣的智能機(jī)器人,當(dāng)然里面不要包含廣告了,要不然還要使用屏蔽廣告的插件,心累……
 關(guān)于chatGPT對于編程的知道,昨天的博客沒有介紹清楚,這里用更詳細(xì)的例子展示一下:
 R語言相關(guān)的MME方程組:
 里面有固定因子,有隨機(jī)因子,查看模型,預(yù)測模型,結(jié)構(gòu)是完整的,在此基礎(chǔ)上修改就行了。 
 # Load the lme4 librarylibrary(lme4)
# Fit the mixed model using lmer() functionfit <- lmer(y ~ x1 + x2 + (1 | block), data = mydata)
# Summarize the model resultssummary(fit)
# Make predictions using the predict() functionpredictions <- predict(fit, newdata = mydata)
 考慮系譜的MME方程組:
 
 它竟然也使用asreml軟件,當(dāng)然,大小寫錯了,里面的語法也是舊版的。 # 加載 ASReml 庫library(ASReml)
# 定義因變量和固定效應(yīng)和隨機(jī)效應(yīng)formula <- y ~ x1 + x2 + (1 | animal) + (1 | sire) + (1 | dam)
# 使用 asreml() 函數(shù)擬合動物模型fit <- asreml(formula, data = mydata, pedigree = ped, varStructure = ~ animal + sire + dam)
# 概括模型結(jié)果summary(fit)
# 使用 predict() 函數(shù)預(yù)測predictions <- predict(fit, newdata = mydata)
 問一下有沒有asreml V4版本的代碼: 
 # 加載 ASReml 庫library(ASReml)
# 定義因變量和固定效應(yīng)和隨機(jī)效應(yīng)formula <- y ~ x1 + x2 + (1 | animal) + (1 | sire) + (1 | dam)
# 使用 asreml() 函數(shù)擬合動物模型fit <- asreml(formula, data = mydata, pedigree = ped, varStructure = ~ animal + sire + dam)
# 概括模型結(jié)果summary(fit)
# 使用 predict() 函數(shù)預(yù)測predictions <- predict(fit, newdata = mydata)
 來一個GS的python腳本: 
 import numpy as npimport pandas as pd
# 加載數(shù)據(jù)(實際數(shù)據(jù)可能更復(fù)雜)data = pd.read_csv('animal_data.csv')
# 計算各個動物的產(chǎn)量(以此作為選擇指標(biāo))data['yield'] = data['milk_production'] + data['meat_production']
# 計算每個動物的父親和母親的貢獻(xiàn)data['sire_contrib'] = data['sire_milk_production'] + data['sire_meat_production']data['dam_contrib'] = data['dam_milk_production'] + data['dam_meat_production']
# 計算總貢獻(xiàn)(合并父親和母親的貢獻(xiàn))data['total_contrib'] = data['sire_contrib'] + data['dam_contrib']
# 根據(jù)總貢獻(xiàn)對動物排序data.sort_values(by='total_contrib', ascending=False, inplace=True)
# 選擇前 n 個動物,其中 n 為需要選擇的動物數(shù)量top_n = data.head(n=100)
# 輸出選擇的動物的信息print(top_n)
 我覺得失業(yè)就在我眼前…… |