Record Class ProstateCancer
java.lang.Object
java.lang.Record
smile.datasets.ProstateCancer
- Record Components:
train- training data frame.test- testing data frame.formula- modeling formula.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.ProstateCancer(Path trainDataPath, Path testDataPath) Constructor.ProstateCancer(DataFrame train, DataFrame test, Formula formula) Creates an instance of aProstateCancerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.formula()Returns the value of theformularecord component.final inthashCode()Returns a hash code value for this object.test()Returns the value of thetestrecord component.double[][]testx()Returns the test sample features.double[]testy()Returns the test sample class labels.final StringtoString()Returns a string representation of this record class.train()Returns the value of thetrainrecord component.double[][]x()Returns the train sample features.double[]y()Returns the train sample class labels.
-
Constructor Details
-
ProstateCancer
Constructor.- Throws:
IOException- when fails to read the file.
-
ProstateCancer
Constructor.- Parameters:
trainDataPath- the path to training data file.testDataPath- the path to testing data file.- Throws:
IOException- when fails to read the file.
-
ProstateCancer
-
-
Method Details
-
x
public double[][] x()Returns the train sample features.- Returns:
- the train sample features.
-
y
public double[] y()Returns the train sample class labels.- Returns:
- the train sample class labels.
-
testx
public double[][] testx()Returns the test sample features.- Returns:
- the test sample features.
-
testy
public double[] testy()Returns the test sample class labels.- Returns:
- the test sample class labels.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
train
-
test
-
formula
-