-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAttribute.java
More file actions
60 lines (47 loc) · 1.36 KB
/
Attribute.java
File metadata and controls
60 lines (47 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package id3;
import java.util.List;
import java.util.Set;
/**
*
* @author universe
*/
public class Attribute {
private String name;
private Set<String> domains;
private List<String> records;
private double entropy;
private double gain;
public Attribute(String name, Set<String> domains, List<String> records, double entropy, double gain) {
this.name = name;
this.domains = domains;
this.records = records;
this.entropy = entropy;
this.gain = gain;
}
public String getName() {
return name;
}
public Set<String> getDomains() {
return domains;
}
public List<String> getRecords() {
return records;
}
public void setName(String name) {
this.name = name;
}
public void setDomains(Set<String> domains) {
this.domains = domains;
}
public void setRecords(List<String> records) {
this.records = records;
}
public String toString(){
return this.name+" "+this.domains.toString()+" "+this.records.toString()+" "+this.entropy+" "+this.gain;
}
}