神经网络是一种运算模型,由大量的节点(或称神经元)之间相互联接构成。每个节点代表一种特定的输出函数,称为激活函数(activation function)。每两个节点间的连接都代表一个对于通过该连接信号的加权值,称之为权重。
特性:
1.非线性:由于权重是加权于每两个节点间的连接,因此在数学上是非线性。
2.非凸性:并非收敛于特定极限。
3.人类不友好: 由于神经网络通过神经元的权重和激活来表达其行为,因此很难确定其决策背后的逻辑。
4.概括性不佳:经网络将在经过培训的任务上准确执行,但在其他任何方面都表现不佳,即使它与原始问题相似。
package machinelearning.gui;
/**
* ******************************************
*
* @author Michelle Min MitchelleMin@163.com
* @date 2021-08-13
* ******************************************
*/
// Day 1. Define an interface.
interface Flying{
void fly();
}//of interface Flying
// Day 2. Define a controller to cope with it.
class Controller{
Flying flying;
Controller(){
flying = null;
}//of Controller
void setListener(Flying paraFlying){
flying = paraFlying;
}//of addListener
void doIt(){
flying.fly();
}//of doIt
}//of Controller
//Day 3. Define class Bird for the interface.
class Bird implements Flying{
double weight = 0.5;
public void fly(){
System.out.println("Bird fly, my weight is " + weight + " kg.");
}//of fly
}//of class Bird
//Day 4. Define class Plane for the interface.
class Plane implements Flying{
double price = 100000000;
public void fly(){
System.out.println("Plan fly, my price is " + price + " RMB.");
}//of fly
}//of class Plane.
// Day 5. Test the interface.
public class InterfaceTest {
public static void main(String[] args){
Controller tempController = new Controller();
Flying tempFlying1 = new Bird();
tempController.setListener(tempFlying1);
tempController.doIt();
Flying tempFlying2 = new Plane();
tempController.setListener(tempFlying2);
tempController.doIt();
}//of main
}//of class InterfaceTest