# Java EnvironmentexportJAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-22.jdk/Contents/Home
# Gradle environmentexportGRADLE_HOME=/Library/Java/env/gradle-8.5# CLASSPATH: adding JAVA_HOME/lib/tools.jar and JAVA_HOME/lib/dt.jar if they existif[-d"$JAVA_HOME/lib"];thenexportCLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
fi# PATH: add all necessary paths in one lineexportPATH=$JAVA_HOME/bin:$GRADLE_HOME/bin:$PATH:.
保存变量配置:
source ~/.bash_profile
验证安装结果:
yang@MacdeMac-mini ~ % gradle -v Welcome to Gradle 8.5!Here are the highlights of this release:- Support for running on Java 21- Faster first use with Kotlin DSL- Improved error and warning messagesFor more details see https://docs.gradle.org/8.5/release-notes.html------------------------------------------------------------
Gradle 8.5
------------------------------------------------------------Build time: 2023-11-29 14:08:57 UTC
Revision: 28aca86a7180baa17117e0e5ba01d8ea9feca598Kotlin: 1.9.20
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 42023
JVM: 22.0.1 (Oracle Corporation 22.0.1+8-16)
OS: Mac OS X 14.7.1 x86_64
1 Pokemon/Digimon Classifier 1.1 Observation 1.2 Function 1.3 Loss 1.4 Training Examples
– OOPS what do we want? 2 What is the probability of sampling bad D t r a i n D_{train} Dtrain
2.1 Theroy – Larger N N N smaller ∣ H ∣ |H| ∣H∣
2.2…
一.最大公约数
gcd(a,b)gcd(b,a%b) 递归式,当且仅当b0,易得0和a的公约数为a.(可作为递归的出口)
证明: int gcd(int a, int b)
{if (b 0) return a;else return gcd(b, a % b);
} 二.最小公倍数
给定整数a b,求a b的最小公倍数
有图可知…
通过导入必要的scikit-learn导入必要的库,加载给定的数据,划分测试集和训练集之后训练预测和评估即可
具体代码如下:
import numpy as np
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
f…