Home
last modified time | relevance | path

Searched refs:sorted_idx (Results 1 – 25 of 67) sorted by relevance

123

/dports/math/py-pandas/pandas-1.2.5/pandas/tests/indexes/multi/
H A Dtest_sorting.py18 sorted_idx, _ = index.sortlevel(0)
20 assert sorted_idx.equals(expected)
23 assert sorted_idx.equals(expected[::-1])
25 sorted_idx, _ = index.sortlevel(1)
28 assert sorted_idx.equals(expected)
31 assert sorted_idx.equals(expected[::-1])
37 assert sorted_idx.equals(mi)
52 sorted_idx, _ = index.sortlevel(0)
54 assert sorted_idx.equals(expected)
59 sorted_idx, _ = index.sortlevel(1)
[all …]
H A Dtest_indexing.py15 sorted_idx, _ = idx.sortlevel(0)
17 result = sorted_idx.slice_locs(("foo", "two"), ("qux", "one"))
20 result = sorted_idx.slice_locs(None, ("qux", "one"))
23 result = sorted_idx.slice_locs(("foo", "two"), None)
24 assert result == (1, len(sorted_idx))
26 result = sorted_idx.slice_locs("bar", "baz")
459 sorted_idx, _ = idx.sortlevel(0)
460 assert sorted_idx.get_loc("baz") == slice(3, 4)
461 assert sorted_idx.get_loc("foo") == slice(0, 2)
/dports/science/py-scikit-learn/scikit-learn-1.0.2/examples/inspection/
H A Dplot_permutation_importance.py129 sorted_idx = tree_feature_importances.argsort() variable
133 ax.barh(y_ticks, tree_feature_importances[sorted_idx])
135 ax.set_yticklabels(feature_names[sorted_idx])
151 sorted_idx = result.importances_mean.argsort() variable
155 result.importances[sorted_idx].T, vert=False, labels=X_test.columns[sorted_idx]
171 sorted_idx = result.importances_mean.argsort() variable
175 result.importances[sorted_idx].T, vert=False, labels=X_train.columns[sorted_idx]
/dports/science/py-scikit-learn/scikit-learn-1.0.2/examples/ensemble/
H A Dplot_gradient_boosting_regression.py134 sorted_idx = np.argsort(feature_importance) variable
135 pos = np.arange(sorted_idx.shape[0]) + 0.5
138 plt.barh(pos, feature_importance[sorted_idx], align="center")
139 plt.yticks(pos, np.array(diabetes.feature_names)[sorted_idx])
145 sorted_idx = result.importances_mean.argsort() variable
148 result.importances[sorted_idx].T,
150 labels=np.array(diabetes.feature_names)[sorted_idx],
/dports/science/wwplot/wwplot-0.0.8/WWplot/
H A Dmodel.py91 sorted_idx = self.data_x.argsort()
94 sorted_idx = sorted_idx[::-1]
98 self.data_x = self.data_x[sorted_idx]
99 self.data_xerr = self.data_xerr[sorted_idx]
100 self.data_y = self.data_y[sorted_idx]
101 self.data_yerr = self.data_yerr[sorted_idx]
/dports/misc/py-xgboost/xgboost-1.5.1/tests/cpp/common/
H A Dtest_device_helpers.cu179 dh::device_vector<size_t> sorted_idx(20); in TEST() local
180 dh::ArgSort<false>(dh::ToSpan(values), dh::ToSpan(sorted_idx)); // sort to descending in TEST()
181 ASSERT_TRUE(thrust::is_sorted(thrust::device, sorted_idx.begin(), in TEST()
182 sorted_idx.end(), thrust::greater<size_t>{})); in TEST()
190 dh::ToSpan(sorted_idx)); in TEST()
191 ASSERT_FALSE(thrust::is_sorted(thrust::device, sorted_idx.begin(), in TEST()
192 sorted_idx.end(), thrust::greater<size_t>{})); in TEST()
193 ASSERT_TRUE(thrust::is_sorted(sorted_idx.begin(), sorted_idx.begin() + 10, in TEST()
195 ASSERT_TRUE(thrust::is_sorted(sorted_idx.begin() + 10, sorted_idx.end(), in TEST()
/dports/misc/xgboost/xgboost-1.5.1/tests/cpp/common/
H A Dtest_device_helpers.cu179 dh::device_vector<size_t> sorted_idx(20); in TEST() local
180 dh::ArgSort<false>(dh::ToSpan(values), dh::ToSpan(sorted_idx)); // sort to descending in TEST()
181 ASSERT_TRUE(thrust::is_sorted(thrust::device, sorted_idx.begin(), in TEST()
182 sorted_idx.end(), thrust::greater<size_t>{})); in TEST()
190 dh::ToSpan(sorted_idx)); in TEST()
191 ASSERT_FALSE(thrust::is_sorted(thrust::device, sorted_idx.begin(), in TEST()
192 sorted_idx.end(), thrust::greater<size_t>{})); in TEST()
193 ASSERT_TRUE(thrust::is_sorted(sorted_idx.begin(), sorted_idx.begin() + 10, in TEST()
195 ASSERT_TRUE(thrust::is_sorted(sorted_idx.begin() + 10, sorted_idx.end(), in TEST()
/dports/science/py-scikit-learn/scikit-learn-1.0.2/sklearn/utils/
H A Dstats.py41 sorted_idx = np.argsort(array, axis=0)
42 sorted_weights = _take_along_axis(sample_weight, sorted_idx, axis=0)
62 max_idx = sorted_idx.shape[0] - 1
68 percentile_in_sorted = sorted_idx[percentile_idx, col_index]
/dports/finance/py-quantecon/quantecon-0.5.2/quantecon/
H A Dlss.py309 num_const, sorted_idx = self.num_const, self.sorted_idx
321 mu_x[:num_const] = self.mu_0[sorted_idx[:num_const]]
446 sorted_idx = []
452 sorted_idx.insert(0, idx)
455 sorted_idx.append(idx)
457 self.sorted_idx = sorted_idx
460 P[range(n), sorted_idx] = 1
/dports/misc/py-xgboost/xgboost-1.5.1/src/metric/
H A Dauc.cc49 auto const sorted_idx = common::ArgSort<size_t>( in BinaryAUC() local
53 return weights.empty() ? 1.0f : weights[sorted_idx[i]]; in BinaryAUC()
55 float label = labels[sorted_idx.front()]; in BinaryAUC()
60 for (size_t i = 1; i < sorted_idx.size(); ++i) { in BinaryAUC()
61 if (predts[sorted_idx[i]] != predts[sorted_idx[i-1]]) { in BinaryAUC()
66 label = labels[sorted_idx[i]]; in BinaryAUC()
152 auto const sorted_idx = common::ArgSort<size_t>(labels, std::greater<>{}); in GroupRankingAUC() local
158 auto predt = predts[sorted_idx[i]] - predts[sorted_idx[j]]; in GroupRankingAUC()
H A Dauc.cu27 common::Span<size_t const> sorted_idx; member
30 return weights.empty() ? 1.0f : weights[sorted_idx[i]]; in operator ()()
42 dh::device_vector<size_t> sorted_idx; member
54 if (sorted_idx.size() != predts.size()) { in Init()
55 sorted_idx.resize(predts.size()); in Init()
56 fptp.resize(sorted_idx.size()); in Init()
57 unique_idx.resize(sorted_idx.size()); in Init()
58 neg_pos.resize(sorted_idx.size()); in Init()
60 predts_t.resize(sorted_idx.size()); in Init()
98 auto d_sorted_idx = dh::ToSpan(cache->sorted_idx); in GPUBinaryAUC()
[all …]
/dports/misc/xgboost/xgboost-1.5.1/src/metric/
H A Dauc.cc49 auto const sorted_idx = common::ArgSort<size_t>( in BinaryAUC() local
53 return weights.empty() ? 1.0f : weights[sorted_idx[i]]; in BinaryAUC()
55 float label = labels[sorted_idx.front()]; in BinaryAUC()
60 for (size_t i = 1; i < sorted_idx.size(); ++i) { in BinaryAUC()
61 if (predts[sorted_idx[i]] != predts[sorted_idx[i-1]]) { in BinaryAUC()
66 label = labels[sorted_idx[i]]; in BinaryAUC()
152 auto const sorted_idx = common::ArgSort<size_t>(labels, std::greater<>{}); in GroupRankingAUC() local
158 auto predt = predts[sorted_idx[i]] - predts[sorted_idx[j]]; in GroupRankingAUC()
H A Dauc.cu27 common::Span<size_t const> sorted_idx; member
30 return weights.empty() ? 1.0f : weights[sorted_idx[i]]; in operator ()()
42 dh::device_vector<size_t> sorted_idx; member
54 if (sorted_idx.size() != predts.size()) { in Init()
55 sorted_idx.resize(predts.size()); in Init()
56 fptp.resize(sorted_idx.size()); in Init()
57 unique_idx.resize(sorted_idx.size()); in Init()
58 neg_pos.resize(sorted_idx.size()); in Init()
60 predts_t.resize(sorted_idx.size()); in Init()
98 auto d_sorted_idx = dh::ToSpan(cache->sorted_idx); in GPUBinaryAUC()
[all …]
/dports/math/py-sympy/sympy-1.9/sympy/physics/quantum/
H A Dqubit.py215 sorted_idx = list(indices)
216 if len(sorted_idx) == 0:
217 sorted_idx = list(range(0, self.nqubits))
218 sorted_idx.sort()
222 for i in range(len(sorted_idx) - 1, -1, -1):
224 new_mat = self._reduced_density(new_mat, int(sorted_idx[i]))
226 if (len(sorted_idx) == self.nqubits):
/dports/misc/py-xgboost/xgboost-1.5.1/src/common/
H A Ddevice_helpers.cuh1405 Iota(sorted_idx); in ArgSort()
1413 TemporaryArray<IdxT> sorted_idx_out(sorted_idx.size()); in ArgSort()
1419 CHECK_LE(sorted_idx.size(), std::numeric_limits<OffsetT>::max()); in ArgSort()
1423 d_temp_storage, bytes, d_keys, d_values, sorted_idx.size(), 0, in ArgSort()
1428 d_temp_storage, bytes, d_keys, d_values, sorted_idx.size(), 0, in ArgSort()
1433 d_temp_storage, bytes, d_keys, d_values, sorted_idx.size(), 0, in ArgSort()
1438 d_temp_storage, bytes, d_keys, d_values, sorted_idx.size(), 0, in ArgSort()
1442 safe_cuda(cudaMemcpyAsync(sorted_idx.data(), sorted_idx_out.data().get(), in ArgSort()
1488 xgboost::common::Span<IdxT> sorted_idx) { in SegmentedArgSort() argument
1492 Iota(sorted_idx); in SegmentedArgSort()
[all …]
/dports/misc/xgboost/xgboost-1.5.1/src/common/
H A Ddevice_helpers.cuh1405 Iota(sorted_idx); in ArgSort()
1413 TemporaryArray<IdxT> sorted_idx_out(sorted_idx.size()); in ArgSort()
1419 CHECK_LE(sorted_idx.size(), std::numeric_limits<OffsetT>::max()); in ArgSort()
1423 d_temp_storage, bytes, d_keys, d_values, sorted_idx.size(), 0, in ArgSort()
1428 d_temp_storage, bytes, d_keys, d_values, sorted_idx.size(), 0, in ArgSort()
1433 d_temp_storage, bytes, d_keys, d_values, sorted_idx.size(), 0, in ArgSort()
1438 d_temp_storage, bytes, d_keys, d_values, sorted_idx.size(), 0, in ArgSort()
1442 safe_cuda(cudaMemcpyAsync(sorted_idx.data(), sorted_idx_out.data().get(), in ArgSort()
1488 xgboost::common::Span<IdxT> sorted_idx) { in SegmentedArgSort() argument
1492 Iota(sorted_idx); in SegmentedArgSort()
[all …]
/dports/math/py-pynleq2/pysces-0.9.8/pysces/kraken/
H A DKrakenDataTools.py62 sorted_idx = numpy.lexsort(sorted)
63 print('sorted_idx.shape', sorted_idx.shape)
64 sorted = sorted.take(sorted_idx, axis=-1)
/dports/biology/py-PySCeS/pysces-1.0.0/pysces/kraken/
H A DKrakenDataTools.py62 sorted_idx = numpy.lexsort(sorted)
63 print('sorted_idx.shape', sorted_idx.shape)
64 sorted = sorted.take(sorted_idx, axis=-1)
/dports/lang/parrot/parrot-8.1.0/lib/Parrot/
H A DSearchOps.pm52 my @sorted_idx = sort {$a <=> $b} @keys;
54 foreach my $idx (@sorted_idx) {
/dports/science/py-scikit-learn/scikit-learn-1.0.2/examples/release_highlights/
H A Dplot_release_highlights_0_22_0.py112 sorted_idx = result.importances_mean.argsort()
114 result.importances[sorted_idx].T, vert=False, labels=feature_names[sorted_idx]
/dports/math/py-pynleq2/pysces-0.9.8/pysces/kraken/controllers/
H A Dkraken_scanner2.py114 sorted_idx = numpy.lexsort(sorted)
115 print('sorted_idx.shape', sorted_idx.shape)
116 sorted = sorted.take(sorted_idx, axis=-1)
H A Dkraken_continuation_eigen.py103 sorted_idx = numpy.lexsort(sorted)
104 print('sorted_idx.shape', sorted_idx.shape)
105 sorted = sorted.take(sorted_idx, axis=-1)
/dports/biology/py-PySCeS/pysces-1.0.0/pysces/kraken/controllers/
H A Dkraken_scanner2.py114 sorted_idx = numpy.lexsort(sorted)
115 print('sorted_idx.shape', sorted_idx.shape)
116 sorted = sorted.take(sorted_idx, axis=-1)
H A Dkraken_continuation_eigen.py114 sorted_idx = numpy.lexsort(sorted)
115 print('sorted_idx.shape', sorted_idx.shape)
116 sorted = sorted.take(sorted_idx, axis=-1)
/dports/graphics/opencv/opencv-4.5.3/modules/ml/src/
H A Dtree.cpp657 int* sorted_idx = (int*)(values + n); in findSplitOrdClass() local
668 sorted_idx[i] = i; in findSplitOrdClass()
673 std::sort(sorted_idx, sorted_idx + n, cmp_lt_idx<float>(values)); in findSplitOrdClass()
685 int curr = sorted_idx[i]; in findSplitOrdClass()
686 int next = sorted_idx[i+1]; in findSplitOrdClass()
712 split.c = (values[sorted_idx[best_i]] + values[sorted_idx[best_i+1]])*0.5f; in findSplitOrdClass()
1010 sorted_idx[i] = i; in findSplitOrdReg()
1016 std::sort(sorted_idx, sorted_idx + n, cmp_lt_idx<float>(values)); in findSplitOrdReg()
1021 int curr = sorted_idx[i]; in findSplitOrdReg()
1022 int next = sorted_idx[i+1]; in findSplitOrdReg()
[all …]

123