Skip to content

Commit

Permalink
clippy: dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
morenol committed Nov 21, 2023
1 parent d372300 commit 901a7b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/dataset/diabetes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn load_dataset() -> Dataset<f32, u32> {
target: y,
num_samples,
num_features,
feature_names: vec![
feature_names: [
"Age", "Sex", "BMI", "BP", "S1", "S2", "S3", "S4", "S5", "S6",
]
.iter()
Expand Down
8 changes: 3 additions & 5 deletions src/dataset/digits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@ pub fn load_dataset() -> Dataset<f32, f32> {
target: y,
num_samples,
num_features,
feature_names: vec![
"sepal length (cm)",
feature_names: ["sepal length (cm)",
"sepal width (cm)",
"petal length (cm)",
"petal width (cm)",
]
"petal width (cm)"]
.iter()
.map(|s| s.to_string())
.collect(),
target_names: vec!["setosa", "versicolor", "virginica"]
target_names: ["setosa", "versicolor", "virginica"]
.iter()
.map(|s| s.to_string())
.collect(),
Expand Down
4 changes: 2 additions & 2 deletions src/dataset/iris.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn load_dataset() -> Dataset<f32, u32> {
target: y,
num_samples,
num_features,
feature_names: vec![
feature_names: [
"sepal length (cm)",
"sepal width (cm)",
"petal length (cm)",
Expand All @@ -45,7 +45,7 @@ pub fn load_dataset() -> Dataset<f32, u32> {
.iter()
.map(|s| s.to_string())
.collect(),
target_names: vec!["setosa", "versicolor", "virginica"]
target_names: ["setosa", "versicolor", "virginica"]
.iter()
.map(|s| s.to_string())
.collect(),
Expand Down

0 comments on commit 901a7b3

Please sign in to comment.